| | |
JSP and Servlet using Tomcat
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2008
Posts: 2
Reputation:
Solved Threads: 0
Hi,
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.
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.
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:
<servlet>
<servlet-name>UploadUnConfirmedSOServlet</servlet-name>
<servlet-class>myco.myapp.shipper.servlet.UploadUnConfirmedSOServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UploadUnConfirmedSOServlet</servlet-name>
<url-pattern>UploadUnConfirmedSOServlet</url-pattern>
</servlet-mapping>I appreciate any help on this.
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:
JSP Syntax (Toggle Plain Text)
<form name='uploadSO' method='post' action='../UploadUnConfirmedSOServlet'> <!-- making use of relative URL --> </form> <form name='uploadSO' method='post' action='/myapp/UploadUnConfirmedSOServlet'> <!-- making use of absolute URL --> </form>
I don't accept change; I don't deserve to live.
![]() |
Similar Threads
- witch one is better Jboss server or tomcat server (JSP)
- Login page. JSP/Servlet (JSP)
- problem in tomcat (JSP)
- facing problem in database connectivity in jsp to mysql (JSP)
- problem encountered while running a jsp on tomcat 5.5 (JSP)
- Tomcat Server (Java)
- Apache Tomcat and IIS 6 with JK2 (Windows Servers and IIS)
- login (HTML and CSS)
Other Threads in the JSP Forum
- Previous Thread: JSP problem
- Next Thread: retrieve info frm db into textbox and edit
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






