wood burning stoves 2.0*
The moose likes Other Java Products and Servers and the fly likes Servlet problems on Orion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Servlet problems on Orion " Watch "Servlet problems on Orion " New topic
Author

Servlet problems on Orion

Ioan Berciu
Greenhorn

Joined: Nov 17, 2002
Posts: 15
Hi!
Can anyone help me ?
I have a servlet in the WEB-INF\classes
and when I try to access the servlet
I get the following error:
HTTP 404 - File not found
Internet Explorer
This is the web.xml content:
<web-app>
<display-name>Proiect SICE</display-name>
<description>Proiect pentru scoala.</description>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<servlet>
<servlet-name>Register</servlet-name>
<servlet-class>Register</servlet-class>
</servlet>
</web-app>
This is the content of the servlet:
public class Register extends HttpServlet
{
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<HTML><HEAD><TITLE>Server respons</TITLE></HEAD>");
out.println("<BODY><B>bla bla bla ...</B>");
out.println("</BODY></HTML>");
out.close();
}
}
Should I write anything else in the web.xml ?
Why can't orion see my servlet ?


JOE
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
I am unable to duplicate your problem. It works for me (after I added a doGet())


and using your XML stuff.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Ioan Berciu
Greenhorn

Joined: Nov 17, 2002
Posts: 15
Hi Marilyn de Queiroz.
Your solution did not worked for me.
I tried an other approach and it worked.
In web.xml file I put a the folloing code:
<servlet-mapping>
<servlet-name>Register</servlet-name>
<url-pattern>/Register</url-pattern>
</servlet-mapping>
and only after that it worked.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Servlet problems on Orion
 
Similar Threads
Getting error "Oops! This link appears to be broken."
problem with JSTL
Cannot find file..? Help
new, need help!!!
HTTP Status 404 - /EmpServletDemo/EmpServlet