Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error 403--Forbidden using eclipse and weblogic

843785Dec 17 2008 — edited Jan 6 2009
hi,
i am new here on j2ee

I am using eclipse3.4 and weblogic 9.1.2 on xp. I am trying to make simple hello world servlet

here is what i did

on the eclipse click New and click on Dynamic project
click on Servlet and write following code for the servlet

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* Servlet implementation class SecondServlet
*/
public class SecondServlet extends HttpServlet {
public void service (HttpServletRequest req, HttpServletResponse res)
throws IOException
{
res.setContentType("text'html");
PrintWriter out = res.getWriter();

out.println("<html><head>" + "<title> Hello World </title></head>" +
"<h1>Hello Worldasd </h1></body></html>");
}
}

folder structure and file web.xml is created by eclipse itself.

then i started weblogic from the eclipse

and i have following error

http://localhost:7001/SecondServlet/

Error 403--Forbidden
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.4 403 Forbidden
The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2009
Added on Dec 17 2008
4 comments
9,802 views