• Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing parameter to imported file in <c:import>

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to run an example in which I pass a parameter to imported file but its not working.

This is my header.jspf file which I will include in a jsp file.



And This is the JSP file contact.jsp


When I hit the contact.jsp file , It does show me the image I have on header.jspf , but its not able to print the parameter that I am setting in <c:param>
So after showing image it just shows ${param.sub}.

So EL is not translated properly.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file needs to be suffixed with .jsp. Otherwise, it won't be processed as a JSP.

The jspf suffix should not be used for files included at run-time; only those included at compile-time (with the include directive)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!