June 14th, 2001, 10:25 AM
As with many of the posts to this board, this is rather urgent.
In a home page, I currently have the following:
<input type=hidden name=USER value=guest>
<input type=hidden name=PASSWORD value=guest >
<input type=hidden value=/file2.jsp name=target>
As with any HTML or Javacript code, this will obviously be available to anyone who viewed the soure.
What I am looking for, is to somehow have the functionality in the code above, which is essentially posting to a form with hidden variables, replaced with something that won't be viewable by the user. My guess is that I can do some server side coding, but I can place my finger on what to do.
June 14th, 2001, 12:05 PM
here is an Idea!
My guess is that you wanna pass the username and ???password from one jsp to another! Instead of doing this, issue a cookie after the user has been authenticated and use the cookie to store/retrieve the username. You won't need to check for the password since the simple presence of the cookie means that the user has already entered the right password.
Anyway, this is my idea!
June 14th, 2001, 12:15 PM
Thanks for the quickly reply.
The problem I can see with that though, is that the user will not be authenticated at that point. I am actually using the code in my earlier message to authenticate a user as "guest" with a "password" of guest". I just can't figure out how to hard code that information so users can't see the user name and password, and privately pass that information to my authentication file2.jsp page.
June 14th, 2001, 12:42 PM
My guess is that you want to pass "user=guest" and "password=guest" as some king of default username and password to the file1.jsp then in file1.jsp push a form to the user and data from that form submited to the second jsp (file2.jsp)
One of the ideas that comes into my mind is:
Use names less conspicuous like
and do a little bit of encoding when it comes to values
name=xpw value=dhfjkh instead name=USER value="guest"
and in the jsp decode the values
June 14th, 2001, 01:31 PM
Why not try using session variables as is being done in ASP?Is this feature supported in JSP?
June 14th, 2001, 01:43 PM
Do you have any coded expample of how this is done in ASP. This particular web server is running IIS so I would be able to use it.