Re: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta

2002-06-21 Thread William Au

So how is the performance of Tomcat 4.1.3 comparing to 4.0?

Bill

"Shapira, Yoav" wrote:

> Howdy,
> I know you already solved the problem (was userid).
>
> As an aside, it's a bad idea to unpack 3rd party jars.  You probably
> want to rename classes12.zip to classes12.jar so tomcat will pick it up.
>
> Yoav Shapira
> Millennium ChemInformatics
>
> >-Original Message-
> >From: Victor Popiol [mailto:[EMAIL PROTECTED]]
> >Sent: Thursday, June 20, 2002 4:24 AM
> >To: Tomcat Users List
> >Subject: RE: Tomcat 4 performance issues - Trying Tomcat 4.1.3 Beta
> >
> >Hi. I installed Tomcat 4.1.3 and deployed my application. But I
> >consistently get en error trying to connect to our database. This error
> >only happens in Tomcat 4.1.3.
> >
> >The database is Oracle 8.1.7 and I expanded the classes from the
> >classes12.zip JDBC distributable (as I had done on Tomcat 4.03).
> >
> >The error happens when trying to open the connection. To isolate the
> issue,
> >I wrote a small jsp page that exercise the data source to get the
> >conection. Here it is:
> >
> ><%@ page contentType="text/html"
> >import="javax.naming.*,java.sql.*,javax.sql.*" %>
> >
> >
> ><%
> >   System.out.println("Starting");
> >   Context initCtx = new InitialContext();
> >   Context envCtx = (Context) initCtx.lookup("java:comp/env");
> >   DataSource ds = (DataSource)
> > envCtx.lookup("jdbc/duwi");
> >   if (ds != null) {
> >   System.out.println("Data Source is not null");
> >   Connection conn = ds.getConnection();
> >   conn.close();
> >   }
> >%>
> >Ready!
> >
> >
> >
> >The execution of this jsp throwas the following exception:
> >
> >org.apache.jasper.JasperException
> >   at
> >org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
> ava:
> >232)
> >   at
> >org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289
> )
> >   at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> >   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >   at
> >org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> atio
> >nFilterChain.java:247)
> >   at
> >org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terC
> >hain.java:193)
> >   at
> >org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.j
> >ava:260)
> >   at
> >org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
> invo
> >keNext(StandardPipeline.java:646)
> >   at
> >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 483)
> >   at
> >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >   at
> >org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.j
> >ava:191)
> >   at
> >org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
> invo
> >keNext(StandardPipeline.java:646)
> >   at
> >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 483)
> >   at
> >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >   at
> >org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23
> 49)
> >   at
> >org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:18
> >0)
> >   at
> >org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
> invo
> >keNext(StandardPipeline.java:646)
> >   at
> >org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
> alve
> >.java:170)
> >   at
> >org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
> invo
> >keNext(StandardPipeline.java:644)
> >   at
> >org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:17
> >1)
> >   at
> >org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
> invo
> >keNext(StandardPipeline.java:644)
> >   at
> >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 483)
> >   at
> >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >   at
> >org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .jav
> >a:174)
> >   at
> >org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
> invo
> >keNext(StandardPipeline.java:646)
> >   at
> >org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 483)
> >   at
> >org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >   at
> >org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> >   at
> >org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
> 05)
> >   at
> >org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Conn
> >ection(Http11Protocol.java:376)
> >   at
> >org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 08)
> >   at
> >org.apache.tom

Tomcat 4.0.3 and PoolMan 2.0.4

2002-04-11 Thread William Au

Anyone using Tomcat 4.0.3 with PoolMan 2.0.4?
The Tomcat stop script can't shutdown Tomcat after I added a DataSource
into poolman.xml.
Any idea how I can solve this?

Bill




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: jndi versus database connection pooling

2002-03-14 Thread William Au

I could not find any documentation on how to manage the connection
pool that comes with Tomcat 4.  I want to do things like setting the
minimum and maximum of connections and timeout value.

I don't think this information has been posted on this mailing list either.

Bill

Mark Muffett wrote:

