wood burning stoves
The moose likes JSP and the fly likes JSP Form values Not able to submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Form values Not able to submit" Watch "JSP Form values Not able to submit" New topic

JSP Form values Not able to submit


Joined: Mar 13, 2001
Posts: 19

I have one JSP in this I have two select boxes.

The first select box is populated with default values.

From the first select box I am selecting the value and moving to the other select box using java script.

Now the value in the second select box has to be submitted alongwith some other values which I am getting.

These values are to be submitted to a Action class and further to the form bean using struts.

In the form tag in JSP I am calling the struts action class.

The issue here is,I am able to get other values except the values in the second select box.

I am using simple JSP page to get form values and submitting.

I am not using struts tlds because of project constraints.

Please advise on how to pass these values.


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63858


We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Forum Bartender

[Asking smart questions] [About Bear] [Books by Bear]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33119

Just to make sure I am understanding correctly: you are trying to submit one or more values from a secondary select box.

If this is correct, the solution is to use javascript to loop through and select all the values in the second select box. (You can call a function on form submit.) A parameter is only passed if it is selected. This provides a way around that.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: JSP Form values Not able to submit
It's not a secret anymore!