Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Problem setting up web application
Problem setting up web application [message #223160] Mon, 27 October 2008 17:46 Go to next message
Eclipse UserFriend
Hello,

I have attempted to set up a web application on Eclipse 3.4.1 using Tomcat
5.5.25
and JDK 1.5.03. The problem is that it does not appear that my web project
is being correctly deployed. When I look in the deployment directory, I
only see the Java class files and none of the jsps or config files. As you
would imagine after starting the server I get a 404 error when I go to the
URL where I expect to see the app.

First I create a dynamic web project at compiler compliance level 1.5 and
using the JDK I've mentioned above.

To create the app I move my source code from source code control, so that
I have the following directory structure:
C:\Projects\RentPayment\architecture
C:\Projects\RentPayment\rentpayment_src
C:\Projects\RentPayment\uiarc
C:\Projects\RentPayment\rentpayment_web


I then add the first 3 directories above as source directories and set the
default output folder to: RentPayment/rentpayment_web/WEB-INF/classes

The context root is set to "RentPayment" (no quotes).

I add my required libs into the
C:\Projects\RentPayment\rentpayment_web\WEB-INF\lib directory.

I refresh and build the project.

Then I add a server, selecting the version of Tomcat that I've installed
and add a module that points to the project I've just set up.

I set the server path to RentPayment\tomcat and the deploy path to
C:\Projects\RentPayment\tomcat\webapps

The web module docBase is set to "/RentPayment" (no quotes)

So with all of this set up, why isn't my web app being deployed into
C:\Projects\RentPayment\tomcat



Regards,

Tim
Re: Problem setting up web application [message #223209 is a reply to message #223160] Tue, 28 October 2008 11:06 Go to previous message
Eclipse UserFriend
I tried your settings and they worked for me. Did you refresh the
"tomcat" folder in your workspace. You may not see changes until you
do. Setting the Deploy directory to the server's "webapps" directory is
not recommended. If a project has a Context Root set differently from
the Module (i.e. Project) name, then you will get two copies of the
webapp served. For info about the WTP Tomcat support see the Tomcat
FAQ[1].

Note that with the Tomcat support, there is no advantage to directing
the Java build output into "webcontent"/WEB-INF/classes and has the
disadvantage of making the classes appear as source in the "webcontent"
portion of your project. You can leave the default output directory
pointing to "build/classes" and publishing will put the classes in the
right location when creating the copy of the webapp that actually gets
served.

Cheers,
Larry

[1] http://wiki.eclipse.org/WTP_Tomcat_FAQ

Tim Manchester wrote:
> Hello,
>
> I have attempted to set up a web application on Eclipse 3.4.1 using
> Tomcat 5.5.25
> and JDK 1.5.03. The problem is that it does not appear that my web
> project is being correctly deployed. When I look in the deployment
> directory, I only see the Java class files and none of the jsps or
> config files. As you would imagine after starting the server I get a 404
> error when I go to the URL where I expect to see the app.
>
> First I create a dynamic web project at compiler compliance level 1.5
> and using the JDK I've mentioned above.
>
> To create the app I move my source code from source code control, so
> that I have the following directory structure:
> C:\Projects\RentPayment\architecture
> C:\Projects\RentPayment\rentpayment_src
> C:\Projects\RentPayment\uiarc
> C:\Projects\RentPayment\rentpayment_web
>
>
> I then add the first 3 directories above as source directories and set
> the default output folder to: RentPayment/rentpayment_web/WEB-INF/classes
>
> The context root is set to "RentPayment" (no quotes).
>
> I add my required libs into the
> C:\Projects\RentPayment\rentpayment_web\WEB-INF\lib directory.
>
> I refresh and build the project.
>
> Then I add a server, selecting the version of Tomcat that I've installed
> and add a module that points to the project I've just set up.
> I set the server path to RentPayment\tomcat and the deploy path to
> C:\Projects\RentPayment\tomcat\webapps
>
> The web module docBase is set to "/RentPayment" (no quotes)
>
> So with all of this set up, why isn't my web app being deployed into
> C:\Projects\RentPayment\tomcat
>
>
> Regards,
>
> Tim
>
>
>
Previous Topic:obtain webtools sourcecode - HOW ? cvs does not work ?
Next Topic:How to create a web service client (!) jar archive from Eclipse?
Goto Forum:
  


Current Time: Mon Jul 07 21:52:27 EDT 2025

Powered by FUDForum. Page generated in 0.06987 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top