> There's a lot to configure to get it to work.
>
> The coding side seems to be well documented, and there have been several
> instances posted here, but (as far as I can see) we're all working in the
> dark with server.xml.  I've spent a lot of time trying to get database
> pooling to work with Postgresql, but I've failed and given up.  I'd be
> interested to know what database/tomcat configurations anyone has got to
> work - with some sample server.xml fragments if possible.
>
> Mark
>
> - Original Message -
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Thursday, March 14, 2002 6:51 AM
> Subject: Re: jndi versus database connection pooling
>
> >
> >
> > On Thu, 14 Mar 2002, Dave Whitla wrote:
> >
> > > Date: Thu, 14 Mar 2002 16:22:01 +1000
> > > From: Dave Whitla <[EMAIL PROTECTED]>
> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > > To: Tomcat Users List <[EMAIL PROTECTED]>
> > > Subject: Re: jndi versus database connection pooling
> > >
> > > You will need to write a PooledDataSource implementation if your JDBC
> driver
> > > does not ship with one.
> > > AFAIK mm.mysql does not.
> > >
> > > But some one somewhere would have to have done it by now for their own
> > > project.
> > >
> >
> > Tomcat 4 includes a connection pool, and makes it available via JNDI.
> > All you need to supply the JDBC driver for your favorite database, and
> > configure the pool appropriately.  Details are on the
> > "jndi-resources-howto.html" page of the Tomcat documentation webapp
> > (http://localhost:8080/tomcat-docs/).
> >
> > Craig
> >
> >
> > >
> > > - Original Message -
> > > From: "Soefara Redzuan" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, March 14, 2002 4:20 PM
> > > Subject: jndi versus database connection pooling
> > >
> > >
> > > > I am getting very confused. Is JDNI Tomcat's own builtin database pool
> > > > manager or must I still use a database conncetion pool manager such as
> the
> > > > one at www.javaexchange.com ?
> > > >
> > > > Really I would love to have the database connection URL and
> > > > username/password outside of my JSPs and in one place so JNDI looks
> best.
> > > > But I'd also like to use database connection pooling within my JSPs
> and
> > > > Servlets.  How are people doing this with mysql ?
> > > >
> > > > Thank you, Soefara
> > > >
> > > > _
> > > > Get your FREE download of MSN Explorer at
> > > http://explorer.msn.com/intl.asp.
> > > >
> > > >
> > > > --
> > > > To unsubscribe:   
> > > > For additional commands: 
> > > > Troubles with the list: 
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe:   
> > > For additional commands: 
> > > Troubles with the list: 
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   
> > For additional commands: 
> > Troubles with the list: 
> >
>
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: [tyrex-dev] Tomcat 4.0 Tyrex configuration

2001-10-19 Thread William Au

Riad,

Thanks for the info.  I am using Tyrex with Tomcat 4.0.  I do not see any
Tyrex configuration file in the download of Tomcat 4.0.  Where should
this file be if I am to create one?

Is there any documentation on how to use and configure Tyrex with Tomcat 4.0?
Things seem to work but it is not very useable if it is not configurable.

Anyone out there with any comments on using Tyrex for database connections
pooling in general?  I did see some earlier postings stating that connections
are
not being pooled.  But when I look at the source code I see that Tomcat is using

tyrex.jdbc.xa.EnabledDataSource.  So I am not sure if I need to use the
PooledConnectionDataSource myself.

Should I be using something else that is more commonly used (for example,
poolman)?

Bill

Riad Mohammed wrote:

> Hi Bill,
>
> In the Tyrex configuration file the JCA and JDBC connection pool limits are
> specified by:
>
> 
>10 
>0 
>0 
>300 
>10 
>false 
> 
>
> For example to use limits in a JDBC connection pool:
>
> 
> db
> classes12.zip
> oracle.jdbc.xa.client.OracleXADataSource
> 
> url
> user
> password
>   
> 
> 10
> 0
> 0
> 300
> 10
> 
> 
>
> Riad
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, October 18, 2001 10:32 AM
> > To: [EMAIL PROTECTED]
> > Subject: [tyrex-dev] Tomcat 4.0 Tyrex configuration
> >
> >
> > I am running Tomcat 4.0 and would like to use the bundled Tyrex
> > for database connection pooling.  I followed the Tomcat documentation
> > and was able to make things work.
> >
> > But how do I configure Tyres with additional parameters like the
> > maximum number of connections in the pool?
> >
> >
> > Bill
> >
> > ---
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >   unsubscribe tyrex-dev
>
> ---
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe tyrex-dev




Tomcat 4.0 Tyrex configuration

2001-10-18 Thread William Au

I am running Tomcat 4.0 and would like to use the bundled Tyrex
for database connection pooling.  I followed the Tomcat documentation
and was able to make things work.

But how do I configure Tyres with additional parameters like the
maximum number of connections in the pool?


Bill







Tomcat 3.x vs 4.0 - HTTP header names

2001-09-26 Thread William Au

I just noticed that in Tomcat 4.0, the HTTP header names as obtained by
request.getHeaderNames() are all lower case, even if the original header
names being sent are all upper case or mixed case.

It seems to me the Tomcat 4.0 is converting the header names to all lower case.
Tomcat 3.x perserver the original case of the header names.

Is this normal?  Is there anyway to keep the original case of the header names?

Bill




Tomcat 3 vs 4 performace

2001-09-11 Thread William Au

How does Tomcat 4.0 compare to 3.2 in terms of performance?
3.3 has better performance than 3.2.  Is that a worthwhile update
or should I skip to and go to 4.0 directly?

Bill






checking to see if JSP has changed

2001-05-10 Thread William Au

Is there a way to configure Tomcat 3.2.1 so that it only check to see if

a JSP has changed (and therefore needs to be recompiled) at a certain
time interval instead of on every request?

Bill




Re: calling RequestDispatcher.forward() after RequestDispatcher.include()

2001-03-23 Thread William Au

This seems to be caused by a bug in Tomcat 3.2.1.  I looked at the java
code
generated for my JSP.  It call out.flush() at the end.  I think that's why
the
forward() failed.  I then converted example1.jsp from JSPs to servlets but
I am still getting the same Exception.  Moving my code below from a JSP
to a servlet did not help.  I check the Servlet 2.2 spec and it does not
mention
anything about flushing or committing the output when using
RequestDispatcher.include().  Anyone knows if this bug exists in later
version
of Tomcat also.

On a related note.  I noticed that Tomcat always call out.flush() in the
java
code it generates for JSP.  Isn't that a bug?

Bill

William Au wrote:

> I am running Tomcat 3.2.1.
>
> I am getting the following error.
>
> javax.servlet.ServletException: Cannot forward as OutputStream or Writer
> has already been obtained
>
> My code is quite simple.  The jsp that I am including, example1.jsp,
> does not write anything to the
> output buffer.
>
> <%
> RequestDispatcher rd1 =
>   request.getRequestDispatcher("example1.jsp");
> rd1.include(request, response);
>
> RequestDispatcher rd2 =
>   request.getRequestDispatcher("example2.jsp");
> rd2.forward(request, response);
> %>
>
> The Apache Bug Database, bug #250, said this is fixed in 3.2.  Is there
> something
> wrong with my code?
>
> Bill




handling Exception from RequestDispatcher.include() in a JSP

2001-03-21 Thread William Au

I am about to give up on using multiple RequestDispatcher.forward() calls
or using include() then followed by a forward() in a JSP because I can't
make things work no matter what I try.

I guess I will have to use multiple include().  That seems to work as long
as there are no exceptions being thrown by the included JSPs.
When I catch an exception from an included JSP, I want to use
response.sendError() back to the client.  But I am getting the following
exception.

What the best way to handle exception thrown by included JSPs?

Bill
--
Internal Servlet Error:

javax.servlet.ServletException: Response has already been committed
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at javax.servlet.ServletException.(Compiled Code)
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(Compiled
Code)
at
billa._0002fbilla_0002fcontroller_0002ejspcontroller_jsp_2._jspService(_0002fbilla_0002fcontroller_0002ejspcontroller_jsp_2.java:86)

at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled
Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled
Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled
Code)
at java.lang.Thread.run(Compiled Code)

