I'm quite new to Jsp.
The web server is Tomcat 6 and I have a Jsp page that uses a servlet as following code shows.

<form name='uploadSO' method='post' encType='multipart/form-data' action='UploadUnConfirmedSOServlet' >
<table width .....

The Jsp page is located under a folder called "Shipper" under my application's root directory:
So it's something like this:

c:\Tomcat 6.0\webapps\myapp\shipper\myfile.jsp

The servlet (UploadUnConfirmedSOServlet) is located somewhere under the WEB-INF folder as following shows:
c:\Tomcat 6.0\webapps\myapp\WEB-INF\classes\myco\myapp\shipper\servlet

when I submit the form in the Jsp page, I get the error "The requested resource (/myapp/shipper/UploadUnConfirmedSOServlet) is not available".

I have also configuered the web.xml which is located under the WEB-INF folder and added the following sections:


I appreciate any help on this.

9 Years
Discussion Span
Last Post by gheibia

This is because you have specified a relative URL and with you currently in the "shipper" context, it's trying to find "UploadUnconfirmedSOServlet" in that context. What you can do here is either make use of absolute URL's or adjust your relative URL to suit your needs. Something like:

<form name='uploadSO' method='post' action='../UploadUnConfirmedSOServlet'>
<!-- making use of relative URL -->

<form name='uploadSO' method='post' action='/myapp/UploadUnConfirmedSOServlet'>
<!-- making use of absolute URL -->
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.