Solved

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

Posted on 2006-11-01
2
791 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 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

830 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