• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JSP fragments and EL

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy !

Using Netbeans 4.0, I've some small exampl. of the include-tactics.

It seems that I can't get EL to work in my JSP fragment. I've tried to put in a page directive with isElignored="false" - but it won't work.

Now I'm wondering if I read somewhere that jsp fragments is limited in someway.... eg. not evaluating EL.

Rgds. Henrik
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please post your example code so that other people can try it out?
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may need to let EL work with JSTL tags, depends on how your JSP implemetation.

Nick
 
Jessica White
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to HFS page 512, para2, it says:
"It(JspFragment) can contain template text, standard and custom actions, and EL expressions, but no scriptlets, declarations or scripting expressions."
 
Henrik Krievs
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's funny because I made the example via the Netbeans wizard - which change suffix of the .jsp to .jspf. If I take the exact same code and put in a .jsp it works.

Netbeans 4.0 Beta
Tomcat 5.28
Henrik 40...

/rgds...
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran into this issue too. The param value evaluated correctly in a jsp:include page if the jsp:include was a .jsp page. But if I used a .jspf page the EL did not evaluate.

The solution for me was to add tthe following to my DeploymentDescriptor. Note the url-pattern of *.jspf



[ November 13, 2004: Message edited by: John Peterson ]
[ November 13, 2004: Message edited by: John Peterson ]
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic