File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSP fragments and EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JSP fragments and EL" Watch "JSP fragments and EL" New topic
Author

JSP fragments and EL

Henrik Krievs
Ranch Hand

Joined: Jan 05, 2004
Posts: 60
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

Joined: Sep 24, 2004
Posts: 30
Can you please post your example code so that other people can try it out?
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
You may need to let EL work with JSTL tags, depends on how your JSP implemetation.

Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Jessica White
Ranch Hand

Joined: Sep 24, 2004
Posts: 30
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

Joined: Jan 05, 2004
Posts: 60
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

Joined: Oct 25, 2004
Posts: 3
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 ]

John Peterson<br />SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP fragments and EL