This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot use jsp scriplet in jsp taglibs

 
rajshkhr pandey
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all,

I am using <jsp:include /> to include the page but cannot use use jsp scriplet into it



it gives me error



How can I include page dynamically

Thanks In Advance.
 
pamir sonmez
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jsp:include tag should not be inside your scriptlet.

try:



Also, I would avoid using scriptlets.
If you're server supports JSP 2.0 or better use EL as Pamir Sommez suggested.
 
Kris Schneider
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error in the original post is usually caused by a scriptlet expression that does not appear by itself as an attribute value. For example, this should work fine:



But this will cause the error:



By the way, don't use page for the scripting variable name, it's already defined as an implicit object...
 
rajshkhr pandey
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all for your your response,

I have used following code also but it is not working as "Kris Schneider" says it is causing error



It is causing the same error

Are scriplets allowed in <jsp:include> tag?

Thanks in advance..........

Edited "<%pg" changed to "<%=pg%>"
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No matter what you do, if your syntax is wrong, it's going to blow up!

Check your syntax!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic