RE: can tomcat give me page loadtime stats?

2003-10-09 Thread Jay Glanville
Good.  Thanks.  Now, a little help is requested in how to use
AccessLogValue.  (and now that I read the first answer, I realize that I
might not have phrased my question as unambiguously as possible).

I'd like to have the following information logged:
   page x took y milliseconds to create (or something like that)

According to
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/ap
ache/catalina/valves/AccessLogValve.html, I would use %U for x (the
page's URL), but what would I use for y (the amount of time it took to
create the page)?  %t only gives me the date and time it was requested,
not how long it took Tomcat to calculate the page's contents.

Thanks

JDG


> See the AccessLogValve javadocs.
> 
> -Tim
> 
> Glanville, Jay wrote:
> 
> > Is there a way for tomcat to give me information on how 
> long it takes 
> > to load a page?
> > 
> > I have a web application upon which I wish to improve it's 
> > performance. Before I can do any attempts at improvement, I 
> need a way 
> > to measure its performance.  One of the ways that I was considering 
> > measuring this delta was to see how long Tomcat takes to 
> load a page.
> > 
> > Can tomcat product this information for me (configuration 
> setting, log 
> > files, etc)?  Or do I need to manually add timestamp information to 
> > the top and bottom of my page templates?
> > 
> > Suggestions appreciated.



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



RE: can tomcat give me page loadtime stats?

2003-10-09 Thread Jay Glanville
I have a feeling that these variables (%D and %T) are not available in
4.1.12 as they don't actually resolve to anything in the access log.  I
can determine that they were added in AccessLogValue (ver 1.3), but I
don't know what the CVS tag is for version 4.1.12 (ver 1.3 has these
tags: s1ap8_i3, s1ap8_i2, s1ap8_i1, jwsdp_12__02, jwsdp_12__01,
TOMCAT_5_0_2, TOMCAT_5_0_1)

Thanks for you help.

JDG

> D'oh! The catalina javadocs are out of date (but not by much) 
> on the website. 
> In your local version of the javadoc, there should be the following:
> 
> %D - Time taken to process the request, in millis
> %T - Time taken to process the request, in seconds
> 
> -Tim
> 
> 
> Jay Glanville wrote:
> 
> > Good.  Thanks.  Now, a little help is requested in how to use 
> > AccessLogValue.  (and now that I read the first answer, I 
> realize that 
> > I might not have phrased my question as unambiguously as possible).
> > 
> > I'd like to have the following information logged:
> >page x took y milliseconds to create (or something like that)
> > 
> > According to 
> > 
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/
> > ap
> > ache/catalina/valves/AccessLogValve.html, I would use %U for x (the
> > page's URL), but what would I use for y (the amount of time 
> it took to
> > create the page)?  %t only gives me the date and time it 
> was requested,
> > not how long it took Tomcat to calculate the page's contents.
> > 
> > Thanks
> > 
> > JDG
> > 
> > 
> > 
> >>See the AccessLogValve javadocs.
> >>
> >>-Tim
> >>
> >>Glanville, Jay wrote:
> >>
> >>
> >>>Is there a way for tomcat to give me information on how
> >>
> >>long it takes
> >>
> >>>to load a page?
> >>>
> >>>I have a web application upon which I wish to improve it's
> >>>performance. Before I can do any attempts at improvement, I 
> >>
> >>need a way
> >>
> >>>to measure its performance.  One of the ways that I was considering
> >>>measuring this delta was to see how long Tomcat takes to 
> >>
> >>load a page.
> >>
> >>>Can tomcat product this information for me (configuration
> >>
> >>setting, log
> >>
> >>>files, etc)?  Or do I need to manually add timestamp information to
> >>>the top and bottom of my page templates?
> >>>
> >>>Suggestions appreciated.
> > 
> > 
> > 
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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



RE: [OFF-TOPIC] Ant

2003-10-09 Thread Jay Glanville
You have things in the wrong order: ant doesn't over-ride in a later
format.  The first time a variable is defined, that's when it's set.

For example:


...


Will print out john.

Therefore, in your example, all three will be read.  When a variable is
defined, it stays that way and usually (note: exceptions are  and
, see documentation) can't be changed.

JDG


