Advertisement

05.12.2008 at 04:23AM PDT, ID: 23394166
[x]
Attachment Details

How to get value from a HashMap in JSP while using Struts 2 framework

Asked by pradeep_brat in Java Server Pages (JSP), Java Programming Language, Jakarta Struts

Tags: Java, struts 2

Hi all,

i am using Struts 2. I have a Map that looks something like this.

Map<String,Object> map=new LinkedHashMap<String,Object> ();

Suppose key-values are

q1-object1
q2-object2
q3-object3


How do we get the value of say "q1" in jsp.


For example if in Action class we would do like this ;

map.get("q1");


How we achieve the same in using struts 2 tags in JSP. Or is scriptlets the only way (Because if possible i wouldnt want to do it using scriptlets!!)?



Thanks in advance







Start Free Trial
[+][-]05.12.2008 at 04:49AM PDT, ID: 21546031

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.12.2008 at 05:08AM PDT, ID: 21546132

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.12.2008 at 05:27AM PDT, ID: 21546232

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.12.2008 at 07:33AM PDT, ID: 21547317

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Server Pages (JSP), Java Programming Language, Jakarta Struts
Tags: Java, struts 2
Sign Up Now!
Solution Provided By: summerian
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.12.2008 at 10:47PM PDT, ID: 21552563

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 12:04AM PDT, ID: 21552816

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 01:53AM PDT, ID: 21553214

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 02:00AM PDT, ID: 21553242

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 05:10AM PDT, ID: 21554185

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 05:41AM PDT, ID: 21554409

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 12:10AM PDT, ID: 21561789

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628