cancel
Showing results for 
Search instead for 
Did you mean: 

HTML form doesn't call Servlet

Former Member
0 Kudos

Hi all,

Have a small problem. I have a an html form that calls a servelt from its action line e.g.

<FORM name="passwordReset" ACTION="/ZChangePassword/mainServlet"

For some reason I'm getting the "The requested resource does not exist" error when I hit submit. I've checked my web.xml file and all looks ok e.g.

<web-app>

<display-name>DoC-Change-Password</display-name>

<description>This web appplication allows users to reset their SAP passwords</description>

<servlet>

<servlet-name>ZChangePassword</servlet-name>

<servlet-class>changepassword.ZChangePassword</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>ZChangePassword</servlet-name>

<url-pattern>/ZChangePassword/mainServlet</url-pattern>

</servlet-mapping>

</web-app>

Can anybody see what I'm doing wrong?

Many thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Give the classname like this and check.

<servlet-name>ZChangePassword</servlet-name>

<servlet-class>>/ZChangePassword/mainServlet</servlet-class>

</servlet>

Regds,

Giri

Former Member
0 Kudos

Hi

<FORM name="passwordReset" ACTION="/ZChangePassword/mainServlet"

This line the ACTION part should contain the complete path of the servlet file.check with the path again i hope it will help you.

Thanks

Mrutyunjaya Tripathy

Former Member
0 Kudos

Hi,

Check the package name of your servlet. If the package name is "com.changepassword", then the servlet-class tag should be

<servlet-class>com.changepassword.ZChangePassword</servlet-class>.

Regards,

Uma

kishorg
Advisor
Advisor
0 Kudos

Hi Luke,

u just try the servlet name itself in place of action instead of the mapped name...

for example if ur servlet name is <b>ExampleServlet.</b>

then try ...

ACTION="ExampleServlet"

Regards

Kishor Gopinathan