You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Peters, John" <Jo...@bcbsfl.com> on 2007/11/01 13:37:11 UTC

Request.getAttribute

I'm new to struts.
Setting request.setAttribute("status") in my Action.java, is there a tag
to get it in the JSP page?
To get around it I've been using <%= request.getAttribute("status") %>
Status is not a class so I don't think it should be implemented as a
bean.
I've googled without any success
Thanks in advance for any help or examples.


Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.  The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed.  This document may contain material that is privileged or protected from disclosure under applicable law.  If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Request.getAttribute

Posted by "Peters, John" <Jo...@bcbsfl.com>.
Currently I'm not using any tags for this JSP page

This is the snip of JSP-No problems doing it this way.
But I was wondering if there was a struts tag to do this.


<tr style="'color: #0090DD" class='footer2'>

<td><% if(null!=request.getAttribute("cellStatus") &&
request.getAttribute("cellStatus")!="") { %>
<%
if(((String)request.getAttribute("cellStatus")).equalsIgnoreCase("SUCCES
SFUL")){ %>
<FONT COLOR="green">
<%}else{ %>
<FONT COLOR="red">

<%}%>
<B><%=request.getAttribute("cellStatus") %></B></FONT>
<%}else{%>The result was not found<%} %></td>
</tr>	

This is my action.java which forwards to the above
	
  	request.setAttribute("cellStatus", status);
    	
    	return mapping.findForward(Forwards.CELLPING);	 

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Thursday, November 01, 2007 9:04 AM
To: Struts Users Mailing List
Subject: Re: Request.getAttribute

which tag are you using?
please display full JSP code so we can further assist you

M--
----- Original Message -----
From: "Peters, John" <Jo...@bcbsfl.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, November 01, 2007 7:37 AM
Subject: Request.getAttribute


I'm new to struts.
Setting request.setAttribute("status") in my Action.java, is there a tag
to get it in the JSP page?
To get around it I've been using <%= request.getAttribute("status") %>
Status is not a class so I don't think it should be implemented as a
bean.
I've googled without any success
Thanks in advance for any help or examples.



Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.  The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed.  This document may contain material that is privileged or protected from disclosure under applicable law.  If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Request.getAttribute

Posted by Martin Gainty <mg...@hotmail.com>.
which tag are you using?
please display full JSP code so we can further assist you

M--
----- Original Message -----
From: "Peters, John" <Jo...@bcbsfl.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, November 01, 2007 7:37 AM
Subject: Request.getAttribute


I'm new to struts.
Setting request.setAttribute("status") in my Action.java, is there a tag
to get it in the JSP page?
To get around it I've been using <%= request.getAttribute("status") %>
Status is not a class so I don't think it should be implemented as a
bean.
I've googled without any success
Thanks in advance for any help or examples.


Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate
companies are not responsible for errors or omissions in this e-mail
message. Any personal comments made in this e-mail do not reflect the views
of Blue Cross Blue Shield of Florida, Inc.  The information contained in
this document may be confidential and intended solely for the use of the
individual or entity to whom it is addressed.  This document may contain
material that is privileged or protected from disclosure under applicable
law.  If you are not the intended recipient or the individual responsible
for delivering to the intended recipient, please (1) be advised that any
use, dissemination, forwarding, or copying of this document IS STRICTLY
PROHIBITED; and (2) notify sender immediately by telephone and destroy the
document. THANK YOU.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Request.getAttribute

Posted by "Peters, John" <Jo...@bcbsfl.com>.
Unfortunately struts 1.1...I know I'm behind the times but I just came
into this application
I'll try your suggestion below.
Thank you

-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Thursday, November 01, 2007 9:44 AM
To: Struts Users Mailing List
Subject: Re: Request.getAttribute

--- "Peters, John" <Jo...@bcbsfl.com> wrote:
> Setting request.setAttribute("status") in my Action.java, is there a 
> tag to get it in the JSP page?

Which version of Struts?

If you're using a JSP 2.0 container ${status} should work, or you can
explicitly scope it if you prefer.

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org






Blue Cross Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross Blue Shield of Florida, Inc.  The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed.  This document may contain material that is privileged or protected from disclosure under applicable law.  If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Request.getAttribute

Posted by Dave Newton <ne...@yahoo.com>.
--- "Peters, John" <Jo...@bcbsfl.com> wrote:
> Setting request.setAttribute("status") in my
> Action.java, is there a tag to get it in the JSP 
> page?

Which version of Struts?

If you're using a JSP 2.0 container ${status} should
work, or you can explicitly scope it if you prefer.

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org