Hi All, i got a problem, can some one can advice me what i suppose do in
order to fix it...

I created a JSP, Servlet, and Bean and placed in appropriate directories
with clean Compilation.

The servlet in c:\jswdk-1.0.1\webpages\web-inf\servlets\AddServlet.class
The Jsp in c:\jswdi-1.0.1\examples\jsp\tutorial\mytest\AddDetails.jsp
The bean in c:\jswdi-1.0.1\examples\web-inf\jsp\beans\add\AddBean.class

When i'm clickin' the Add button in HTML page, i'm gettin' an error
message in Netscpae Message Box as bolow.

"A network error occurred while Netscape  was receiving the data.
(Network Error: Connection reset by peer)
Try connecting  again."

here is the snip of my .jsp

<form name="addform"
      action="/examples/servlets/AddServlet"
 ( i also tried changing' it to /webpages/web-inf/servlets/AddServlet/")
      method="POST">

<b>Name</b> &nbsp&nbsp;
     <input type=text name="name"><br>

<b>Address</b>
    <input type=text name="address"><br>

    <input type="hidden" name="action" value="ADD">
    <input type="submit" name="Submit" value="Add">

</form>

--Snip of the Servlet...

 public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException,IOException
  {
     System.out.println("It's in Servlet's doPost() method");
     HttpSession session =req.getSession(false);
     AddBean addBean ;

     if(session == null){

        res.sendRedirect("http://localhost:8080/error.html");
     }

     String action =req.getParameter("action");

     if(action.equals("ADD"))
        addBean = getAddBean(req);
        ServletContext sc =getServletContext();
        RequestDispatcher rd =sc.getRequestDispatcher(url);
        rd.forward(req,res);
  }

Thanks in Advance.
-Suresh

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to