Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » The requested resource is not available
The requested resource is not available [message #206210] Fri, 28 December 2007 13:39 Go to next message
Eclipse UserFriend
Originally posted by: Abel.MacAdam.eden.invalid

Hello,

I deleted my Eclipse Europe (JEE) installation, and installed it a-new. I
did this because I thought my installation was amiss (having both Sysdeo
and WTP installed is bound to generate errors).

I used the "WTP Tutorials - Building and Running a Web Application"
document to configure WTP and Tomcat in Eclipse [1].

Next I copied an example directory to my workspace [2]. I created a new
Project (File -> New -> Project... Web: Dynamic Web Project) pointing to
this example directory in my workspace. Next I changed the 'Java Build
Path' in the 'Project Properties' (added Servlet and Strut jars). Finally
I started the server, opened a browser window, and went to web address of
the app. And there I got the following error report:
<error>error:
type Status report

message /app15a/createCustomer.do

description The requested resource (/app15a/createCustomer.do) is not
available.
</eclipse>

Why is my app not found? I copied it to my workspace, pointed the project
to the directory, started the server. Should Eclipse not find the
directory?

Abel


[1]
http://www.eclipse.org/webtools/community/tutorials/BuildJ2E EWebApp/BuildJ2EEWebApp.html)
[2] Code from/in the book 'Struts Design and Programming, A Tutorial'.
Re: The requested resource is not available [message #206316 is a reply to message #206210] Wed, 02 January 2008 16:34 Go to previous message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
Abel MacAdam wrote:
> Hello,
>
> I deleted my Eclipse Europe (JEE) installation, and installed it a-new.
> I did this because I thought my installation was amiss (having both
> Sysdeo and WTP installed is bound to generate errors).
> I used the "WTP Tutorials - Building and Running a Web Application"
> document to configure WTP and Tomcat in Eclipse [1].
> Next I copied an example directory to my workspace [2]. I created a new
> Project (File -> New -> Project... Web: Dynamic Web Project) pointing to
> this example directory in my workspace. Next I changed the 'Java Build
> Path' in the 'Project Properties' (added Servlet and Strut jars).
> Finally I started the server, opened a browser window, and went to web
> address of the app. And there I got the following error report:
> <error>error:
> type Status report
>
> message /app15a/createCustomer.do
>
> description The requested resource (/app15a/createCustomer.do) is not
> available. </eclipse>
>
> Why is my app not found? I copied it to my workspace, pointed the
> project to the directory, started the server. Should Eclipse not find
> the directory?
>
> Abel
>
>
> [1]
> http://www.eclipse.org/webtools/community/tutorials/BuildJ2E EWebApp/BuildJ2EEWebApp.html)
>
> [2] Code from/in the book 'Struts Design and Programming, A Tutorial'.
>
>

Adding something to the Java Build Path in a Dynamic Web Project, by
itself, does only that, i.e. modifies the *build* path. It does not, by
itself, modify the *runtime* path for the project's webapp (AKA the
project's module). It's still unknown after modifying the Java Build
Path if the server will be supplying access to the classes in those jars
internally, or they need to be added to the webapp's WEB-INF/lib.
After adding the jars to the Java Build Path, some problem items should
have appeared in the Problems view relating to this issue. Using the
Quick Fix for those items will mark the jar for inclusion in
WEB-INF/lib, which would be needed for the Struts related jars.

An alternate, and perhaps better, way to add these jars is to use the
J2EE Module Dependencies page of the project Properties dialog, instead
of the Java Build Path page. Adding them there will add them to the
build path and include them in WEB-INF/lib in one step. Also, these
jars will appear under the Web App Libraries library container displayed
in Project Explorer and Package Explorer views, giving you a better
picture of what is being included in WEB-INF/lib.

The Servlet jars should be part of the server runtime chosen when you
created the Dynamic Web Project. If they aren't, then you have a bad
runtime. Adding them directly to your project is likely to cause
trouble. Adding them to WEB-INF/lib is virtually guaranteed to cause
trouble. Tomcat is an exception to this as it will silently ignore any
jar in a webapp's WEB-INF/lib if it contains one of these "forbidden"
packages.

As for the resource not found, it's not clear if Tomcat can't find
"/app15a" or it can't figure out what "createCustomer.do" is in
"/app15a". If the latter, it would indicate a Struts configuration issue.

Cheers,
Larry
Previous Topic:Configuration Eclipse (Tomcat)
Next Topic:reloading issues
Goto Forum:
  


Current Time: Sun Nov 23 08:46:15 GMT 2014

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

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