Successfully deployed. But I get an application error:
Details: javax.servlet.ServletException: The requested resource ( QuickCarRental/servlet/quickCarRentalView.jsp ) is not found
at com.sap.examples.quickcarrental.servlet.QuickReservationServlet.doWork(QuickReservationServlet.java:51)
at com.sap.examples.quickcarrental.servlet.QuickReservationServlet.doGet(QuickReservationServlet.java:28)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...
The error occurs in the dispatcher.forward(request, response) statement in the servlet's doWork() method.
The servlet/jsp mappings in the web.xml look correct to me:
...
<servlet-mapping>
<servlet-name>quickCarRentalView.jsp</servlet-name>
<url-pattern>/view</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>QuickReservationServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
...
I am a complete novice to servlet/JSP/EJB development. But from the little I know, the deployment to the localhost also seems correct: I find quickCarRentalView.jsp under sap.com/QuickCarRental/root.
Darn, I came this far not to be able to see the application?! Any help is appreciated.
Hi Randy,
I've never tried the CarRental sample, but from the error below it looks like it is trying to forward to an incorrect url. Maybe check the dispatcher.forward() and see where it is forwarding to. Looks like it is trying to forward to servlet/quickCarRentalView.jsp. Check if that relative path is valid. If not, find the correct path to your quickCarRentalView.jsp and correct the url in forward() for it.
Hope this helps,
Marc
I have EXACTLY the same problem, but was thinking it was me..I have re-done the whole thing a few times, but still get the same error. Surely there must be someone who has done this tutorial or who can inform what can be done to correct this?
Message was edited by: Sajeev Anand
I have run into this problem. I get this:
The request can't be processed.
Details: Requested resource ( QuickCarRental/servlet/quickCarRentalView.jsp ) not found.
when I: http://localhost:50000/QuickCarRental/view
Also, if I try this: http://localhost:50000/QuickCarRental
I get a stacktrace beginning with:
Application error occurred during the request procession.
Details: javax.servlet.ServletException: Requested resource ( QuickCarRental/servlet/quickCarRentalView.jsp ) not found.
at com.sap.examples.quickcarrental.servlet.QuickReservationServlet.doWork(QuickReservationServlet.java:51)
The problem seems to be that the jsp is not being compiled. I even put a copy of the jsp file in the servlet directory! It still complains.
How can I compile the JSP file by hand?
Why is it not compiling it automatically?
Is there a log file for what it is doing to see why the compile fails or even if it tries to compile it?
Add a comment