Hi,

I read some tutorial slides, but this was not what I was looking for.
In fileupload_showing.jsp, jsp tags were embedded like following.
Then, I want to access some data [lists, arrays etc] defined/initialized in managed bean/backing bean from this jsp page inside scriptlet <% .. %> tag, not in html sections
Is it possible to do so ?

If it is not possible, is there way to use f:param to send a list data ? It looks value property only accepts String type, but I would like to know the way to send a list (collection) to the server if such method exists ?

Thanks,
yasushi

<%@ 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");

// <===== I want to access data defined/initialized in managed bean/backing here =====>


%>

Yasushi Okubo wrote:

Julian Ray wrote:

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/



Hi, Julian
I will try this shortly.

By the way, I see external links in web.xml for JSP 2.0/servlet 2.4, but does it cause a problem when their server is down on boot ?

thanks
yasushi


-----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