File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 9052
    
  12
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet problems on Orion