You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jacob Hookom <ho...@uwec.edu> on 2002/07/13 18:21:03 UTC

RE: how to make tomcat faster [jasper error]

I followed your example of importing the 4 jars from 1.7 to 0.4, but my
pages now are not displaying on the basis of:

javax.servlet.ServletException:
org.apache.jasper.runtime.HttpJspBase.getIncludes()Ljava/util/List;
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

I'm just wondering what may be causing this.  My page declare is:

<%@ page language="java" errorPage="errors/error_disp.jsp" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/dds.tld" prefix="dds" %>

if anyone can help me out, I would REALLY appreciate it!

Jacob Hookom
CS Student
University of Wisconsin, Eau Claire
===================================
http://www.swanked.net
you're not hip enough yet

-----Original Message-----
From: Reynir Hübner [mailto:reynir@hugsmidjan.is] 
Sent: Saturday, July 13, 2002 9:05 AM
To: Tomcat Users List
Subject: RE: how to make tomcat faster

well to install jasper from the 4.1.7 you only need to take 2 or 3 jar
files and replace the old ones in tc 4.0.4.

the jar files are from 
tc.4.1.7 : 

common/lib/jasper-compiler.jar
common/lib/jasper-runtime.jar
common/lib/commons-collections.jar

and if I remember it correctly I also moved the : 
common/lib/ant.jar 

to my tc.4.0.3 installation.


I am sorry but I will not explain connection pooling here, as it's been
done serveral times and you can search the mail-archive for information
on that matter, I use a pool from www.bitmechanic.com, but there are
several others available. Even sometimes a pool is distributed with the
JDBC driver, I'm not sure about the free one from microsoft, but it
might have some pooling implemented.
Caching is something you need to implement into your jsp-pages, it's
usually done by using cache-tags that implement "fine-grain-cacheing",
this will make you able to decide for how long each segment of your
response is cached. I've been using OSCache, from www.opensymphony.org,
there is also a cache-taglib in the jakarta domain. 

My guess is if you do this, your application will get 5 times faster
than it is right now.... maybe even alot more depending on how you do
it.
About the System.out.println, you should just implement Log4j logging,
it's powerfull, and easy to use. 

There are many things you could look at, for example, if you are using
HashMaps alot, you might find it alot faster to use FastHashMap, or if
you are using Vectors alot you might find it faster to use/iterate
through LinkedLists, if you are using out.write alot, you might want to
make use of StringBuffer, append to it while rendering the jsp, and only
writing that to the response (one out.write instead of many.. it should
be a little bit faster). 

For benchmark-testing I've used both jmeter and "Microsofts
Web-Application Stress Tool", and here I recomend the MS tool, it's very
powerfull, and gives you good reports.

hope it helps

 - reynir@hugsmidjan.is




