*
The moose likes JSP and the fly likes using EL in jsp include file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "using EL in jsp include file" Watch "using EL in jsp include file" New topic
Author

using EL in jsp include file

Stu Johns
Ranch Hand

Joined: Aug 11, 2008
Posts: 63
Hi I have a JSP including a page that adds a parameter


and the included file that tries to read the parameter


however it does not display as i want, it displays as if isELIgnored is set to true. Explicitly setting to false doesnt make a difference.
anyone know how to achieve this?

thanks

Stu.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

/WEB-INF/includes/inc1.jspf

Is your container configured to treat jspf files as jsp files ? For a quick check, you can try to rename your file inc1.jsp and see if EL is interpreted.


[My Blog]
All roads lead to JavaRanch
Stu Johns
Ranch Hand

Joined: Aug 11, 2008
Posts: 63
thats it, thanks, I'll configure the container.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60072
    
  65

The .jspf file type should only be used for statically included files (with the include directive).


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60072
    
  65

P.S. If you are using JSP 2.0 or 2.1, you might want to consider tag files as a better alternative to included files.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60072
    
  65

Originally posted by Stu Johns:
thats it, thanks, I'll configure the container.


I would not do that. As I said, conventionally, .jsp is for active resources, and .jspf is for static inclusion. The appropriate, and easier path, is to simply use the proper file type.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: using EL in jsp include file
 
Similar Threads
Whizlab answer looks errorful
Jsp 1.0 problem
Way to determine the jsp:include caller?
JSP init parameters.
JSP : PARAMS action