LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-09-2004, 10:27 AM   #1
ashirazi
Member
 
Registered: Jul 2004
Posts: 60

Rep: Reputation: 15
java: reading secure website


Hi,

Im aware of reading webpages using BufferedReader in java. But How would I read a page that requires authentication i.e. username/pasword? Any hints or clues?

Thanks
raven
 
Old 11-09-2004, 10:55 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
This looks helpful: http://javaalmanac.com/egs/java.net/Auth.html?l=rel

If it uses SSL (https), I would suggest reading this: http://java.sun.com/developer/JDCTec...04/tt0817.html
 
Old 11-09-2004, 11:26 AM   #3
ashirazi
Member
 
Registered: Jul 2004
Posts: 60

Original Poster
Rep: Reputation: 15
got it thanks,

but i get this error:

Code:
java.lang.SecurityException: Unable to locate a login configuration
	at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
	at java.lang.Class.newInstance0(Class.java:306)
	at java.lang.Class.newInstance(Class.java:259)
	at javax.security.auth.login.Configuration$3.run(Configuration.java:221)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:215)
	at javax.security.auth.login.LoginContext$1.run(LoginContext.java:170)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.LoginContext.init(LoginContext.java:167)
	at javax.security.auth.login.LoginContext.<init>(LoginContext.java:404)
	at SecureReader.main(SecureReader.java:23)
Caused by: java.io.IOException: Unable to locate a login configuration
	at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
	at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
	... 14 more

Im using eclipse and when i click on any of these errors I get a class editor window which says "Source not found - The jar file rt.jar has no source attachment." It then has a button to link the jar file.

Do you have any idea whats with that?

Thanks
raven
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java - reading from stdin greg108 Programming 4 01-13-2005 03:29 PM
Problems viewing a secure website (Internet banking) matux Linux - Security 16 10-29-2004 10:14 AM
Java - Reading /dev/mouse - appears to be empty chakkerz Linux - Hardware 1 08-19-2004 07:48 PM
pls,advice me good website to learn Java vanhelsing Linux - Software 1 06-09-2004 01:24 PM
apache install disrupting secure website access? edsmithers Linux - Networking 3 04-23-2004 05:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration