Hello everybody,


I am develloping a converter to transform a mainframe application in a Webbased
technology using Oracle8i platform.
My  idea was to use the following scheme:

My Servlet is always componed with the doGet and the doPost methods
the doGet prepare the HTML page
this HTML page contains a form
using the 'SUBMIT' option the page call the same Servlet but using the doPost
method,
this one validate the datas and call a new Servlet with the same principle.

Now my problem and the Servlets codes:

rap01 method doGet builds a HTML RAM0100 which calls rap01.doPost which  calls
rap02 doGet
rap02 method doGet builds a HTML RAM0200 which calls rap02.doPost which calls
rap01 doGet.

When I do that, I get a loop in the Apache Server

I have tested that with 3 and more Servlets, when I call a Servlet back it is
looping ...
otherwise it works great.

Why ?
Who can help me.
Thank you
René Clais

 ----------------------------------------------------------------first Servlet
rap01------------------------------------
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class rap01 extends HttpServlet
{
String screen;
RAM0100 map = new RAM0100();
rap02 nextprocess = new rap02();

public void doGet(  HttpServletRequest requete,
                              HttpServletResponse reponse)
                              throws IOException, ServletException
     {
          reponse.setContentType("text/html");
          PrintWriter pw = reponse.getWriter();

          screen=map.dohtml();  // prepare HTML page

          pw.println(screen);   // send HTML page

     }

public  void doPost(     HttpServletRequest requete,
                              HttpServletResponse reponse)
                              throws IOException, ServletException
     {

          // coming back from the page
          nextprocess.doGet(requete,reponse);


     }


}



----------------------------------------------------------------second Servlet
rap02------------------------------------
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class rap02 extends HttpServlet
{
String screen;
RAM0200 map = new RAM0200();
rap01 nextprocess = new rap01();

public void doGet(  HttpServletRequest requete,
                              HttpServletResponse reponse)
                              throws IOException, ServletException
     {
          reponse.setContentType("text/html");
          PrintWriter pw = reponse.getWriter();

          screen=map.dohtml();  // prepare HTML page

          pw.println(screen);   // send HTML page

     }

public  void doPost(     HttpServletRequest requete,
                              HttpServletResponse reponse)
                              throws IOException, ServletException
     {

          // coming back from the page
          nextprocess.doGet(requete,reponse);


     }


}

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to