| Author |
jsp:include directive and backing beans
|
Grzegorz Daniec
Greenhorn
Joined: Sep 09, 2006
Posts: 2
|
|
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
Joined: Dec 06, 2005
Posts: 1318
|
|
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 ]
|
Saifuddin..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
|
 |
Grzegorz Daniec
Greenhorn
Joined: Sep 09, 2006
Posts: 2
|
|
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
Joined: Dec 06, 2005
Posts: 1318
|
|
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
Joined: Aug 15, 2004
Posts: 2874
|
|
|
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.
|
 |
 |
|
|
subject: jsp:include directive and backing beans
|
|
|