aspose file tools
The moose likes JSF and the fly likes jsp:include directive and backing beans Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "jsp:include directive and backing beans" Watch "jsp:include directive and backing beans" New topic
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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: jsp:include directive and backing beans
 
Similar Threads
jsp:include problem
Conditional includes
Cannot use jsp scriplet in jsp taglibs
Include dynamic HTML in a JSP
Include tag in a conditional statement in jsp