facebook

JSP WebRoot on deployment [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #220741 Reply

    Roguen
    Member

    I am developing a site in JSP using the myEclipse IDE. The directory struture puts the jsps under the WebRoot directory in my project.
    When I deploy however, sometimes they’re in a WebRoot folder after deployment, sometimes they are not. (In webroot with a war deployment, not with a exploded deployment) It’s screwing up all of my links because sometimes the link need to be
    /testProject/testFolder/mypage.jsp
    and the next time I deploy it wants
    /testProject/WebRoot/testFolder/mypage.jsp

    is there some option I’m switching on and off and not even noticing?
    Let me know what other information might be needed.
    This is a windowsXP machine.
    thanks for your help.

    #220743 Reply

    Riyad Kalla
    Member

    Can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    #220782 Reply

    Roguen
    Member

    Sorry, still new to this. Here are the specs:

    What operating system and version are you running? Windows XP SP2
    What Eclipse version and build id are you using? 3.0.1
    – Was Eclipse freshly installed for MyEclipse? yes
    – Are any other external plugins installed? PHPEclipse
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*? 3
    What MyEclipse version are you using? 3.8.2
    What JDK version are you using to run Eclipse? 1.4
    What JDK version are you using to launch your application server? 1.4
    What steps did you take that resulted in the issue? Deploying project to a web application.
    What application server are you using? Tomcat 5.0
    Are there any exceptions in the Eclipse log file? No

    #220783 Reply

    Riyad Kalla
    Member

    Roguen,
    The “webroot” (default name ‘WebRoot’) folder that MyEclipse uses is intended to be the base of your web application structure, the root of it. If you are using an Ant script to deploy your project, besure to deploy from the WebRoot folder down, and not the folder itself. If you are using our deployment tool to deploy, it does a straight copy (along with dependent resource resolution/deployment/packaging) of your WebRoot and all the files below it, to your application server into the directory you have specified as the “Web context root” when you created your project.

    I didn’t quite understand what you were saying, could you clarify the behavior? Maybe give an example.

    #221261 Reply

    Roguen
    Member

    I’m using the deployment tool as supplied though the IDE “Deploy J2EE Project t Server”
    this is the address when the deployment is done exploded archive.
    http://localhost:8080/project/MainMenu.do
    however when I package it into a war archive using the tool the addrss becomes:
    http://localhost:8080/project/WebRoot/MainMenu.do
    is there a way I can change those deployment settings for the war file to get rid of /WebRoot/ in the address?

    #221266 Reply

    Riyad Kalla
    Member

    Roguen,
    It sounds to me like your WebRoot dir for your project is actually set to “/” and not “/WebRoot” as it should be. Can you check your project properties > MyEclipse-Web and tell me what the two settings are for the first two items?

    #221372 Reply

    Roguen
    Member

    The Web-Root folder is /WebRoot
    The Web Context root is /project

    #221373 Reply

    Riyad Kalla
    Member

    Are you using a custom deploy location and deploying 1 level down under Tomcat? I’ve never seen/heard of this behavior before.

    #221381 Reply

    Roguen
    Member

    You and me both.
    I was doing some messing around with Tomcat earlier on, and it’s beginning to look like this may be the cause rather than an eclipse configuration. I’m going to see if I can find an original Tomcat server.xml config file and perhaps I have missed changing something back to the original.

    #221394 Reply

    Riyad Kalla
    Member

    Just for sanity sake, go redownload Tomcat 5.0.28 ZIP again and unzip it to a new location, see if that works.

    #222001 Reply

    Roguen
    Member

    A reinstallation of Tomcat did solve this issue, although just replacing the config scripts did not seem to do the trick. Not sure what I was messing with, but it was a tomcat problem. Thanks for your help.

    #222004 Reply

    Scott Anderson
    Participant

    Glad to hear it’s working now.

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: JSP WebRoot on deployment [Closed]

You must be logged in to post in the forum log in