aspose file tools*
The moose likes Servlets and the fly likes Tompcat - calling servlet from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Tompcat - calling servlet from JSP" Watch "Tompcat - calling servlet from JSP" New topic
Author

Tompcat - calling servlet from JSP

m asif
Greenhorn

Joined: Apr 01, 2003
Posts: 6
Hi everyone,
I am getting no page found error while calling servlet from jsp page.
here is jsp code:
<form name="Form"
action="http://localhost:8080/Asifweb/asif/Servlet1"
method="POST">
....
<input type="hidden" name="action" value="ADD">
<input type="submit" name="Submit" value="Add">
</form>
following is WAR file configuration:
web.xml path: web-inf/
jsp Path: web-inf/
servlet path: web-inf/classes/asif/
URL_MAPPING
<web-app>
<servlet>
<servlet-name>debugjsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>jspCompilerPlugin</param-name>
<param-value>com.borland.jbuilder.webserverglue.tomcat.jsp.JasperSunJavaCompiler</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet>
<servlet-name>servlet1</servlet-name>
<servlet-class>asif.Servlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>debugjsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>servlet1</servlet-name>
<url-pattern>/servlet1</url-pattern>
</servlet-mapping>
</web-app>
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

servlet1 and Servlet1 are two different things (the case of the first letter).

Also, it's WEB-INF, not web-inf (and yes, it absolutely makes a difference)
m asif
Greenhorn

Joined: Apr 01, 2003
Posts: 6
Mike your are the Man!!! thanks for telling me very basic.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tompcat - calling servlet from JSP