File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes question on jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "question on jsp" Watch "question on jsp" New topic

question on jsp

sarath gowd

Joined: Sep 19, 2011
Posts: 13

I have one combo box in my jsp
UserType:<select name="uType">
<option name="Admin">Admin</option>
<option name="User">User</option>
I want to retrieve these two values in to my servlet..........and i want to develop a login page with mysql database .......
Please help me as soon as possible..........
Sabarish Venkat
Ranch Hand

Joined: Jan 18, 2012
Posts: 136

Move the form to a servlet and get the values of combo box using getParameter() then store it in DB... Simple ...
Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 498
Sarath, Welcome to Javaranch :)

I want to retrieve these two values in to my servlet

Do you know 'Form' tag in HTML? It will be useful here.

i want to develop a login page with mysql database

If you break down this requirement,

- Create a login page with necessary fields.
- User clicks login button.
- That in turns calls, Servlet (Controller)
- You get the user input and authenticate the user against database in this case MySQL.
- You take proper action(letting user in the app or giving wrong credentials message) depends upon your authentication result.

Good luck :thumbup:
I agree. Here's the link:
subject: question on jsp
Similar Threads
Issue with POST and Forms
Finding number of options selected in multiple choice button
How to change color in the options using html:options
remitting values
I want to fill a Listbox with values dynamically using JSP when I press a button