wood burning stoves*
The moose likes Servlets and the fly likes servlets/jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets/jsp" Watch "servlets/jsp" New topic
Author

servlets/jsp

sri chinta
Greenhorn

Joined: Aug 30, 2005
Posts: 6
The user enters some values on a JSP .There are some radio buttons on the JSP to be selected by the user. Then i want the Servlet to perform the calculation according to the option selected for example: say i gave ADD button in my JSP then servlet should perform it and send the results back to the same JSP and display the result.Thank u for seeing and any help will be highly appreciated.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

OK, there are your requirements.
What have you got so far?
What part are you stuck on?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
sri chinta
Greenhorn

Joined: Aug 30, 2005
Posts: 6
Ok....my i built my jsp page witht the following code.After values of A &B are given i wanted to know how should the operation for a particular selection of radio button (selected in jsp)be performed in servlet so that result is sent back to jsp.


[Code tags added]
[ August 30, 2005: Message edited by: David O'Meara ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

In your servlet's doPost method:
sri chinta
Greenhorn

Joined: Aug 30, 2005
Posts: 6
Thank u...i do really appreciate your help
Anoop Kavalloor
Greenhorn

Joined: Sep 06, 2004
Posts: 15
Firstly u need to put your questions in the right format.
Alright try this out. Instead of keeping all the fields hidden (which wont help your cause anyways), you should keep just one field hidden. On the click of the respective button, say add button, use javascipt to populate the hidden field. Also use javascript to submit your form. This way your servlet will get the parameter and can take further course of action according to the action.
Hope this helps you.


I am not completely useless.<br />I can be used as a bad example.<br /> <br />SCJP 1.4
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

"Unqualified Genius",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. 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.

Thanks!
bear
Forum Bartender

P.S. You would think that an "unqualified genius" would know how to spell "you".
[ August 31, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: servlets/jsp
 
Similar Threads
How to open MS Word file in Internet Explorer using java
selected value passing to Serrvlet
access rows from html table
Create a Form with iterating rows, with the same data
how to get the row object of display object in javascript