Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Resin

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2011, 06:42 PM
hwellmann hwellmann is offline
Junior Member
 
Join Date: May 2011
Posts: 25
Default EL not supported in JSPs

I've finally managed to make my Java EE 6 app work not just on Glassfish 3.1, but also on Resin 4.0.snapshot.

Once the deployment succeeded, most of my web pages looked broken at first, since EL expressions in JSPs were rendered verbatim.

Adding
Code:
  <jsp el-ignored="false"/>
to my resin.xml solved the problem, but according to the config reference this should be the default:

http://caucho.com/resin-4.0/reference.xtp#jsp

It may be easier to change the docs, but I think it'd make more sense to change the implementation - EL is a standard Java EE 6 feature, so it should just work out of the box...

Regards,
Harald
Reply With Quote
  #2  
Old 06-03-2011, 05:33 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default

Is your web.xml using an old-style (non-namespace) configuration?

According to the JSP spec, the EL behavior switches depending on the web.xml syntax. (This was intended by the JSP spec to provide backward compatibility when EL was new.)
Reply With Quote
  #3  
Old 06-03-2011, 05:38 PM
hwellmann hwellmann is offline
Junior Member
 
Join Date: May 2011
Posts: 25
Default

No, I'm using a namespace:

Code:
<web-app
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
  version="3.0">
Reply With Quote
  #4  
Old 06-03-2011, 05:43 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default

Do you have a sample JSP which shows the issue? Our tests don't show that behavior.
Reply With Quote
  #5  
Old 06-03-2011, 07:23 PM
hwellmann hwellmann is offline
Junior Member
 
Join Date: May 2011
Posts: 25
Default

A demo app with a simple hello world JSP also works for me and resolves EL correctly.

But my real app consistently fails to resolve EL unless I explicitly set <jsp el-ignored="true"/>.

The same demo page also fails in the context of my app. But so far I've been unable to isolate the problem with a minimal app.

My app is based on Spring MVC, and I don't really know what Spring does to a JSP request before the server finally gets to render it.

On the other hand, the same app has no problems with EL on Glassfish or JBoss.



Regards,
Harald
Reply With Quote
  #6  
Old 06-03-2011, 08:26 PM
ferg ferg is offline
Administrator
 
Join Date: Aug 2009
Posts: 190
Default

Hmm. That's interesting.

Do you know which kind of EL are failing? Taglib attribute vs tag file vs ${foo} vs JSTL?
Reply With Quote
  #7  
Old 06-04-2011, 11:33 AM
hwellmann hwellmann is offline
Junior Member
 
Join Date: May 2011
Posts: 25
Default

Mysterious but true, the problem seems to have been caused by the broken Eclipse plugin.

When using the 4.0.19 snapshot of the Eclipse plugin to deploy my app, the JSP/EL behaviour is ok.

Regards,
Harald
Reply With Quote
  #8  
Old 10-22-2013, 12:37 AM
wrecord5 wrecord5 is offline
Junior Member
 
Join Date: Mar 2013
Posts: 2
Default Thanks to this thread i was able to fix my problem

when i upgraded from resin 3.1.12 to resin 4.0.37 i am having issues with the pages rendering as skeletons, per this thread i started looking at EL and made the following configuration changes in the cluster xml

<web-app-default>
<class-loader>
<library-loader path="${resin.root}/webapp-jars"/>
<library-loader path="${resin.root}/webapp.d/lib"/>
<library-loader path="config:/webapp.d/lib"/>
</class-loader>
<allow-servlet-el/>
<jsp>
<validate-taglib-schema>true</validate-taglib-schema>
<fast-jstl>true</fast-jstl>
<fast-jsf>true</fast-jsf>
</jsp>

</web-app-default>

once i added that into my cluster xml it fixed the issue of my pages not rendering correctly, i had no idea it was the EL not rendering at first though.
other things about my app
it is using
magnolia 4.5.8
struts 2.2.3
spring 3.2.2
tiles 2.0.6
now appears to be properly working in java 1.7.0.40 and resin 4.0.37 with JDBC Session db in db2.

Last edited by wrecord5; 10-22-2013 at 09:00 PM.
Reply With Quote
  #9  
Old 10-22-2013, 08:59 PM
wrecord5 wrecord5 is offline
Junior Member
 
Join Date: Mar 2013
Posts: 2
Default

this didn't resolve my problem, still researching what the problem may be.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:41 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.