0

I have 2 jsps .. The first one is the register jsp i.e(Register.jsp) which resides in (main folder of Webcontent) and the other jsp i.e(Register_worker.jsp which is in worker folder of WebContent) is supposed to act as the servlet or worker jsp. When i click the submit button it shows an error

HTTP Status 404 - /learn-ui/jsp/main/Register_worker.jsp

  • type:Status report
  • message:/learn-ui/jsp/main/Register_worker.jsp
  • description:The requested resource is not available.

The form action is posted below.

<form id="form_register" 
      name="form_register" 
      method="post" 
      action="Register_worker.jsp">
8
  • Have you tried action="worker/Register_worker.jsp"? Commented Jul 31, 2013 at 16:50
  • yeh ive tried all possible permutaions and combinations It shows the same error. Do we need to change the web.xml file in the WebContent?? Commented Jul 31, 2013 at 17:00
  • Where are this form placed? If you can, show us the directory tree Commented Jul 31, 2013 at 17:02
  • WebContent/main/Register.jsp WebContent/worker/Register_worker.jsp is where these files reside Commented Jul 31, 2013 at 17:05
  • Try action="../worker/Register_worker.jsp" Commented Jul 31, 2013 at 17:06

1 Answer 1

2

The path of Register.jsp isn't the same as Register_worker.jsp. So you'll need to change the path. This will work fine:

<form id="form_register" name="form_register" method="post" action="../worker/Register_worker.jsp">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.