Root cause:

java.lang.IllegalStateException: Response has already been committed
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.lang.RuntimeException.(Compiled Code)
at java.lang.IllegalStateException.(IllegalStateException.java:45)
at
org.apache.tomcat.facade.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:204)

at
org.apache.tomcat.facade.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:196)

at
billa._0002fbilla_0002fcontroller_0002ejspcontroller_jsp_2._jspService(_0002fbilla_0002fcontroller_0002ejspcontroller_jsp_2.java:65)

at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at org.apache.tomcat.core.ContextManager.internalService(Compiled
Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled
Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled
Code)
at java.lang.Thread.run(Compiled Code)

> I am running Tomcat 3.2.1.
>
> I am getting the following error.
>
> javax.servlet.ServletException: Cannot forward as OutputStream or Writer
> has already been obtained
>
> My code is quite simple.  The jsp that I am including, example1.jsp,
> does not write anything to the
> output buffer.
>
> <%
> RequestDispatcher rd1 =
>   request.getRequestDispatcher("example1.jsp");
> rd1.include(request, response);
>
> RequestDispatcher rd2 =
>   request.getRequestDispatcher("example2.jsp");
> rd2.forward(request, response);
> %>
>
> The Apache Bug Database, bug #250, said this is fixed in 3.2.  Is there
> something
> wrong with my code?
>
> Bill




calling RequestDispatcher.forward() after RequestDispatcher.include()

2001-03-21 Thread William Au

I am running Tomcat 3.2.1.

I am getting the following error.

javax.servlet.ServletException: Cannot forward as OutputStream or Writer
has already been obtained

My code is quite simple.  The jsp that I am including, example1.jsp,
does not write anything to the
output buffer.

<%
RequestDispatcher rd1 =
  request.getRequestDispatcher("example1.jsp");
rd1.include(request, response);

RequestDispatcher rd2 =
  request.getRequestDispatcher("example2.jsp");
rd2.forward(request, response);
%>

The Apache Bug Database, bug #250, said this is fixed in 3.2.  Is there
something
wrong with my code?

Bill




Re: Linux-Tomcat-ThreadPool NullpointerException

2001-03-16 Thread William Au

I saw exactly the same thing when I ran a load test on
tomcat 3.2.1 wth jdk 1.2.2_07.  What's your Tomcat
max_thread set to?  I changed it to 10 and the problem
went away.  But I am not happy with the performance
with only 10 threads.

Bill

Bill Graham wrote:

> I'm just getting started with Tomcat and the first
> thing I'm doing
> is some load testing. I'm using VA Linux with Tomcat
> 3.2.1 and the Sun
> j2re1.3 VM. When hitting Tomcat with 60 threads each
> making 1000 requests,
> I periodically will get the following excepion on my
> client machines:
>
> java.net.SocketException: Connection reset by peer:
> Connection reset by peer
>
> and following excepion on hy server machine:
>
> 2001-03-16 03:20:24 - ContextManager: Error reading
> request, ignored -  java.lang.NullPointerException
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection
> (HttpConnectionHandler.java:191)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> at java.lang.Thread.run(Thread.java:484)
>
> Of the 20k requests made, I'll get about 60 errors on
> the first run, which might be
> exceptable but on subsequest runs They's incread up to
> about 150. By the third or
> fourth run, some or all of my client machines will
> hang while waiting for responses.
> This is not acceptable. I'm about to start diggin into
> the tomcat source but would
> love it if someone has solved (or knows how to soleve)
> this problem already.
>
> anyone?
>
> - bill
>
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/




turn off HTTP session at server level

2001-03-14 Thread William Au

I am running Tomcat 3.2.1.

Is there any way to turn off HTTP sessions at the server level?

I want to avoid putting the page directive <%@ page session="false" %>
in every single one of my page.

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: NullPointerException

2001-03-14 Thread William Au

Thanks for the reply.  But I am sure the NullPointerException is coming
from within Tomcat.  I got them while accessing a static page with
no JSP code.  So how do I test if pointers with "x.equals(null)"???
The exceptions do not show up when I access the page manually
through a browser.  They come when I run a load test and multiple
clients issuing requests at the same time.

Bill

Martin Smith wrote:

> Bryan--
>
> A NullpointerException is about the most common error message you can get in
> Java--right up there will classpath problems ("class not found.")Basic
> problem is you're not providing enough info for people to help.
>
> That said, if you are trying to access variables in the request object, it's easy
> to get the nullpointer exception if the parameter isn't there (not provided by the
> form or URL.)  Basically, you have to test each one for x.equals(null) before
> proceeding.
>
> A shot in th dark, but at least a reply, right?  
>
> mfs
>
> Bryan Murtha wrote:
>
> > I've posted this same question several times and no one has ever bothered to
> > reply. I guess they don't know?
> >
> > Original Message Follows
> > From: William Au
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: NullPointerException
> > Date: Mon, 12 Mar 2001 16:08:03 -0500
> > I am running Tomcat 3.2.1 standalone. I am getting a ton of errors in
> > tomcat.log:
> > 2001-03-12 12:12:57 - ContextManager: Error reading request, ignored -
> > java.lang.NullPointerException
> > at
> > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled
> > Code)
> > at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
> > Code)
> > at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
> > at java.lang.Thread.run(Compiled Code)
> > Any idea???
> > These errors came while a static page (no JSP code at all) was being
> > accessed.
> > Does that matter?
> > Bill
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> > _
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: NullPointerException

2001-03-14 Thread William Au

I changes my max_thread from 50 to 10 and the exceptions went away.
But I am not happy with the performance of 10 threads.  How high
can I go?  What is the default value if none is specified in server.xml?

Bill


> I am running Tomcat 3.2.1 standalone.  I am getting a ton of errors in
> tomcat.log:
>
> 2001-03-12 12:12:57 - ContextManager: Error reading request, ignored -
> java.lang.NullPointerException
> at
> org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled
> Code)
> at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
> Code)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
> at java.lang.Thread.run(Compiled Code)
>
> Any idea???
> These errors came while a static page (no JSP code at all) was being
> accessed.
> Does that matter?
>
> Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




NullPointerException

2001-03-12 Thread William Au

I am running Tomcat 3.2.1 standalone.  I am getting a ton of errors in
tomcat.log:

2001-03-12 12:12:57 - ContextManager: Error reading request, ignored -
java.lang.NullPointerException
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled
Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)

Any idea???
These errors came while a static page (no JSP code at all) was being
accessed.
Does that matter?

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




disbale sessions in Tomcat

2001-03-06 Thread William Au

Is there a way to disable sessions in Tomcat?
Do I just remove the entries for the request.SessionInterceptor and
session.StandardSessionInterceptor from server.xml?

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




pre-initialize SecureRandom

2001-03-06 Thread William Au

Is there any way to use   to pre-initialize the secure
random number generator used by Tomcat to generate session id?




Bill




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




starting additional "services" with Tomcat

2001-03-02 Thread William Au

I am using Tomcat 3.2.1 on Solairs.

I have some Java code to start a RMI registry that I want to make
available
to all webapps.  In stead of having to run yet another process, I want
it
to run inside Tomcat's JVM.  What is the best way to do this?  Can I add

an entry in server.xml to cause Tomcat to run my code at startup?
Since I am not sure if that can be done, currently, I am thinking of
puting
my code inside a servlet and use the load-on-startup feature.

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




JNDI DataSource lookup and Tomcat 3.2.1

2001-02-22 Thread William Au

I want to use JNDI DataSource lookup with Tomcat 3.2.1.
I am going to need a JNDI service provider.  I see that a few
different ones are available form java.sun.com.  Is there
a particular one that works best with Tomcat?

Bill




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: JSP quoting and escape conventions

2001-02-20 Thread William Au

Yes, I see what you mean.  I guess it is a matter of what happen first.
If the escape happens first, then the JSP

<% String foo = "testing %\>"; %>

would be translate to the following java code

String foo = "testing %>";

Then it would be valid java code.

However, it seems to me in Tomcat, the translation happens first so the
following
invalid java code is generated:

String foo = "testing %\>";


Bill

"Craig R. McClanahan" wrote:

