wood burning stoves 2.0*
The moose likes JSP and the fly likes Resource not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Resource not found" Watch "Resource not found" New topic
Author

Resource not found

nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Hi,

I have a html page from where I am trying to call a servlet.

the html page looks like as follows:-




The web.xml file looks like:-



I am usging tomcat 6.
Now when I submit the html form, it ideally should invoke the servlet but I am getting "The requested resource (/servlet/FileUploaderServlet) is not available." instead.
The snapshot of the directory structure of my web application can be found in the attachment.

Can anyone give me any pointers where I am committing the mistake?





[Thumbnail for struct.png]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

You are not including the context path in the action URL.

P.S. Mapping servlets with a prefix of "/servlet/" looks really amateurish. Why the needless prefix? Also, including the term "Servlet" inthe mapping at all is poor -- it reveals the underlying implementation needlessly. I'd rethink your mapping names.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
nandini lagunia
Ranch Hand

Joined: May 05, 2009
Posts: 57
Thanks Bear for the help.

I'll keep your suggestions in my mind.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

The context path should be fetched using ${pageContext.request.contextPath}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resource not found