Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question on jsp

 
sarath gowd
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have one combo box in my jsp
UserType:<select name="uType">
<option name="Admin">Admin</option>
<option name="User">User</option>
</select>
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
Posts: 136
Java MySQL Database Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic