Bookmark Topic Watch Topic
  • New Topic

JSTL to retrieve and pass request objects

 
John Killman
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator

This is a repeat of a previous question in an attempt to make it clearer.

I have a JSP/JSL page with a managed bean associated with it.
My page is kicked off by request.getRequestDispatcher("/faces/xxx.jsp").forward(request, response); from another source.

I am asking for a way with JSTL, to retrieve the request (or an object in the request), and send it to the managed bean.

Note:
Assume the request key="chart" and the object=privateChart
Assume the backing bean (a POJO) is "BeanA" and the method is "getChart"
Currently using JSTL 1.2

Thanks,
John
 
Hany Shafik
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi John,
I assume you are using jsf with jsp as your view pages. Before I can answer your question I want to know why you have to do it in jstl and what are the scope of the jsf backing bean, as there is may be other ways you can set the property of a backing bean from a value retrieved from request scope e.g. (You can inject a value into managed bean property)
Anyway you can use c:set tag but you must be aware that the bean must have been instantiated by the jsf framework before calling this jstl tag as it won't create it automatically for you as jsf does.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please clarify and continue in the original topic.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!