> -----Original Message-----
> From: Anoop Kumar V [mailto:akumarv@sapient.com]
> Sent: 13. júlí 2002 13:51
> To: 'Tomcat Users List'
> Subject: RE: how to make tomcat faster
> 
> 
> hi,
> 
> OK..maybe i shd hv included that in my first message..anyway its here.
> 
> This application has considerable database work with a few 
> reports thrown in
> here
> and there. I have just one servlet, remaining are all jsp's 
> (about 50 jsp's)
> and about 25 beans and other class files(MVC). I use MS-SQL 
> Server as the
> database.
> no connection pooling.. as i felt the number of users are too 
> small(100 -
> 250 
> at peak time) and yes, every request fetches info from the 
> database. So i
> guess
> i need to know how to enable connection pooling.
> Also the cache part.. there are some entries in server.xml 
> which seem to say
> "save session on restart", but i was not sure so i hv left 
> them alone. So
> tell me how
> can i enable cache too. 
> There is hardly any static content in my application, and 
> what i meant was a
> relative
> slow down compared to when Tomcat was stand-alone (or with 
> Apache). Yes,
> even i am using
> AJP1.3 connector with isapi_redirector.dll filter. 
> About System.out.println...yes i had quite a bit until now.. 
> which i hv
> removed.. but
> i do not see much of a performance improvement (need to check 
> at peak time,
> again).
>   Need some more pointers regarding jasper, does it coem 
> along with tomcat,
> and how
> to set it up. (is it similar to Jikes?)
> 
> -anoop
> 
> -----Original Message-----
> From: Reynir Hübner [mailto:reynir@hugsmidjan.is]
> Sent: Saturday, July 13, 2002 6:16 PM
> To: Tomcat Users List
> Subject: RE: how to make tomcat faster
> 
> 
> Hi,
> 
> please inform us of what kind of work you are doing with 
> tomcat, are you
> requesting informations from databases for every request, are 
> you using
> connection pooling, are you using cache, are using jsp alot ? 
> There may be many places you can optimize performance in your 
> application
> just as well as increase tomcat performance. 
> One thing I did to increase performance with t.c.4.0.4 was to 
> use the Jasper
> from 4.1.7. Because the threshhold of my application is in 
> jsp-rendering
> time, and the tags my jsp pages use, this increased 
> performance about almost
> 100%. 
> Using IIS, if it's correctly configured should help alot, as 
> it will deliver
> all static documents, such as jpegs, gifs, html etc, and take 
> the load of
> delivering this away from tomcat, so tomcat will only need to 
> handle the
> jsps and servlets.
> If IIS is slowing down the whole thing, IIS is either wrongly 
> installed, or
> the connector. I've used AJP connectors along with the 
> isapi_redirect.dll
> filter. 
> Remember also, system.out.println logging can slow everything 
> down a bit, so
> try to do the least of that.... 
> 
> but for starters, you should try using the jasper2 from 
> tc.4.1.7, it really
> works well.
> 
> 
> -reynir.
> 
> 
> > -----Original Message-----
> > From: Anoop Kumar V [mailto:akumarv@sapient.com]
> > Sent: 13. júlí 2002 12:11
> > To: 'Tomcat Users List'
> > Subject: how to make tomcat faster
> > 
> > 
> > hi,
> > 
> > i have been developing using Tomcat 4.0.1.. and i hv had no 
> > problems about
> > that.
> > 
> > Now i have moved all my applications on to the production 
> > server, where
> > hopefully i
> > wdnt be making any more changes. But i want to make Tomcat 
> > respond faster to
> > requests.
> > Obviously the production environment shd be different from 
> > the development
> > one..so 
> > can someone detail me on what changes i can make to make 
> > Tomcat quicker to
> > respond.
> > 
> > Thanx in adv,
> > -anoop
> > 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[FIXED] RE: how to make tomcat faster [jasper error]

Posted by Jacob Hookom <ho...@uwec.edu>.
I had to dump my working directory... thanks though for the speed tips.

Jacob Hookom
CS Student
University of Wisconsin, Eau Claire
===================================
http://www.swanked.net
you're not hip enough yet

-----Original Message-----
From: Jacob Hookom [mailto:hookomjj@uwec.edu] 
Sent: Saturday, July 13, 2002 11:21 AM
To: 'Tomcat Users List'
Subject: RE: how to make tomcat faster [jasper error]

I followed your example of importing the 4 jars from 1.7 to 0.4, but my
pages now are not displaying on the basis of:

javax.servlet.ServletException:
org.apache.jasper.runtime.HttpJspBase.getIncludes()Ljava/util/List;
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

I'm just wondering what may be causing this.  My page declare is:

<%@ page language="java" errorPage="errors/error_disp.jsp" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/dds.tld" prefix="dds" %>

if anyone can help me out, I would REALLY appreciate it!

Jacob Hookom
CS Student
University of Wisconsin, Eau Claire
===================================
http://www.swanked.net
you're not hip enough yet

-----Original Message-----
From: Reynir Hübner [mailto:reynir@hugsmidjan.is] 
Sent: Saturday, July 13, 2002 9:05 AM
To: Tomcat Users List
Subject: RE: how to make tomcat faster

well to install jasper from the 4.1.7 you only need to take 2 or 3 jar
files and replace the old ones in tc 4.0.4.

the jar files are from 
tc.4.1.7 : 

common/lib/jasper-compiler.jar
common/lib/jasper-runtime.jar
common/lib/commons-collections.jar

and if I remember it correctly I also moved the : 
common/lib/ant.jar 

to my tc.4.0.3 installation.


I am sorry but I will not explain connection pooling here, as it's been
done serveral times and you can search the mail-archive for information
on that matter, I use a pool from www.bitmechanic.com, but there are
several others available. Even sometimes a pool is distributed with the
JDBC driver, I'm not sure about the free one from microsoft, but it
might have some pooling implemented.
Caching is something you need to implement into your jsp-pages, it's
usually done by using cache-tags that implement "fine-grain-cacheing",
this will make you able to decide for how long each segment of your
response is cached. I've been using OSCache, from www.opensymphony.org,
there is also a cache-taglib in the jakarta domain. 

My guess is if you do this, your application will get 5 times faster
than it is right now.... maybe even alot more depending on how you do
it.
About the System.out.println, you should just implement Log4j logging,
it's powerfull, and easy to use. 

There are many things you could look at, for example, if you are using
HashMaps alot, you might find it alot faster to use FastHashMap, or if
you are using Vectors alot you might find it faster to use/iterate
through LinkedLists, if you are using out.write alot, you might want to
make use of StringBuffer, append to it while rendering the jsp, and only
writing that to the response (one out.write instead of many.. it should
be a little bit faster). 

For benchmark-testing I've used both jmeter and "Microsofts
Web-Application Stress Tool", and here I recomend the MS tool, it's very
powerfull, and gives you good reports.

hope it helps

 - reynir@hugsmidjan.is




> -----Original Message-----
> From: Anoop Kumar V [mailto:akumarv@sapient.com]
> Sent: 13. júlí 2002 13:51
> To: 'Tomcat Users List'
> Subject: RE: how to make tomcat faster
> 
> 
> hi,
> 
> OK..maybe i shd hv included that in my first message..anyway its here.
> 
> This application has considerable database work with a few 
> reports thrown in
> here
> and there. I have just one servlet, remaining are all jsp's 
> (about 50 jsp's)
> and about 25 beans and other class files(MVC). I use MS-SQL 
> Server as the
> database.
> no connection pooling.. as i felt the number of users are too 
> small(100 -
> 250 
> at peak time) and yes, every request fetches info from the 
> database. So i
> guess
> i need to know how to enable connection pooling.
> Also the cache part.. there are some entries in server.xml 
> which seem to say
> "save session on restart", but i was not sure so i hv left 
> them alone. So
> tell me how
> can i enable cache too. 
> There is hardly any static content in my application, and 
> what i meant was a
> relative
> slow down compared to when Tomcat was stand-alone (or with 
> Apache). Yes,
> even i am using
> AJP1.3 connector with isapi_redirector.dll filter. 
> About System.out.println...yes i had quite a bit until now.. 
> which i hv
> removed.. but
> i do not see much of a performance improvement (need to check 
> at peak time,
> again).
>   Need some more pointers regarding jasper, does it coem 
> along with tomcat,
> and how
> to set it up. (is it similar to Jikes?)
> 
> -anoop
> 
> -----Original Message-----
> From: Reynir Hübner [mailto:reynir@hugsmidjan.is]
> Sent: Saturday, July 13, 2002 6:16 PM
> To: Tomcat Users List
> Subject: RE: how to make tomcat faster
> 
> 
> Hi,
> 
> please inform us of what kind of work you are doing with 
> tomcat, are you
> requesting informations from databases for every request, are 
> you using
> connection pooling, are you using cache, are using jsp alot ? 
> There may be many places you can optimize performance in your 
> application
> just as well as increase tomcat performance. 
> One thing I did to increase performance with t.c.4.0.4 was to 
> use the Jasper
> from 4.1.7. Because the threshhold of my application is in 
> jsp-rendering
> time, and the tags my jsp pages use, this increased 
> performance about almost
> 100%. 
> Using IIS, if it's correctly configured should help alot, as 
> it will deliver
> all static documents, such as jpegs, gifs, html etc, and take 
> the load of
> delivering this away from tomcat, so tomcat will only need to 
> handle the
> jsps and servlets.
> If IIS is slowing down the whole thing, IIS is either wrongly 
> installed, or
> the connector. I've used AJP connectors along with the 
> isapi_redirect.dll
> filter. 
> Remember also, system.out.println logging can slow everything 
> down a bit, so
> try to do the least of that.... 
> 
> but for starters, you should try using the jasper2 from 
> tc.4.1.7, it really
> works well.
> 
> 
> -reynir.
> 
> 
> > -----Original Message-----
> > From: Anoop Kumar V [mailto:akumarv@sapient.com]
> > Sent: 13. júlí 2002 12:11
> > To: 'Tomcat Users List'
> > Subject: how to make tomcat faster
> > 
> > 
> > hi,
> > 
> > i have been developing using Tomcat 4.0.1.. and i hv had no 
> > problems about
> > that.
> > 
> > Now i have moved all my applications on to the production 
> > server, where
> > hopefully i
> > wdnt be making any more changes. But i want to make Tomcat 
> > respond faster to
> > requests.
> > Obviously the production environment shd be different from 
> > the development
> > one..so 
> > can someone detail me on what changes i can make to make 
> > Tomcat quicker to
> > respond.
> > 
> > Thanx in adv,
> > -anoop
> > 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.375 / Virus Database: 210 - Release Date: 7/10/2002
 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>