Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to call Servlet from .jsp

843842Nov 25 2008 — edited Dec 3 2008
Hi all,

I am trying to call a Servlet from my index.jsp. each time i call the click on the button where the Servlet would be loaded i get the "Error 404 The requested resource is not available"

here is the code from JSP where the Servlet is being called.
form name="frmCourse" method="post" action="/Servlets/Controller?Type=<%=Type%>&method=getContent">
My Servlet is located in WEB-INF--->classes---->Servlets---->Controller

Edited by: Paul_Gh on Nov 25, 2008 3:19 PM

I have also added the servlet in my web.xml file as following
<servlet>
<servlet-name>Controller</servlet-name>
<servlet-class>Servlets.Controller</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Controller</servlet-name>
<url-pattern>/web</url-pattern>************ I tried having my Serlvet name there as well same issue WEB is the projcet name i am working on.
</servlet-mapping>

Edited by: Paul_Gh on Nov 25, 2008 3:23 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2008
Added on Nov 25 2008
21 comments
622 views