• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:include directive and backing beans  RSS feed

 
Grzegorz Daniec
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have a problem with jsp:include tag.
There is a string type variable in backing bean. Variable contains URL address of html page which i want to include.
My question is how to bind value of this string with page parameter of jsp:include tag.

I would be gratefull for any help,
Grzesiek
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you asking about this.

<jsp:include page="" flush="true">
<jsp:param name="" value="{parameterValue | <%= expression %>}" />
</jsp:include>

Please correct me if I am wrong.
[ September 09, 2006: Message edited by: Saif Uddin ]
 
Grzegorz Daniec
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answer Saif.

But still can't deal with it
I want to dynamically choose the file to include.
It is possible to do that with request parameter:

but I want to use session or backing bean variable to determine name of the page.
I am a begginer, so if it is possible, could you give me some example?
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer is yes..
You can use expression in page as well.
for more confirmation see this.
and
jsp:include actions
[ September 11, 2006: Message edited by: Saif Uddin ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can use request attribute in this case as well. Just think of your backing bean bound as a request attribute and use JSTL to get the URL property of your bean to include the file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!