File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes BEA/Weblogic and the fly likes weblogic servlet error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "weblogic servlet error" Watch "weblogic servlet error" New topic

weblogic servlet error

sai Khan

Joined: Dec 22, 2005
Posts: 1
i am trying to run a hello world servlet program.. but its giving me some error:
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

here is my servlet file:
import javax.servlet.*;
import javax.servlet.http.*;
public class MyServlet extends HttpServlet
public void doGet(HttpServletRequest req, HttpServletResponse res) throws

ServletException, IOException
PrintWriter pw = res.getWriter();
pw.println("<html><head><title>Hello World!</title></head></html>");

and my web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
Hello World


weblogic deploys it successfully.. then why am i getting this error.. can anyone help??
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
Please try creating MyServlet within a package structure. The issue can be with the servlet being at the root of the webapp.
Henry Wong

Joined: Sep 28, 2004
Posts: 20517

Weblogic also uses a weblogic.xml file. The root url of the web app is specified in that file.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
I agree. Here's the link:
subject: weblogic servlet error
It's not a secret anymore!