> -Original Message-
> From: Jay Garala [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 09, 2003 12:26 PM
> To: [EMAIL PROTECTED]
> Subject: [OFF-TOPIC] Ant  
> 
> If I have
>  
> 
> 
> 
> 
> in my build.xml, will ant use the first found property file 
> or use all found and override existing with latter found?
>  
> Jay Garala
> Senior Analyst
> Electrosoft Services, Inc.
> 7918 Jones Branch Drive, Suite 600
> McLean, VA  22102
> (703) 918-4907
>  
> 



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



RE: What version of tomcat am I using?

2004-05-06 Thread Jay Glanville
Thanks.

However, isn't this only useful from _within_ the web application?  I
mean, I can only execute this method from within an executing web app
(It's not a static method, therefore, the ServletContext needs to be
instantiated by a running instance of Tomcat.)

I need the tomcat version from a script _outside_ of tomcat.  My script
is an upgrade script, and thus probably isn't going to be executed from
within the web application.

Thanks for the attempt though.

JDG

--
Jay Glanville


> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 06, 2004 11:26 AM
> To: Tomcat Users List
> Subject: Re: What version of tomcat am I using?
> 
> 
> http://jakarta.apache.org/tomcat/faq/misc.html#version
> 
> Glanville, Jay wrote:
> > Is there a way to programmatically determine what version 
> of tomcat is
> > installed on my system?  The situation is this: I'm writing 
> an upgrade
> > script for my application, and if the version of tomcat is 
> 4.x, then I
> > need to shutdown, install tomcat 5, configure tomcat 5 and 
> then startup
> > tomcat 5.  If the version on the system is tomcat 5, then don't do
> > anything.
> > 
> > Normally, most applications have a "--version" command line 
> parameter
> > (e.g.: java -version gives me text that matches the regex 
> "1.4.2_02").
> > Is there a way that I can execute a command to tell me the tomcat
> > version?  If not through the tomcat program, is there a 
> version number
> > stored in a text / configuration file that I can grep?  
> Failing that,
> > how can I tell (programmatically) what version of tomcat I have?
> > 


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



RE: What version of tomcat am I using?

2004-05-06 Thread Jay Glanville
> 
> On Thu, May 06, 2004 at 10:08:51AM -0400, Glanville, Jay wrote:
> : Is there a way to programmatically determine what version 
> of tomcat is
> : installed on my system?
> 
> method:
>   org/apache/catalina/util/ServerInfo.getServerInfo()
> 
> and resource bundle:
>   /org/apache/catalina/util/ServerInfo.properties
> 
> I haven't actually *tried* them, though -- these are results
> of a source grep.
> 
> -QM

Ah, the latter looks useable, although requires a little more jumping
through hoops then I was hoping for.  Baring any easier solutions, I'll
start using that property file.

Thanks.

JDG

--
Jay Glanville



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



Problems running pre-compiled JSP classes when in subdirectories

2004-01-07 Thread Jay Glanville
I originally posted this question back in mid-December, but without any
responses.  In the hopes that someone will have a hit or a solution, I'm
reposting the question again.


I'm having a problem when I try to use my pre-compiled JSP files: I
receive a NoClassDefFoundError exception.  Here's what I'm doing ...

I have pre-compiled my JSP classes using the JspC plugin from ant.  My
files compile without complaint.  However, when I try to access the
files through tomcat, I receive some NoClassDefFoundError exceptions.
But these exceptions only occur when I'm accessing JSPs in the
subdirectories off of the web root.

Here's my application's background.  I have two files:
  /index.jsp
  /dir/index.jsp
The contents of the two files are just simple HTML.  I precompiled the
JSP using the JspC ant target, then compiled using javac.  Finally, I
created a context pointing the work directory to the location of my java
and class files.  When I tried to access the first file
(http://localhost/context/index.jsp) everything went fine.  However,
when I tried to access the second file
(http://localhost/context/dir/index.jsp), I received the
NoClassDefFoundError.  The log file looks like this:

2003-12-15 20:11:25 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
javax.servlet.ServletException: org/apache/jsp/index_jsp (wrong name:
org/apache/jsp/dir/index_jsp)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[deleted ...]
- Root Cause -
java.lang.NoClassDefFoundError: org/apache/jsp/index_jsp (wrong name:
org/apache/jsp/dir/index_jsp)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.lang.ClassLoader.defineClass(ClassLoader.java:448)
at
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:215)
[deleted]

Now, according to my research on this mailing list, the most frequent
reason for a NoClassDef error is capitalization.  However, this isn't
the case in my situation as the two package names are completely
different: org/apache/jsp/index_jsp vs. org/apache/jsp/dir/index_jsp.

I'm using Tomcat 4.1.29.

Any suggestions on how to alleviate this situation would be greatly
appreciated.

Thanks

JDG

PS: I should also point out that I have tried the recommended way of
precompiling my JSP by converting to servlets
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html#Web%2
0Application%20Compilation).  However, I have a problem with this
method: it makes it that much harder to patch my application.  With the
non-servlet approach, I just simply deliver the modified JSP files. With
the servlet approach, I need to deliver the classes, plus ensure that
the web.xml is correct (add new entries, remove old ones, modify where
needed), plus restart the context.




--
Jay Glanville



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



RE: Problems running pre-compiled JSP classes when in subdirectories

2004-01-07 Thread Jay Glanville
   at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
at java.lang.Thread.run(Thread.java:534)


--
Jay Glanville


> -Original Message-
> From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 07, 2004 9:43 AM
> To: 'Tomcat Users List'
> Subject: RE: Problems running pre-compiled JSP classes when 
> in subdirectories
> 
> 
>   Show us the exception how it appears to you.
> 
> > --
> > De: Jay Glanville[SMTP:[EMAIL PROTECTED]
> > Responder:  Tomcat Users List
> > Enviada:quarta-feira, 7 de janeiro de 2004 10:20
> > Para:   'Tomcat Users List'
> > Assunto:Problems running pre-compiled JSP classes when in
> > subdirectories
> > 
> > I originally posted this question back in mid-December, but without 
> > any responses.  In the hopes that someone will have a hit or a 
> > solution, I'm reposting the question again.
> > 
> > 
> > I'm having a problem when I try to use my pre-compiled JSP files: I 
> > receive a NoClassDefFoundError exception.  Here's what I'm doing ...
> > 
> > I have pre-compiled my JSP classes using the JspC plugin 
> from ant.  My 
> > files compile without complaint.  However, when I try to access the 
> > files through tomcat, I receive some NoClassDefFoundError 
> exceptions. 
> > But these exceptions only occur when I'm accessing JSPs in the 
> > subdirectories off of the web root.
> > 
> > Here's my application's background.  I have two files:
> >   /index.jsp
> >   /dir/index.jsp
> > The contents of the two files are just simple HTML.  I 
> precompiled the 
> > JSP using the JspC ant target, then compiled using javac.  
> Finally, I 
> > created a context pointing the work directory to the location of my 
> > java and class files.  When I tried to access the first file
> > (http://localhost/context/index.jsp) everything went fine.  
> However, 
> > when I tried to access the second file 
> > (http://localhost/context/dir/index.jsp), I received the 
> > NoClassDefFoundError.  The log file looks like this:
> > 
> > 2003-12-15 20:11:25 StandardWrapperValve[jsp]: 
> Servlet.service() for

RE: Problems running pre-compiled JSP classes when in subdirectories

2004-01-07 Thread Jay Glanville
Thanks Edson.  I'll try that later this week.

JDG

--
Jay Glanville


> -Original Message-
> From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 07, 2004 12:00 PM
> To: 'Tomcat Users List'
> Subject: RE: Problems running pre-compiled JSP classes when 
> in subdirectories
> 
> 
>   That´s the answer, you need to specify org.apache as 
> your JSP package. Here´s a example from my build.xml how to use 
> 
>JSPC can find
> web.xml
>   destdir ="${webapp}"//place where 
> jsp files will
> be created
>   verbose ="9"
>   package="org.apache"//root package
>   uriroot ="jsp"  // alias that 
> you would use
> for JSP pages
>   webxml  ="${webapp}/WEB-INF/jsp.xml"// file 
> to manage
> JSP files
>   classpathref="base-path">
>   
>   
> 
> 
> > --
> > De: Antony Paul[SMTP:[EMAIL PROTECTED]
> > Responder:  Tomcat Users List
> > Enviada:quarta-feira, 7 de janeiro de 2004 11:13
> > Para:   Tomcat Users List
> > Assunto:Re: Problems running pre-compiled JSP classes when in
> > subdirectories
> > 
> > I think the problem is the compiled source file is not in the 
> > org.apache.jsp package. How to set this in jspc task.
> > 
> > Antony Paul
> > 
> > - Original Message -
> > From: "Antony Paul" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, January 07, 2004 7:41 PM
> > Subject: Re: Problems running pre-compiled JSP classes when in 
> > subdirectories
> > 
> > 
> > > exception
> > >
> > > javax.servlet.ServletException: org/apache/jsp/index_jsp (wrong 
> > > name:
> > > index_jsp)
> > > at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >
> > >
> > > java.lang.NoClassDefFoundError: org/apache/jsp/index_jsp (wrong 
> > > name:
> > > index_jsp)
> > > at java.lang.ClassLoader.defineClass0(Native Method)
> > > at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
> > > at java.lang.ClassLoader.defineClass(ClassLoader.java:431)
> > > at
> > 
> org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:215
> > )
> > > at
> > 
> org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131
> > )
> > >
> > >
> > > Interestingly if the jsp is comiled to servlet using jspc 
> ant task 
> > > and
> > page
> > > is requested through browser then everything
> > > goes fine. If the generated source file is compiled using javac 
> > > target
> > of
> > it
> > > is showing this error.
> > >
> > > Antony Paul
> > > - Original Message -
> > > From: "Edson Alves Pereira" <[EMAIL PROTECTED]>
> > > To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, January 07, 2004 8:12 PM
> > > Subject: RE: Problems running pre-compiled JSP classes when in 
> > > subdirectories
> > >
> > >
> > > > Show us the exception how it appears to you.
> > > >
> > > > > --
> > > > > De: Jay Glanville[SMTP:[EMAIL PROTECTED]
> > > > > Responder: Tomcat Users List
> > > > > Enviada: quarta-feira, 7 de janeiro de 2004 10:20
> > > > > Para: 'Tomcat Users List'
> > > > > Assunto: Problems running pre-compiled JSP classes when in 
> > > > > subdirectories
> > > > >
> > > > > I originally posted this question back in mid-December, but 
> > > > > without
> > any
> > > > > responses.  In the hopes that someone will have a hit or a 
> > > > > solution,
> > I'm
> > > > > reposting the question again.
> > > > >
> > > > >
> > > > > I'm having a problem when I try to use my pre-compiled JSP 
> > > > > files: I receive a NoClassDefFoundError exception.  
> Here's what 
> > > > > I'm doing ...
> > > > >
> > > > > I have pre-compiled my JSP classes using the JspC plugin from 
> > > &

RE: How to find the differences between versions?

2004-01-15 Thread Jay Glanville
> On Wed, January 14, 2004 at 1:29 pm, Glanville, Jay wrote:
> > What is the best way that I can find all the issues that 
> were resolved 
> > in between 4.1.12 and 4.1.29?  Basically, my manager wants 
> to know if 
> > we should upgrade to 4.1.29, and he wants to see a list of all the 
> > issues that were closed since 4.1.12?
> 
> You should look at this file called RELEASE-NOTES which is 
> included with each release of Tomcat.

Is there a way to ask bugzilla for all the issues that have been
resolved in this timeframe?  What would the query be?

JDG


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



RE: quick question concerning the Client Deployer Package

2004-01-27 Thread Jay Glanville
Thanks

--
Jay Glanville


> -Original Message-
> From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 27, 2004 9:11 AM
> To: Tomcat Users List
> Subject: Re: quick question concerning the Client Deployer Package
> 
> 
> Glanville, Jay wrote:
> > Hello all.  I have a quick question concerning the client deployer
> > package
> > 
> (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/deployer-howt
o.html#Dep
> loying%20using%20the%20Client%20Deployer%20Package).  There is a
compile
> target and a deploy target.  My assumption is that the deploy target
> only deploys the web application and not the compiled code from the
> compile target.
> 
> Is this assumption correct?

"compile" does JSP precompilation on your webapp (and will actually also

compile to /WEB-INF/classes any Java class put in /WEB-INF/src). deploy 
uploads that precompiled application to the server.

-- 
x
Rémy Maucherat
Developer & Consultant
JBoss Group (Europe) SàRL
x

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


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



RE: How do I programmatically find the DocBase of my webapp?

2004-09-03 Thread Jay Glanville
Thanks Yoav.

In my defense, I did perform a search.  However, NOT in my defense, my
search was a little week: do you know how many hits you get when
searching the archives for 'docbase'?  Not a good word to limit by.  ;-)

--
Jay Glanville
Software Engineer


> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 03, 2004 2:07 PM
> To: Tomcat Users List
> Subject: RE: How do I programmatically find the DocBase of my webapp?
> 
> 
> 
> Hi,
> Why don't people ever search the archives before posting?  At least
> that's how it seems ;)
> 
> Use ServletContext#getRealPath("/") if running unpacked, 
> which I bet is
> your use case.
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> >-Original Message-
> >From: Glanville, Jay [mailto:[EMAIL PROTECTED]
> >Sent: Friday, September 03, 2004 2:00 PM
> >To: [EMAIL PROTECTED]
> >Subject: How do I programmatically find the DocBase of my webapp?
> >
> >Hello all,
> >
> >Quick question here (I hope).  Inside of my web application, 
> I want to
> >find the full, absolute file path to this application's doc 
> base.  How
> >do I do this?  Basically, I want to ensure that files X, Y 
> and Z exist
> >before my application starts to respond to requests.
> >
> >JDG


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