Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

813 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

11 Experts available now in Live!

Get 1:1 Help Now