tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Sanchez" <va...@labein.es>
Subject JBuilder 5 + Tomcat 4.01 very slow!!!
Date Tue, 06 Nov 2001 10:32:44 GMT
Hi all,

I am trying to use JBuilder5 enterprise edition and Tomcat 4.01 to develop
WEB applications.
The problem I have is that running servlets within JBuilder with Tomcat is
very slow

This is the simple code I am using to test:

------------------BEGIN CODE --------------
 public void doGet( HttpServletRequest  request,
                      HttpServletResponse response )
   throws ServletException, IOException
   {
      try
      {
         HttpSession session = request.getSession( true );

         System.out.println("GET received by Servlet");

         String par1 = request.getParameter( "par1" );
         String par2 = request.getParameter( "par2" );

         long tiempo = System.currentTimeMillis();
         System.out.println("Servlet par1 received: " + par1 + "-----" +
tiempo);

         response.setContentType("text/html");
         ServletOutputStream htmlOut = response.getOutputStream();

         tiempo = System.currentTimeMillis();
         System.out.println("After getOutputStream"+ "-----" + tiempo);

         htmlOut.println(
                        "<HTML>\n" +
                        "<BODY>\n" +
                        "This is only an example\n" +
                        "</BODY>\n" +
                        "</HTML>" );

        tiempo = System.currentTimeMillis();
        System.out.println("After htmlOut.println ... CLOSING"+ "-----" +
tiempo);

         htmlOut.close();
         System.out.println("... CLOSED ...");
      }
      catch(Exception e)
      {
         e.printStackTrace();
      }
   } // end doGet
--------------  END CODE  --------------

And the result is (And very quickly):

GET received by Servlet
Servlet par1 received: ryryr-----1005037304533
After getOutputStream-----1005037304533
After htmlOut.println ... CLOSING-----1005037304533
... CLOSED ...

But then, the Web View in JBuilder is not updated until one minute later.
The first time I tried it seemed to me that it was not working correctly.
When I deploy this simple example in Tomcat, it runs OK (Of course).

Maybe the integration JBuilder5 -- Tomcat 4 is not OK.
In fact when I stop Tomcat using the red button in JBuilder,  this message
appears:

Java virtual machine launcher
     Could not find the main class. Program will exit!

Any ideas?
Thanks in advance.

Valen




--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message