> William Au wrote:
>
> > I was inside a scriplet, setting up a string that contains the character
> > "%>":
> >
> > <%
> > String foo = "testing %\>";
> > %>
> >
> > I ended up doing:
> >
> > <%
> > String foo = "testing %" + ">";
> > %>
> >
> > But the first code segment should work according to the JSP 1.1 spec.
> >
>
> Except for a second requirement -- that the code you include in
> scriptlets
> needs to conform to the syntax and semantic requirements of the
> scripting
> language (Java, in this case).  In the JSP 1.2 spec, that's in Section
> 6.1; I
> don't have the 1.1 spec in front of me, but I believe that it contained
> similar language.
>
> >
> > Bill
>
> Craig
>
> >
> > "Craig R. McClanahan" wrote:
> >
> > > William Au wrote:
> > >
> > > > I am having trouble with quoting in scripting elements with Tomcat
> > > > 3.2.1.
> > > >
> > > > "%\>" does not work for quoting "%>" as defined in section 2.4 for
> > > > JSP 1.1 spec.
> > > >
> > > > Any way to get around it?
> > > >
> > >
> > > Where are you trying to use this escape?
> > >
> > > If you are inside a string literal in a scriptlet, you should be aware
> > > that "\%" is not legal syntax for a Java string, so you are still going
> > > to have problems.
> > >
> > > >
> > > > Bill
> > > >
> > >
> > > Craig McClanahan
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, email: [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: JSP quoting and escape conventions

2001-02-20 Thread William Au

I was inside a scriplet, setting up a string that contains the character
"%>":

<%
String foo = "testing %\>";
%>

I ended up doing:

<%
String foo = "testing %" + ">";
%>

But the first code segment should work according to the JSP 1.1 spec.

Bill

"Craig R. McClanahan" wrote:

> William Au wrote:
>
> > I am having trouble with quoting in scripting elements with Tomcat
> > 3.2.1.
> >
> > "%\>" does not work for quoting "%>" as defined in section 2.4 for
> > JSP 1.1 spec.
> >
> > Any way to get around it?
> >
>
> Where are you trying to use this escape?
>
> If you are inside a string literal in a scriptlet, you should be aware
> that "\%" is not legal syntax for a Java string, so you are still going
> to have problems.
>
> >
> > Bill
> >
>
> Craig McClanahan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




JSP quoting and escape conventions

2001-02-20 Thread William Au

I am having trouble with quoting in scripting elements with Tomcat
3.2.1.

"%\>" does not work for quoting "%>" as defined in section 2.4 for
JSP 1.1 spec.

Any way to get around it?

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: RequestDispatcher.forward() in Tomcat 3.2.1

2001-02-16 Thread William Au

You are right.  Control does return to the calling servlet.  It just couldn't
write to the response.  It would be nice if an exception was thrown.

After control returns to the calling servlet, I try forwarding to a second
servlet and that doesn't seem to work.  The first servlet that was forwarded
to did not change the response.

Is multiple forward within a servlet not supported/allowed?

Bill

"Craig R. McClanahan" wrote:

> William Au wrote:
>
> > Is there any way in Tomcat 3.2.1 for the control to return to a servlet
> > after its
> > call to RequestDispatcher.forward() is completed?
>
> Control *does* return -- RequestDispatcher.forward() is a normal Java
> method call.
>
> However, the servlet spec prohibits you from modifying the response at this
> point.  If Weblogic lets you do this (for instance, by allowing you to add
> additional text to the response created by the forwarded-to servlet), then
> it is not obeying the spec.
>
> >  That is the behavior
> > of
> > WebLogic 5.1.0.  I want my code to work on the same way running under
> > both.   I am aware of the RequestDispatcher.include() method.
> >
> > Bill
> >
>
> Craig McClanahan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RequestDispatcher.forward() in Tomcat 3.2.1

2001-02-15 Thread William Au

Is there any way in Tomcat 3.2.1 for the control to return to a servlet
after its
call to RequestDispatcher.forward() is completed?  That is the behavior
of
WebLogic 5.1.0.  I want my code to work on the same way running under
both.   I am aware of the RequestDispatcher.include() method.


Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: checking and recompiling JSPs

2001-02-01 Thread William Au

I played with the reloadable flag in the context in sever.xml.  It only
affects my servlets but seems to have no effect on my JSPs.
I think the reloadable flag only affects classes in WEB-INF/classes.
That would explain why it doesn't work on JSP.  Can anyone confirm
that?

Bill

"Morahg, Yoav" wrote:

> Does the reloadable flag have anything to do with recompiling jsps or is it
> just related to reloading classes when they change?
>
> -Yoav
>
> -Original Message-
> From: Stefan Langer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: checking and recompiling JSPs
>
> To prevent tomcat from recompiling the jsp pages just set the reloadable
> flag in the context to false.
>
> You can find the context in the server.xml file located in the conf
> directory under your tomcat installation. Just look at the other
> contexts for an example.
>
> Stefan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




checking and recompiling JSPs

2001-02-01 Thread William Au

Does Tomcat check the timestamp of a JSP on each request to see if it
needs
to be recompiled?  Is there anyway to turn this off on a production site
where
the JSPs are not changing?

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: API for org.apache.* classes

2001-01-26 Thread William Au

I find them under $TOMCAT_HOME/webapps/ROOT/javadoc.
I am using the source distribution.  Not sure if this is true for the binary
distribution as well.

Bill

Ratnadeep Bhattacharjee wrote:

> Hello,
>
> Could someone please tell me where I could find the javadocs for the
> org.apache.* classes. I downloaded jakarta-tomcat-3.2.1 (binary) but could not
> find them in the accompanying docs.
>
> Thanks.
> -Deep.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: dtd for Tomcat 3.2.1's server.xml

2001-01-24 Thread William Au

I would very much like to see a DTD for each release build.  Release builds
are "ready for prime time" so they should be relatively stable.

Either that or better documentation on the configuration parameters.

Bill

Thom Park wrote:

> Hi Alex,
>
> I wrestled with this one as well - I'd like to see a DTD for server.xml as also The
> problem is that, as various connectors/interceptors/valves/whoknowswhat are added to
> tomcat during a development cycle, the parameters can change tremendously.
>
> e.g. there was a marked change in the 'shape' of the contexts between the tomcat
> 3.2.b4 and the final 3.2 production.
>
> Ideally, this could be managed by having different versions of a DTD for each
> release/revision of tomcat. The restriction is that some of the current
> freedom for 'interceptor' implementors would be lost - you couldn't just change the
> parameters to an interceptor on a whim - you'd now need to submit revisions to the 
>DTD
> for server.xml thereby adding one extra step to the development cycle.
>
> What do others think - should we consider locking down a DTD for each release of
> tomcat that matches the 'current' defintion for all of the components?
>
> I think it's possible and desirable, it just adds a level of complexity to the 
>rollout
> of new functionality
> Comments?
>
> -Thom
>
> Alex Fernández wrote:
>
> > I cannot understand why there can be no DTD. Yes, the contents may be variable and
> > extensible, but that's what XML is -- eXtensible.
> >
> > At least for closed versions, it should be possible to define the grammar used
> > therein; otherwise what is the advantage of using XML? Since my experience with it
> > is very limited, I'm probably missing something important here.
> >
> > Cheers,
> >
> > Alex.
> >
> > "Craig R. McClanahan" wrote:
> >
> > > William Au wrote:
> > >
> > > > Is the dtd for Tomcat 3.2.1's server.xml available somewhere?
> > > >
> > >
> > > There is no DTD available for this file, and there cannot be -- the sets of
> > > elements and attributes (by Tomcat) supported in this file are variable and
> > > extensible, and cannot be encoded in a DTD.
> > >
> > > It won't help you for 3.2.1, but Tomcat 4 has (currently incomplete but getting
> > > there) extensive documentation on the configuration directives it supports.
> > >
> > > >
> > > > Bill
> > > >
> > >
> > > Craig McClanahan
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, email: [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Benchmarking

2001-01-24 Thread William Au

Don't you mind sharing your results with the Tomcat users community by
posting
them to this mailing list?

Bill

Oleg Timofeyev wrote:

> Hey guys,
>
> Well now that I installed TOMCAT, ORION and JRUN I would like to benchmark
> those. Anyone knows of good benchmarking solutions for java servers, maybe
> some ready results as well, but I like to run those myself as ppl have a
> tendency to be bios :)
> thank you
> --
> --
> Oleg Timofeyev
> ReadySetNet
> [EMAIL PROTECTED]
> http://www.readysetnet.com
> Phone : 323 469 2000
> Fax : 323 469 2155
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: startup class in Tomcat

