Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP fragments and EL

 
Henrik Krievs
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • 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
 
Jessica White
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post your example code so that other people can try it out?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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...
 
John Peterson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic