This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource not found

 
nandini lagunia
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?


struct.png
directory structure
[Thumbnail for struct.png]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
nandini lagunia
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear for the help.

I'll keep your suggestions in my mind.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The context path should be fetched using ${pageContext.request.contextPath}
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic