You should use JSF Expression Language (EL) to do this. It is similar to
using JSTL with one or two minor differences. 

Your backing beans can be access using the following syntax

value="#{testBean.property}" where testBean is a managed bean and property
follows the standard java bean get/set patterns. You should also note some
of the discussions about incompatibility between JSP and JSF. You might want
to look at some of the MyFaces examples to get a clearer idea of how to use
JSF in a page. There is lots of good intro material here
http://www.coreservlets.com/JSF-Tutorial/





-----Original Message-----
From: Yasushi Okubo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 24, 2006 9:05 AM
To: MyFaces Discussion
Subject: question for accessing managed bean/backing bean from jsp page

Hi experts,

I would like to access data structures defined in managed bean/backing bean
from jsp page.  
For example, when I see myfaces file upload example, jsf page is taken a
user to jsp page, and I would like to access managed bean from this file
upload jsp page.
Could you someone direct me an example or explain to me how I can do that ?

So, if I have a managed/backing bean called testBean, how can I access it
from fileupload_showing jsp ?

Thanks,
yasushi

== fileupload_showing.jsp ===
<%@ page import="java.io.File,
                 java.io.InputStream,
                 java.io.FileInputStream,
                 java.io.OutputStream"%><%@ page session="false" %><%
    String contentType =
(String)application.getAttribute("fileupload_type");
    String fileName = (String)application.getAttribute("fileupload_name");

    String allowCache = request.getParameter("allowCache");
    String openDirectly = request.getParameter("openDirectly");

Reply via email to