jQuery in Action, 3rd edition
The moose likes Struts and the fly likes JSP not returning the values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JSP not returning the values" Watch "JSP not returning the values" New topic

JSP not returning the values

vinoth kumar v

Joined: Sep 27, 2010
Posts: 6

Iam loading <html: option>(TicketTypes) dropdownbox from database.

But when a form is submitted the returned value for the ticketType is <% out.println(ticketTypes[i]); %> iam not getting variable name.

How can i get the dbitemname instead of <% out.println(ticketTypes[i]); %> in the ticketType variable in the form bean.
for eg.,

ticketTypes = {"apple","orange"}
If a person select "apple" in the dropdown box.
ticketType should be sent as "apple"
But in here it is sent as <% out.println(ticketTypes[i]); %> to the form bean.

Please shed some light on me.

Thanks in advance.
Jaimesh M Ponkia

Joined: Nov 24, 2010
Posts: 21
No need to use for loop in jsp when you have the values in the bean property.

Have a look at the code below:

vinoth kumar v

Joined: Sep 27, 2010
Posts: 6
Thanks a lot . .
iam able to get the values now
It is sorta covered in the JavaRanch Style Guide.
subject: JSP not returning the values
It's not a secret anymore!