• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tompcat - calling servlet from JSP

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike your are the Man!!! thanks for telling me very basic.
 
reply
    Bookmark Topic Watch Topic
  • New Topic