0

Hi,I have a login page which accepts user id and password.On successful entry user navigates to next page.I wish to display a welcome message with user name like "welcome xyz!"..how can i get user name from user id and password (entered in the login jsp file) be displayed in next(successful-login )jsp file that has the welcome msg?...I am using javabeans for db connection and other business logic.

Page1------------
enter user id and password

Page2------------
display a welcome msg with user name

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by stultuske
0

What have you written so far, what is your problem and how good are you concerning HTML, jsp pages and DB queries

0

add the username as an attribute to the request (or to the session) after you've pressed the button on the first page, and retreive it in the next .jsp file

something like :
request.setAttribute("name",form.name);

Hello, <%request.getAttribute("name");%>

0

But im not takin name from the user..only user id and password.with this info i wish to display user name in the nxt page..

0

use a sql instruction with the correct where clausule

"select name from userTable where user_id like " + request.getAttribute("user_id");

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.