Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Singning into a website  programmatically through a web application JAVA/Javascript/JSP

Posted on 2006-11-01
2
Medium Priority
?
831 Views
Last Modified: 2012-06-27
I need to write a web application that will  ask user to specify a website and then provide a user name and password to login to that  site and open the  website page as that user logged in.
I am looking fwd to see comments in terms of JAVA/JSP/ and prefferrably Javascript
 For authentication  to the guest site (Where user will login through script or program)I am assuming no encryption for   now simplt GET and POST will work.
Thanks
0
Comment
Question by:mostenscer
2 Comments
 

Accepted Solution

by:
MikePutnam earned 1000 total points
ID: 17855031
I've used "twill" (python) for programmatically logging into web sites.  Below is a sample script that includes install instructions.



#
# 1) Install Python (I used 2.4.3) http://www.python.org  You will also want to modify your Windows "PATH" environment (C:\Python24\;) variable to allow you to say "python" from any directory.
# 2) Download and run the easy_install module http://peak.telecommunity.com/dist/ez_setup.py in python.  Again you will want to add to your "PATH" (C:\Python24\Scripts;)
# 3) Insall "twill" by saying: easy_install http://darcs.idyll.org/~t/projects/twill-0.8.5.tar.gz
# 4) Say: twill_sh <the twill script you want to run>
#
# Command List: http://darcs.idyll.org/~t/projects/twill/doc/commands.html
#

#setlocal username <username goes here>
#setlocal password <password goes here>

setlocal username JoeUser
setlocal password JoesPassword

# If you want to watch HTTP headers (like response codes) set this to "1"
debug http 0

config use_tidy 0
config use_BeautifulSoup 0
config allow_parse_errors 0

#Impersonate Firefox
#agent "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"

#Impersonate IE6
agent "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"

go http://somewebsiterequiringlogin

formvalue 1 userid $username
formvalue 1 pwd $password
submit

# Now you can navigate within the site

go http://someotherarea1

go http://someotherarea2

exit
0
 
LVL 2

Author Comment

by:mostenscer
ID: 17860191
well I have developed the application that will open the website in an iframe. what I need to do is have it  fill the login form automatically with the info I provide
I am using java and velocity for server side and on client side i have html/javascript
for instance site is www.example.com/login.cfm 
how would I ensure that once I link to that website the username and password goes in automatically.
thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question