You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Garner Shawn <sh...@gmail.com> on 2006/05/24 14:29:47 UTC

[ot][help] move from JBoss to Tomcat not recognizing welcome file

web.xml
<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

index.jsp:

<%@ page session="false" contentType="text/xml;charset=utf-8"%>
<%
	response.sendRedirect("welcome.jsf");
%>

When I deployed on tomcat I get a blank page when I type in the context.
If I actually type in welcome.jsf it works fine.
For some reason it's not sending the redirect.

In JBoss it works fine.

Do I need to add something to my web.xml or configure Tomcat differently?


Any help?

Re: question for accessing managed bean/backing bean from jsp page

Posted by Ian Hlavats <ih...@tarantulaconsulting.com>.
Hi Yasushi,

I have some documentation on my website with visual examples of how to drag and drop managed bean properties and methods onto a JSP page in Dreamweaver and how to use JSF EL value-binding and method-binding expressions in your code. 

http://www.jsftoolbox.com/images/help/bean-drag-and-drop.gif
http://www.jsftoolbox.com/documentation/help/06-CodeView/managed-beans.jsf

The documentation also discusses some of the compatibility issues between JavaServer Faces and JSP technology, specifically component state management, and effective ways to deal with these issues in a rapid application development environment.

http://www.jsftoolbox.com/documentation/help/03-DevelopingWebSites/rad.jsf

Hope it helps,
Ian

-----Original Message-----
From: Yasushi Okubo <ya...@cabm.rutgers.edu>
Date: Wed, 24 May 2006 09:05:14 
To:MyFaces Discussion <us...@myfaces.apache.org>
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");

Re: question for accessing managed bean/backing bean from jsp page

Posted by Yasushi Okubo <ya...@cabm.rutgers.edu>.
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:yasushi@cabm.rutgers.edu] 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");
>>
>>  
>>
>


Re: question for accessing managed bean/backing bean from jsp page

Posted by Yasushi Okubo <ya...@cabm.rutgers.edu>.
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:yasushi@cabm.rutgers.edu] 
>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");
>
>  
>


RE: question for accessing managed bean/backing bean from jsp page

Posted by Julian Ray <ju...@yahoo.com>.
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:yasushi@cabm.rutgers.edu] 
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");


question for accessing managed bean/backing bean from jsp page

Posted by Yasushi Okubo <ya...@cabm.rutgers.edu>.
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");