Question

  Asked: Jun 20 2006   9:15 AM GMT
  Asked by: okemos


What is the location of servlets?


Oracle Business Applications, Development, HTML, J2EE, Java, JSP, SQL, Web site design & management

I have not been successful in executing a servlet whose physical location is C:MyWorkMyProjectclassesmyServlet.class. In the jsp file I have
<form action="../classes.myServlet" method="post">. But, when I run the project within JDeveloper and when tried to execute the servlet, I get "The Page Cannot be Found" error. I can see the OC4JServer starts running and the URL which it points to is "http://10.8.10.185:7969/classes.myServlet". I am confused not knowing where to keep the servlet. Any help will be appreciated.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



The location of servlet classes has to fit the servlet API requirement for location within a "web application" and defined by a deployment descriptor = web.xml.
Furthermore, your servlet class should be in a package to avoid all sorts of problems. I am not familiar with the OC4JServer, but if it comes with any samples, you should review how those samples are organized. You can get a copy of the servlet API from
http://java.sun.com/products/servlet/
Bill
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Oracle and Development.

Looking for relevant Oracle Whitepapers? Visit the SearchOracle.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register