Redirect to same jsp page on successful login

Redirect to same jsp page on successful login

Hi,

I have an application where on successful login, the redirect should happen to same page with a session created for the user. On login, i have some dropdowns which are populated from the database. I am unable to create the session for the same login page. Please help with some code. Not sure how to do this.

regards sam

View Answers

June 17, 2013 at 6:54 PM

hi friend,

You may use the action or you may get the request dispatcher and then you can include your required page. You can write the code for session creating on the page that you want to include.

To read more in detail how to include the page in jsp you may go through the link, may this will be helpful for you.

http://www.roseindia.net/jsp/simple-jsp-example/DifferentWaysToIncludeFile.shtml

Thanks.









Related Tutorials/Questions & Answers:
Redirect to same jsp page on successful login
Redirect to same jsp page on successful login  Hi, I have an application where on successful login, the redirect should happen to same page... from the database. I am unable to create the session for the same login page
login for different user in the same page
login for different user in the same page  how can i do the login for different user in the same page throug jsp
Advertisements
using ajax and jsp (struts) to login and remain on same page.
using ajax and jsp (struts) to login and remain on same page.  I am a fresher... I can forward my login page to success page using struts, but I want to remain on same login page and just want to display loggers name ... I don't
how to redirect jsp page to extjs
how to redirect jsp page to extjs   my requirement is redirect jsp page to extjs form. Am using spring mvc...my welcome page is index.jsp from that index.jsp i need to redirect to extjs. can any one help me in this thanks
jsp login page
jsp login page  hi tell me how to create a login page using jsp and servlet and not using bean... please tell how to create a database in sql server... please tell with code
JSP LOGIN Page
JSP LOGIN Page  sir....i have two user types usercategory and user and both user have userid and password in two different table and now i am making login page for which i have to retrieve usertype,userid and password from two
validating username and password in servlet and redirect to login page with error message if not valid
validating username and password in servlet and redirect to login page with error message if not valid  hi i want to validate my login page username... error message saying "Invalid username and password" in my login page. please help
jsp login page
jsp login page  Hi All, can any one tell me how to create Login page using JSP and Beans. A simple log in page. Please reply ASAP.ADS...:ADS_TO_REPLACE_2 JSP Login Using Bean Thanks   Hi,ADS_TO_REPLACE_3
How to use filter to redirect to login page after session timeout.
How to use filter to redirect to login page after session timeout.  ... then automatically it should redirect to login page from where user has to login again to access the resources. I know filters are used for this but do
How to use filter to redirect to login page after session timeout.
How to use filter to redirect to login page after session timeout.  ... then automatically it should redirect to login page from where user has to login again to access the resources. I know filters are used for this but do
display results on same jsp page
display results on same jsp page  is there any method to display search results from database on the same jsp page where i give the inputs using struts 1.2
display results on same jsp page
display results on same jsp page  is there any method to display search results from database on the same jsp page where i give the inputs using struts 1.2
display results on same jsp page
display results on same jsp page  is there any method to display search results from database on the same jsp page where i give the inputs using struts 1.2
add same tables in jsp page
add same tables in jsp page  hi I have a table in my jsp page with data, now I want to add same copy of table without its default value in same page whenever I click add more table, how do I do
How to use filter to redirect to login page after session timeout
How to use filter to redirect to login page after session timeout  hello Sir, I have to make a web application in which i have to give session... then automatically it should redirect to login page from where user has to login again
JSP Login Page Question
JSP Login Page Question  hey..i have a login page where different users first registered and then after they can login. my question is how a user can see only his data after login where different users data are stored
Jsp redirect
can also redirect the jsp page in a jsp. Here is the code of redirect.jspADS... Jsp redirect     ... a page in JSP. You can see in the given example that we have used the method
login page with mysql using jsp
login page with mysql using jsp  pls i need a sample of login page to check username and password in mysql database. thanks
Show image and text on same jsp page
Show image and text on same jsp page  Hi all, I have to display image and text on the same jsp page. The text and image are both retrived from mysql database. The image is shown correctly on seperate jsp page but when shown
staying in same page after deliting arow in jsp page - JSP-Servlet
staying in same page after deliting arow in jsp page  Hello Sir, I want to stay back in current jsp page after deleting row in jsp table. how can..., As per your problem visit this link..... http://www.roseindia.net/jsp
redirecting a login authenticated form to a form to be displayed on the same page from where the login authentication has taken place.
redirecting a login authenticated form to a form to be displayed on the same page from where the login authentication has taken place.  I am successfully able to create a session on successful login, but I want to display
Redirect page
Redirect page  In this code redirect tag is not work, so please help me ,how to redirect page in Tiles With JSTL . <%@ taglib prefix="tiles"uri.../jsp/jstl/sql" prefix="sql" %> <%@page contentType="text/html" pageEncoding
Get form value in same page - JSP-Servlet
Get form value in same page  Hello friends, Can we get a form field value in the same to be processed in java coding... friend, For solving the problem visit to : http://roseindia.net/jsp/user
login page using jsp servlrt with mysql database?
login page using jsp servlrt with mysql database?  Description... table login. After successfully login user1 see only index page,if user2 login then he see only visiter page and so on. please gine me any suggession. Thanks
Successful Login
display checked ckeckbox in same jsp page
display checked ckeckbox in same jsp page  how to display checked ckeckbox in same jsp page?   Hi, Here is the html code to display check... jsp page. (for example, as it happens in VB that after clicking checkbox
how to connect jsp with sql database by netbeans in a login page?
how to connect jsp with sql database by netbeans in a login page?  how to connect jsp with sql database by netbeans in a login page
how to connect jsp with sql database by netbeans in a login page?
how to connect jsp with sql database by netbeans in a login page?  how to connect jsp with sql database by netbeans in a login page
how to connect jsp with sql database by netbeans in a login page?
how to connect jsp with sql database by netbeans in a login page?  how to connect jsp with sql database by netbeans in a login page
code for user registration page and login page of emails using jsp
code for user registration page and login page of emails using jsp  hiiiiiii please send me the code for user registration page and login page of email using jsp and servlets and also code for database connectivity to oracle
admin login control page - JSP-Servlet
admin login control page  how to encrypted password by using jsp... adminPage.jsp?  JSP Example code for encrypted passwordJSP Encrypted Password Example CodeadminPage.jsp<html> <title>Admin login
Direct jsp coding for gmail login page and to open mail
Direct jsp coding for gmail login page and to open mail  DEAR SIR, i'm urgently in need of jsp coding to create login page of gmail and to open mail
how to use dropdown list in JSP and display value in same page
in the same page Value selected = C How can we do this in a JSP page...how to use dropdown list in JSP and display value in same page  I... one option the value must get displayed below it in the same page
populating a screen on the same page
populating a screen on the same page  i'm making a time table in jsp. i have put button on each slot.if a person click on that slot it'll redirect... to select the subject and faculty....so that we dont need to redirect to other page
login page
login page  code for login page
login page
login page  pls say how to create a login page in jsp and mysql using netbaens   Hi Friend, Please visit the following links:ADS_TO_REPLACE_1 http://roseindia.net/jsf/netbeans/index.shtml http://roseindia.net/jsp
send redirect in JSP - JSP-Servlet
send redirect in JSP   How can I include a message i.e "redirected to this page because blah blah" in the send redirect page?  Hi friend, Please specify your problem the message print on the redirect to the next
JSP LOGIN
JSP LOGIN  sir....i have two user types usercategory and user and both user have userid and password in two different table and now i am making login page for which i have to retrieve usertype,userid and password from two
How to browse and upload the file in same page using jsp.
How to browse and upload the file in same page using jsp.  Hi Sir, I am doing a project in jsp servlets and i want to browse and upload the file in cell if a table in same page, post answer as soon as possible.thanks
Login page
Login page  how to create Login page in java
How to browse and upload the file in same page using jsp.
How to browse and upload the file in same page using jsp.  Hi, I am doing a project and i want to browse and upload the file in same page inside.... Regards, Santhosh.   Here is a jsp upload file application. The given code
login in jsp
and otherwise show the failed message.   JSP Login Form 1)login.jsp: <html>...login in jsp  i need code for login which is verify the registeration...;</font></label> <% } %> 2)check.jsp: <%@page import
Login Page
Login Page  Can anyone tell me the steps to create a login page in myeclipse 7.0 and validating it with login database in db2 9.7 ??? Please tell me
login page
login page  hi i'm trying to create login page using jsp. i get... the program. Following are my programs... 1.index.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> JSP Page
open pdf file in same jsp page and the pdf file should retrieved from database
open pdf file in same jsp page and the pdf file should retrieved from database  Hai all, I need code to open a pdf file in same jsp page(browser) while click on hyperlink And the file was located in database table. Can any
login page
login page  How to login as different user in php
Servlets errors in same page.
Servlets errors in same page.  How do I display errors list in the same page where a form field exists using servlets...........i.e. without using JSP? Please explain with a simple username password program
JSP - Login
JSP - Login  how to disabled back button of the browser when user successfully logged
LOGIN PAGE
LOGIN PAGE  A java program with "login" as title,menus added, and a text field asking for firstname, lastname, and displaying current date and time
Jsp login with Cookie - JSP-Servlet
Jsp login with Cookie  9) Create an HTML page containing the following features a. Create a login JSP page with username , password and submit... cookies to store username and password. c. Open login JSP page on a new browser

Ads