2001-01-23 Thread William Au

The way I understand it, load-on-startup will only work on a servlet, and
only the init() method is called.  What I have now is a generic Java
class.
So I will have to convert it into a servlet and put most of the code
inside
init().  I was just trying to see if I can use my class as-is.

Bill

Michael Wentzel wrote:

> > Besides setting load-on-startup in the web.xml file, is there another
> > way
> > to have a startup class define in Tomcat? ( ie I want a class to run
> > whenever
> > Tomcat is started)
>
> Sounds to me like load-on-startup is what you need...  Is there
> some reason this does not fit your needs?
>
> ---
> Michael Wentzel
> Software Developer
> http://www.aswethink.com">Software As We Think
> mailto:[EMAIL PROTECTED]">Michael Wentzel
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




startup class in Tomcat

2001-01-23 Thread William Au

Besides setting load-on-startup in the web.xml file, is there another
way
to have a startup class define in Tomcat? ( ie I want a class to run
whenever
Tomcat is started)

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: accessing configuration info in server.xml?

2001-01-22 Thread William Au

I don't have the need for it yet but thought that it might be useful if
I can get
configuration information (like the port number).  Do I need the dtd in
order
to parse server.xml myself?  I have not been able to locate a copy of the
dtd
for server.xml.

Bill


"Craig R. McClanahan" wrote:

> William Au wrote:
>
> > Is there anyway for a JSP or servlet running under Tomcat to ask for
> > configuration information set inside server.xml?
>
> Not directly (although of course you could parse it yourself).
>
> Is there something in particular you are interested in finding out?
>
> >
> > Bill
>
> Craig McClanahan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




dtd for Tomcat 3.2.1's server.xml

2001-01-22 Thread William Au

Is the dtd for Tomcat 3.2.1's server.xml available somewhere?


Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Multiple Tomcat instances on one machine

2001-01-17 Thread William Au

This is not the case for me.  I have verified which work directory is being
used by removing everything in the work directory at both the top level
and the instance level before starting Tomcat.  After starting Tomcat,
I noticed that the top level work directory is being used.  I can get around
that by setting the workDir attribute for the ContextManager in server.xml.
But now I need to customize the other configuration files in conf for each
instance.

By the way, I am running Tomcat 3.2.1 on Solaris 7.

Bill

Kitching Simon wrote:

> > -Original Message-
> > From: William Au [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 17, 2001 3:42 PM
> > To:   [EMAIL PROTECTED]
> > Cc:   Kitching Simon
> > Subject:  Re: Multiple Tomcat instances on one machine
> >
> > Besides server.xml, how do I setup Tomcat so that each instance has its
> > own copy
> > of the other configuration files (tomcat-users.xml, workers.properties,
> > etc) in conf?
> > I don't see anyway of setting the path to the conf directory.  Is that
> > always based on
> > $TOMCAT_HOME?
> >
> > Bill
> [Kitching Simon]
> I have noticed that merely by specifying the -f flag for the
> server.xml,
> the work directory is assumed to be at location ../work relative to
> the server.xml file. As I don't use any other config files (though
> the
> work directory location is significant for me), this does the job.
>
> I presume that all the other config files are looked for in the same
> directory as the server.xml file. Is this not the case??
>
> > ---
> >
> >
> > Hi William,
> >
> > Tomcat *can* share binaries across multiple running instances.
> > However, as I found the docs a bit confusing when I tried to
> > get this working, here's how to do it:
> >
> > create the following directory structure for each instance (eg under
> > each user's home directory if you want an instance per user):
> >
> > somedirname
> >   + conf
> >  + server.xml
> >   + work
> >
> > Start tomcat with the -f option, specifying the appropriate server.xml:
> >
> > $TOMCAT_HOME/bin/tomcat.sh start -f /somedirname/conf/server.xml
> >
> > I use a single  tag with an absolute docBase
> > in the server.xml to indicate where the webapp's files are,
> > but I guess you could create a webapps directory as a sibling
> > to the "conf" directory to hold webapps. I guess that you can
> > also point multiple instances to the same docBase - but
> > haven't tried it.
> >
> > Cheers,
> >
> > Simon
> > > -Original Message-
> > > From: William Au [SMTP:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 11, 2001 3:10 PM
> > > To:   [EMAIL PROTECTED]
> > > Subject:  Multiple Tomcat instances on one machine
> > >
> > > I would like to run multiple Tomcat instances on one machine, each
> > using
> > > a different
> > > port number.  Do I need to have a seperate, full copy ofTOMCAT_HOME
> > for
> > > each
> > > instance?  Or can I just have one common set of binaries with multiple
> >
> > > server.xml
> > > and other configuration files?
> > >
> > > Bill
> > >


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




native_lib in jni_server.xml

2001-01-17 Thread William Au

 The native_lib parameter in my jni_server.xml has an value that is
Windows specific.
What should it be for Solaris?

  





Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Multiple Tomcat instances on one machine

2001-01-17 Thread William Au

Besides server.xml, how do I setup Tomcat so that each instance has its
own copy
of the other configuration files (tomcat-users.xml, workers.properties,
etc) in conf?
I don't see anyway of setting the path to the conf directory.  Is that
always based on
$TOMCAT_HOME?

Bill

---


Hi William,

Tomcat *can* share binaries across multiple running instances.
However, as I found the docs a bit confusing when I tried to
get this working, here's how to do it:

create the following directory structure for each instance (eg under
each user's home directory if you want an instance per user):

somedirname
  + conf
 + server.xml
  + work

Start tomcat with the -f option, specifying the appropriate server.xml:

$TOMCAT_HOME/bin/tomcat.sh start -f /somedirname/conf/server.xml

I use a single  tag with an absolute docBase
in the server.xml to indicate where the webapp's files are,
but I guess you could create a webapps directory as a sibling
to the "conf" directory to hold webapps. I guess that you can
also point multiple instances to the same docBase - but
haven't tried it.

Cheers,

Simon
> -Original Message-
> From: William Au [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, January 11, 2001 3:10 PM
> To:   [EMAIL PROTECTED]
> Subject:  Multiple Tomcat instances on one machine
>
> I would like to run multiple Tomcat instances on one machine, each
using
> a different
> port number.  Do I need to have a seperate, full copy ofTOMCAT_HOME
for
> each
> instance?  Or can I just have one common set of binaries with multiple

> server.xml
> and other configuration files?
>
> Bill
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




accessing configuration info in server.xml?

2001-01-16 Thread William Au

Is there anyway for a JSP or servlet running under Tomcat to ask for
configuration information set inside server.xml?


Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




precompile JSP with jspc & picking up changes in JSP source

2001-01-16 Thread William Au

I noticed that if I precompile JSP with jspc and setup servlet mapping
in web.xml,
changes to the original JSP file will not be picked up by Tomcat.  Can I
have both
or are they mutually exclusive?


Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Multiple Tomcat instances on one machine

2001-01-11 Thread William Au

Thanks for the info.  I was able to get things to work.  I also setup
seperate logs and webapps directories.

Bill

Kitching Simon wrote:

> Hi William,
>
> Tomcat *can* share binaries across multiple running instances.
> However, as I found the docs a bit confusing when I tried to
> get this working, here's how to do it:
>
> create the following directory structure for each instance (eg under
> each user's home directory if you want an instance per user):
>
> somedirname
>   + conf
>  + server.xml
>   + work
>
> Start tomcat with the -f option, specifying the appropriate server.xml:
>
> $TOMCAT_HOME/bin/tomcat.sh start -f /somedirname/conf/server.xml
>
> I use a single  tag with an absolute docBase
> in the server.xml to indicate where the webapp's files are,
> but I guess you could create a webapps directory as a sibling
> to the "conf" directory to hold webapps. I guess that you can
> also point multiple instances to the same docBase - but
> haven't tried it.
>
> Cheers,
>
> Simon
> > -Original Message-
> > From: William Au [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, January 11, 2001 3:10 PM
> > To:   [EMAIL PROTECTED]
> > Subject:  Multiple Tomcat instances on one machine
> >
> > I would like to run multiple Tomcat instances on one machine, each using
> > a different
> > port number.  Do I need to have a seperate, full copy ofTOMCAT_HOME for
> > each
> > instance?  Or can I just have one common set of binaries with multiple
> > server.xml
> > and other configuration files?
> >
> > Bill
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Multiple Tomcat instances on one machine

2001-01-11 Thread William Au

I would like to run multiple Tomcat instances on one machine, each using
a different
port number.  Do I need to have a seperate, full copy ofTOMCAT_HOME for
each
instance?  Or can I just have one common set of binaries with multiple
server.xml
and other configuration files?

Bill


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: anyone using ajp13 protocol with mod_jk?

2001-01-02 Thread William Au

By "webapp work files" do you mean directories and files under $TOMCAT/work?
Those directories and files are generated by tomcat.  I am running tomcat 3.2.1 as
root.  So They are all owned by root.

Am I not supposed to run Tomcat 3.2.1 as root when using the ajp13 protocol?

Bill

Tom Woteki wrote:

> I was having what seems to have been a similar problem though I can't say
> for sure because I didn't have my logs set up the way you appear to have. In
> any case, the root problem for me was that the permissions on my webapp work
> files were set to root. Upon setting ownership recursively to me everything
> with ajp13 seems to be working well.
>
> --
> Tom Woteki, a.k.a. Dr. Wo
> mail to:<[EMAIL PROTECTED]>
> 202-544-2743 (fax)
> > From: William Au <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > Date: Thu, 28 Dec 2000 18:42:09 -0500
> > To: [EMAIL PROTECTED]
> > Subject: anyone using ajp13 protocol with mod_jk?
> >
> > Is anyone actually using the ajp13 protocol with mod_jk?
> > I tried it but had to switch back to ajp12.  It seems faster
> > but less reliable.  I am getting the following error messages
> > in mod_jk.log.  All these messages occur multiple
> > times.  They only occur when I use the ajp13 protocol.
> >
> > In mod_jk.log:
> >
> > [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 145
> > [jk_ajp13_worker.c (173)]: In jk_endpoint_t::connect_to_tomcat, failed
> > errno = 145
> > [jk_ajp13_worker.c (584)]: Error connecting to the Tomcat process.
> > [jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed
> >
> > In tomcat.log:
> >
> > 2000-12-28 04:04:07 - Ctx( /examples ): Exception in: R( /examples +
> > /10k.jsp + null) - java.lang.NullPointerException
> >   at _0002f_00031_00030k_0002ejsp10k_jsp_0._jspService(Compiled
> > Code)
> >   at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
> >   at javax.servlet.http.HttpServlet.service(Compiled Code)
> >   at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled
> > Code)
> >   at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled
> > Code)
> >   at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
> >   at javax.servlet.http.HttpServlet.service(Compiled Code)
> >   at org.apache.tomcat.core.ServletWrapper.doService(Compiled
> > Code)
> >   at org.apache.tomcat.core.Handler.service(Compiled Code)
> >   at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
> >   at
> > org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
> >   at org.apache.tomcat.core.ContextManager.service(Compiled Code)
> >   at
> > org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(C
> > ompiled
> > Code)
> >   at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
> > Code)
> >   at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
> >   at java.lang.Thread.run(Compiled Code)
> >
> > Bill
> >


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




anyone using ajp13 protocol with mod_jk?

2000-12-28 Thread William Au

Is anyone actually using the ajp13 protocol with mod_jk?
I tried it but had to switch back to ajp12.  It seems faster
but less reliable.  I am getting the following error messages
in mod_jk.log.  All these messages occur multiple
times.  They only occur when I use the ajp13 protocol.

In mod_jk.log:

[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 145
[jk_ajp13_worker.c (173)]: In jk_endpoint_t::connect_to_tomcat, failed
errno = 145
[jk_ajp13_worker.c (584)]: Error connecting to the Tomcat process.
[jk_ajp13_worker.c (325)]: Error ajp13_process_callback - write failed

In tomcat.log:

2000-12-28 04:04:07 - Ctx( /examples ): Exception in: R( /examples +
/10k.jsp + null) - java.lang.NullPointerException
at _0002f_00031_00030k_0002ejsp10k_jsp_0._jspService(Compiled
Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled
Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at
org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Compiled
Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)


Bill




Re: Status of overall Tomcat performance

2000-12-27 Thread William Au

I have found that Tomcat 3.2.1 is much faster than 3.1.  Have not
try 4.0 though.

Bill

Charles Forsythe wrote:

> I've read several places (see link below) that "Tomcat is the slowest
> Servlet Engine you can run."  Is this still true?  What are the
> prospects for Tomcat 4.0 improving speed?
>
> -- Charles
>
> http://slashdot.org/comments.pl?sid=00/11/30/180246&threshold=-1&pid=45#54






NullPointerException

2000-12-11 Thread William Au

I am getting the following with Tomcat 3.2 but things seem to work.
Should I worry?

java.lang.NullPointerException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.lang.RuntimeException.(Compiled Code)
at java.lang.NullPointerException.(Compiled Code)
at java.util.Hashtable.put(Compiled Code)
at
org.apache.jasper.runtime.PageContextImpl.setAttribute(Compiled Code)
at
org.apache.jasper.runtime.PageContextImpl._initialize(Compiled Code)
at org.apache.jasper.runtime.PageContextImpl.initialize(Compiled
Code)
at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Compiled Code)
at _0002f_00031_00030k_0002ejsp10k_jsp_0._jspService(Compiled
Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled
Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at
org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled
Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)


Bill




problem with max_threads > 100

2000-12-08 Thread William Au

I am getting the following exceptions when I set the max_threads
parameter to
256.  I am using Tomcat 3.2 standalone with the PoolTcpConnector.
I looked at
the source code of jasper.runtime.JspFactoryImpl and discovered that it
is
hard-coding 100 to be the size of a SimplePool it uses internally.

public class JspFactoryImpl extends JspFactory {
private SimplePool pool=new SimplePool( 100 );
private static final boolean usePool=true;
...
}

Is there any way to get around this problem?  Or is 100 the upper-bound
for
max_threads?

Bill

java.lang.ArrayIndexOutOfBoundsException: 100
at org.apache.tomcat.util.SimplePool.get(Compiled Code)
at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(Compiled Code
)
at _0002f_00031_00030k_0002ejsp10k_jsp_2._jspService(Compiled
Code)
at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compil
ed Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled
Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(Compiled
Code)
at org.apache.tomcat.core.Handler.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
at
org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)






ContextManager:SocketException reading request, ignored???

2000-12-04 Thread William Au

I just finished building the production release of Tomcat 3.2.
Everything seems to work
but I keep getting the following Java exception.  I have been told this
is caused by the
client disconnecting too soon.  But I am the only one accessing the
server, and I know
for sure that I did not hit the "stop" button on the browser.  I even
tried the binary release
of Tomcat 3.2 but got the same results.

This seems to occur when I request a URL for a directory that gets
translated to an
"index.html".  For example, if I go to "http://localhost:8080/examples",
I will also get
the Java exception when I click on either "jsp" or "servlets" (both get
translated to
it respective index.html) but not when I click on "images" (which gives
a directory
listing since there is no index.html).  I can generate the Java
exception by placing
an "index.html" under the "images" directory.

Is there anyway for me to get rid of these error messages.  Even though
they are harmless,
if too many of them show up, they will "crowd" out the harmful ones that
require
attention.  Besides, they would increase the size of the log file
unnecessarily.

Bill

2000-12-04 03:42:46 - ContextManager: SocketException reading request,
ignored - java.net.SocketException: Connection reset by peer
at java.net.PlainSocketImpl.socketAvailable(Native Method)
at java.net.PlainSocketImpl.available(PlainSocketImpl.java:429)
at
java.net.SocketInputStream.available(SocketInputStream.java:141)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled
Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled
Code)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)





Tomcat 3.2 availability

2000-10-24 Thread William Au

Any idea when the release build of Tomcat 3.2 will be available?

Bill