All JSPs should be compiled. Using normal JSPs in development mode is normal - but I couldn't find any good reason why an application would not compile all JSPs.
Besides speed ( which is important ! ), you would also know about syntax errors
or missing dependencies. Most of the "jsp is slow" stuff is based on the first experience with a JSP page - where you have to wait for the HelloWorld.jsp to compile. A lot of "jsp is hard" is based on the same experience - when the compiler is not found.
It would be nice if a future version of the JSP spec would require ( or strongly recommend that ) as well as include a way to use the jsp-file tag togheter with servlet-class. I would like to be able to keep the jsp-file declaration next to the precompiled class name ( now only one can be specified - AFAIK ).
Update: I've got the admin/ precompiled - now you get a decent experience when using it. In process we found few bugs in jspc - I fixed it, but Hans had a better one.
As a bonus for using JSPC, the jsps will be visible in the JMX console - you'll
know the number of requets, average and max times and all the fun stuff. And you bypass the JspServlet - another (small according to Remy ) improvment. I did a small attempt to JMX-enable regular servlets - but it is too complicated and its
really not worth it - I'm more convinced than ever that JspServlet is the wrong way
to support Jsps.
JspInterceptor has its own problems - but now there is a better/cleaner way to abstract the JSP engine - just use JMX. The JSP engine should be just a JMX mbean, with a simple operation "compile( contextPath, jsp )". This can be crafted
on top of the existing JspC - and will insure consistent behavior. Regular JMX attributes will remove the confusion in jasper configuration, and it may even provide nice statistics ( compile time, number of errors, etc).
Probably I should split this entry in two ( or 3 ).
Technical stuff
Tuesday, January 21, 2003
Precompile the JSPs
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2003
(44)
-
▼
January
(23)
- Authorization and security
- Kde3.1 on RedHat 8
- Java security
- Tahoe
- JMX-enable a bean in 3 easy steps
- TLD listeners and context initialization
- int[] versus Integer or IntHolder
- Weblog and wiki
- Load balancing in jk
- Configurable TagPool in 50
- It's already done - nntp/rss gateway
- Using context params or JNDI for configuration
- SingleThreadedModel may be usefull
- Precompile the JSPs
- Classloader fun with JDK1.4
- More JMX in tomcat5
- Extension points in tomcat5
- UserDatabase needs changes
- Ser2xml
- Starting to "blog"
- Ant: delayed task creation
- import in ant
- JMX support in ThreadPool
-
▼
January
(23)
No comments:
Post a Comment