jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Accessing form members... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Accessing form members..." Watch "Accessing form members..." New topic

Accessing form members...

Tom Diamond
Ranch Hand

Joined: May 10, 2001
Posts: 98
Is there a way to access a form member (textfield, textArea, and so on) in a JSP page?
I mean is there an equivalent to javascript's

What I actually want to do is to take the text from a textField and pass it as a parameter to another jsp with the click of a custom button (not the default <input type=submit> ) :


[This message has been edited by Tom Diamond (edited October 15, 2001).]
Karen Berx

Joined: Oct 15, 2001
Posts: 3
I don't think you can do it in JSP only.
You can do a get on your current JSP page. Then you can receive the parametervalues of your form-fields.
Or use javascript in your JSP-pages. I do that.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

well remember that JSP is server side, so your <%= %> tags won't have anything in them, because the client side has to fill them in first.

what about simply calling javascript inline? I'm not too good at javascript, but I remember having to do something very similar to this.. tomorrow at work I'll look it up and post, if my memory isn't totally shot.
Tom Diamond
Ranch Hand

Joined: May 10, 2001
Posts: 98
I 've tried Javascript and it works just fine but if anyone knows something more I would like to know...
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Accessing form members...
It's not a secret anymore!