JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 14th, 2001, 10:25 AM
acoassin acoassin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 3 acoassin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to acoassin
Replacing Javascript with JSP??

As with many of the posts to this board, this is rather urgent.

In a home page, I currently have the following:

---------------------------------
<a href = "javascript:document.mainForm.submit()">Log in to portal</a> <form action="file1.jsp" method="POST" NAME="mainForm">
<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.

Thanks,

Alex

Reply With Quote
  #2  
Old June 14th, 2001, 12:05 PM
peter27d peter27d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Iassy - Romania
Posts: 2 peter27d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to peter27d
Unhappy 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!
Peter.

Reply With Quote
  #3  
Old June 14th, 2001, 12:15 PM
acoassin acoassin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 3 acoassin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to acoassin
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.

- Alex

Reply With Quote
  #4  
Old June 14th, 2001, 12:42 PM
peter27d peter27d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Iassy - Romania
Posts: 2 peter27d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to peter27d
Hmm...

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
name=USER
name=PASSWORD
and do a little bit of encoding when it comes to values
like:
name=xpw value=dhfjkh instead name=USER value="guest"
and in the jsp decode the values
Peter.

Reply With Quote
  #5  
Old June 14th, 2001, 01:31 PM
rkgemini rkgemini is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: fremont,CA,USA
Posts: 1 rkgemini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why not try using session variables as is being done in ASP?Is this feature supported in JSP?

Reply With Quote
  #6  
Old June 14th, 2001, 01:43 PM
acoassin acoassin is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Posts: 3 acoassin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to acoassin
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.

Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Replacing Javascript with JSP??

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap