Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-01
2
Medium Priority
?
820 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

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. …
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
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).
Suggested Courses

715 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