David Jencks wrote:
On Dec 6, 2006, at 1:27 PM, David Jencks wrote:
On Dec 6, 2006, at 1:01 PM, Joe Bohn wrote:
Jetty 6 as currently integrated in trunk is still using the JSP 2.0
support from jasper (tomcat 5.5.15). To support jetty for the
2.0-M1 milestone we will need a JSP 2.1 implementation. I half
thought about just shipping with the jsp 2.0 for jetty in 2.0- M1 but
the console and other jsp apps. will break when I update the
assemblies to include JSTL 1.2 from glassfish which requires a JSP
2.1 implementation.
There are a few choices here (details below):
1) Use the JSP supported provided by jetty.
2) Use jasper from tomcat 6
3) Don't deliver jetty with 2.0-M1
1) I gate the JSP support in jetty a try. AFAIK, jetty is actually
picking up modules from glassfish and repackaging these in their
build (can anybody confirm or deny this?).
I may have a few things wrong but my initial attempt to use the jsp
2.1 jars delivered by jetty didn't go well. You can see the stack
traces in the attached file. I haven't dug into the method errors
yet and I'm not sure if it is worth the effort (see #2).
I think the problem might be the jetty 6 module builder line 983
where the jasper servlet name is hardcoded:
servletData.setAttribute(servletClass,
org.apache.jasper.servlet.JspServlet);
This should be an attribute on the builder. I'll fix it shortly.
Also the default jsp servlet in the jetty6-deployer plan.xml most
likely needs the same change:
gbean name=JSPServlet
class=org.apache.geronimo.jetty6.JettyDefaultServletHolder
attribute name=servletNamejsp/attribute
attribute
name=servletClassorg.apache.jasper.servlet.JspServlet/attribute
attribute name=loadOnStartup0/attribute
attribute name=initParams
development=false
fork=false
logVerbosityLevel=DEBUG
xpoweredBy=false
/attribute
attribute
name=servletMappings*.jsp,*.jspf,*.jspx,*.xsp/attribute
/gbean
Done, see GERONIMO-2631 and rev 483251.
Thanks David. I think having this as a parameter is great but I'm not
sure if it was the cause of the problem. The jsp-2.1.jar from jetty
includes many of the same classes from jasper including
org.apache.jasper.servlet.JspServlet so I was assuming this didn't have
to change.
2) I'm about to try using the new jasper with jetty. It seems like
the web console works fine with the jsp 2.0 support provided by
jasper. I think that it should equally do fine with the jsp 2.1
support from jasper. I like this approach because it has worked in
the past and gives us some consistency between jetty and tomcat. If
it works then that pretty much settles it for me for the 2.0-M1
delivery. However, longer term I'm concerned because it diverges
from the path that jetty has taken which means we may be in for
problems down the road even if things work fine now. Does anybody
know if the current jetty approach is a long-term decision or just a
temporary one based upon the lack of jasper 2.1 support when they
needed it?
We'll have to ping greg.
See my response to Paul for what I learned from Greg on IRC.
I had a lot more success with my quick attempt to get jetty 6 working
with jasper from tomcat 6. I may check this in as an initial approach
so that I can go ahead an try out the glassfish jstl. Do you have any
objections to that? I'll dig into the jetty errors some more after I
get a warm fuzzy on JSTL.
3) It is certainly the easiest approach to only deliver tomcat for
2.0-M1. I'm not sure how others feel about it. I don't want to
open the whole multiple-container can of worms ... but it sure
does complicate things trying to support both tomcat and jetty.
OK, lets drop tomcat :-) The easiest approach is to deliver only
jetty6 for 2.0-M1, it's already implemented.
Please let me know your thoughts.
I think we should continue to support both servlet containers.
I also think we should put the jsp support jars (jasper/ glassfish
equivalent) into a configuration so we can swap them in a server
without rebuilding e.g the jetty_6 configuration to change its
dependencies.
I'll look into this as well.
Thanks! Joe