You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Morycz, Felicia V" <fe...@eds.com> on 2002/08/28 14:00:56 UTC
Want to Access Key/Value Pairs in Hashtable within jsp
I have done some archive searching and cannot seem to hit this topic.
My business tier is going to be sending me a chunk of data that is delimited
into key/value pairs. I want to parse this data and put it into a
Hashtable. I want to be able to access this data from a jsp.
1. Is Hashtable the correct storage object?
2. How should the Hashtable be stored on the request, wrapped inside a
bean?
3. What is the syntax in the jsp to retrieve the values given a key?
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
LookupDispatchAction......Button Naming problems
Posted by Rajesh Kalluri <rk...@manduca.com>.
Hi All i have a use cse using a LookupDispatchAction i have a button named
"preview" which i want to change to "Preview".
I tried changing my Action class with the new notation with out luck, also
is it possible to have a different method name than the button, i will have
to internationlize my application and looks like i am stuck. Any ideas would
be appreciated.
Application.properties :
button.media.preview = preview.....want to use Preview or spanish version of
it
Action Class:
protected Map getKeyMethodMap() {
Map map = new HashMap();
map.put("button.media.preview", "preview"); ......can i trade in
"preview" with some thing else and name the method the same
return map;
}
public ActionForward preview(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
return mapping.findForward("preview");
}
Regards
Rajesh
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Want to Access Key/Value Pairs in Hashtable within jsp
Posted by Joe Latty <jo...@team2media.com>.
If your using Struts 1.1-b2 check out org.apache.struts.util.LabelValueBean
Joe
-----Original Message-----
From: John Raley [mailto:jb_raley@mindspring.com]
Sent: Thursday, 29 August 2002 12:28 AM
To: Struts Users Mailing List
Subject: Re: Want to Access Key/Value Pairs in Hashtable within jsp
Morycz, Felicia V wrote:
>I have done some archive searching and cannot seem to hit this topic.
>
>My business tier is going to be sending me a chunk of data that is
delimited
>into key/value pairs. I want to parse this data and put it into a
>Hashtable. I want to be able to access this data from a jsp.
>
>1. Is Hashtable the correct storage object?
>
>
Hashtable might be convenient for you but JSP tag libs (especially in
Struts) are very bean-centric.
>2. How should the Hashtable be stored on the request, wrapped inside a
>bean?
>
>
You could represent the Hashtable as a bean with this API:
dynclass.sourceforge.net
>3. What is the syntax in the jsp to retrieve the values given a key?
>
>
<jsp:getProperty/> is the "built-in" way, although the Struts
<bean:write> and <bean:define> tags are preferred.
--
Check it out: Map -> JavaBean
http://dynclass.sourceforge.net/
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Want to Access Key/Value Pairs in Hashtable within jsp
Posted by John Raley <jb...@mindspring.com>.
Morycz, Felicia V wrote:
>I have done some archive searching and cannot seem to hit this topic.
>
>My business tier is going to be sending me a chunk of data that is delimited
>into key/value pairs. I want to parse this data and put it into a
>Hashtable. I want to be able to access this data from a jsp.
>
>1. Is Hashtable the correct storage object?
>
>
Hashtable might be convenient for you but JSP tag libs (especially in
Struts) are very bean-centric.
>2. How should the Hashtable be stored on the request, wrapped inside a
>bean?
>
>
You could represent the Hashtable as a bean with this API:
dynclass.sourceforge.net
>3. What is the syntax in the jsp to retrieve the values given a key?
>
>
<jsp:getProperty/> is the "built-in" way, although the Struts
<bean:write> and <bean:define> tags are preferred.
--
Check it out: Map -> JavaBean
http://dynclass.sourceforge.net/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>