Re: Jetty 6 and JSP 2.1 support

2006-12-06 Thread Joe Bohn


Paul McMahan wrote:

On 12/6/06, Joe Bohn [EMAIL PROTECTED] wrote:


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?



If jasper 2.1 works with Jetty then IMO we should use it for 2.0-M1.
While this may not match the standalone jetty distribution it gives us
some consistency across geronimo assemblies. If someone develops a app
using the tomcat assembly it should work on the jetty assembly.  A
good example is Geronimo's admin console which works on both
assemblies (and I hope it stays that way :-)

And like you say, now that tomcat has released 6.0.2 beta the jetty
guys might be interested in using jasper from that release instead of
JSP from glassfish.


I just spoke with Greg on IRC and it appears that the jetty decision is 
a long term decision to use glassfish over jasper.  They had concerns 
with the response (or lack there-of) from the jasper folks and were 
encouraged by the responses that they were getting from glassfish.  He 
didn't think there would be any issues with using jasper with jetty if 
we choose to go that route.


Joe


Re: Jetty 6 and JSP 2.1 support

2006-12-06 Thread Joe Bohn



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