| Author |
How to use Bean tag library to get values from a drop down list in jsp
|
Vidya Gupta
Ranch Hand
Joined: Mar 18, 2012
Posts: 96
|
|
Hi,
Am having a small problem.. In my jsp am having 2 drop down lists that is city and state drop down lists.. Here am selecting one city and state and submitting the page.. Nw i want to display the 2 values(city and state) which i selected.. But am unable to do this.. Please correct me if i wrong..
Here if use bean:write tag it is not displaying the result.. Here what tag should i use to capture the selected values and displaying.. Please correct me..
Thanks,
Vidya
|
 |
Aggarwal Arpit
Ranch Hand
Joined: Mar 04, 2012
Posts: 86
|
|
Try this link if it is useful to you
http://www.mkyong.com/struts2/struts-2-sselect-drop-down-box-example/
|
 |
Vidya Gupta
Ranch Hand
Joined: Mar 18, 2012
Posts: 96
|
|
i got the output already..
Thanks for your reply..
|
 |
Aggarwal Arpit
Ranch Hand
Joined: Mar 04, 2012
Posts: 86
|
|
|
you used struts 1 or struts 2?
|
 |
Vidya Gupta
Ranch Hand
Joined: Mar 18, 2012
Posts: 96
|
|
struts1
|
 |
Aggarwal Arpit
Ranch Hand
Joined: Mar 04, 2012
Posts: 86
|
|
can you post your code, how you implemented that because I have to do the same..
|
 |
Vidya Gupta
Ranch Hand
Joined: Mar 18, 2012
Posts: 96
|
|
Actually i dnt know whether it is correct or not.. but i did like this.. I had taken two different properties for year, moth and date in FormBean and i retrieved both the attributes.
DOB = <bean:write name="employeeform" property="dob_year" />
<bean:write name="employeeform" property="dob_month" />
<bean:write name="employeeform" property="dob_date" />
<br />
|
 |
Aggarwal Arpit
Ranch Hand
Joined: Mar 04, 2012
Posts: 86
|
|
Thanks Vidya for your post.......
|
 |
Sandy Chatterjee
Ranch Hand
Joined: Jun 27, 2012
Posts: 55
|
|
You can write:
|
Take up one idea. Make that one idea your life; dream of it; think of it; live on that idea. Let the brain, the body, muscles, nerves, every part of your body be full of that idea, and just leave every other idea alone. This is the way to success.
|
 |
 |
|
|
subject: How to use Bean tag library to get values from a drop down list in jsp
|
|
|