Solved

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

Posted on 2006-11-01
2
762 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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now