This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
The above code is working without any errors ,On successful login it takes me to the FirstLinkPage and on invalid login it takes me to the InvalidUserPage.
FirstLinkPage.jsp
InvalidUserPage.jsp
Other jsps that I am using
CreateEmployeePage.jsp
ModifyEmployeePage.jsp
My web.xml is
The Problem
1)The problem that I face here is when I click the link on highlighted link in InvalidUserPage ,I get a page called Welcome.jsp with the two text boxes namely username and password .The password text box has its type as Text and not as password.
2)I don’t know how I got this page
Because I have created only the following JSPs and NOT a JSP called Welcome.jsp
CreateEmployeePage.jsp
Index.jsp
ModifyEmployeePage.jsp
FirstLinkPage.jsp
InvalidUserPage.jsp
3) Whenever I get back to the index jsp by clicking the link on FirstLinkPage jsp, the password text box type is changed to text(making the password visible) .when I give the correct login details after this it goes to Welcome.jsp
Can anyone please help me find a solution to this problem ,Thank you in advance
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>OOPS!!! You seem to have entered invalid login credentials try again</h1>
<a > Click here to go back to the login page</a>
</body>
</html>
I doubt, whether you get any highlighted link in InvalidUserPage.jsp, because here there no href only, are you sure, you have posted the correct code...
Regards, Prasad
SCJP 5 (93%)
nidhivel raja
Ranch Hand
Joined: Jun 26, 2008
Posts: 36
posted
0
Thank you for the reply Mr.Prasad Krishnegowda,
Sorry for the inconvenience,i didn't take notice of that part , but my jsp already has a href parameter in the anchor tag , when i paste my code here in javaranch the href attribute is removed ,i dont know the reason
When you click on highlighted link, in InvalidUser.jsp, are you sure, you will get welcome.jsp and not index.jsp, because even index.jsp displays you two text boxes... what you see in the url, index or welcome.jsp?
nidhivel raja
Ranch Hand
Joined: Jun 26, 2008
Posts: 36
posted
0
If I click the link in the InvalidUserPage ,the resulting page has the URL index.jsp and the password textbox has now become an ordinary textbox(the password i enter is now visible).
even if i enter an invalid userid password,it takes me to another page with the URL Welcome.jsp .
nidhivel raja wrote: when i paste my code here in javaranch the href attribute is removed ,i dont know the reason
This has happened to me as well. I think it's a security feature on these forums to help prevent cross-site scripting, etc. If you could, please edit your original post by placing all "<" and ">" with "<" and ">" for all the link tags:
It seems like older versions of your files exist in your deployment environment. Try doing a clean build and then re-deploying your application.
SCJP 6 || SCWCD 5
nidhivel raja
Ranch Hand
Joined: Jun 26, 2008
Posts: 36
posted
0
Thank you , for the suggestions Mr.Michael Angstadt
It seems like older versions of your files exist in your deployment environment. Try doing a clean build and then re-deploying your application.
I did as you said but i am facing the same problem.I even created a new web application but the problem with the welcome page and the text box exists ,Is there any other solution for this problem
The above servlet works fine when i run the webapp ,the Welcome page didnot appear this time(THANKS A LOT for your suggestions ) ,but when i the click the login page link in Home page and the Wronguser page i get a blank page instead of the index page(but the URL is /index.jsp) ......can you please give me a solution for this?