Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / October 2004

Tip: Looking for answers? Try searching our database.

HTTP Authentication in Java - works in MSIE but not Mozilla

Thread view: 
Scott Bell - 06 Oct 2004 20:44 GMT
On my university's site is a webpage which allows me to download
lecture notes, the page uses a menu in the form of a Java applet. The
webpage requires HTTP authentication for me to load it, the Java
applet and additional files needed for the Java applet also require a
username and password using HTTP authentication to be accessed.

Recently I changed my home OS to Linux and used Mozilla Firefox as my
browser, but I've found that I cannot open the Java applet under Linux
in either Mozilla or Firefox, my browser will either crash or freeze.
After copying the applet to my own machine for viewing in a web
browser I found that it works fine, if I password protect the
directory it doesn't.

So it seems that the Java applet under MSIE will use the
username/password which I have already entered but any other browser
will simply try and download the data without any authentication and
will simply fall over when it gets the "Forbidden" error. The source
code doesn't appear to have any sort of http authentication code
written into it, but seems to be able to authenticate using the
details entered into the browser's password box under MSIE.

I've searched Google but can't find anything related to this, does
anyone know anything about what might be causing this or how it could
be fixed, preferably without making modifications to the applet? In
all instances Sun's Java VM was used.

Thanks.
Andrew Thompson - 06 Oct 2004 20:52 GMT
> On my university's site is a webpage ..

URL?

> ..In all instances Sun's Java VM was used.

Are you certain?  What does this report?
<http://www.physci.org/pc/property.jsp?prop=java.version+java.vendor>

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane

Scott Bell - 07 Oct 2004 13:18 GMT
> > On my university's site is a webpage ..
>
> URL?

The actual URL requires a password, I have made a copy with basic
funcionality at these sites however:

<http://scottbell.org/javaauth/>
This URL should work in both IE and Mozilla (although I've only tested
it in Mozilla).

<http://scottbell.org/javaauth2/> (Username: sponge Password: sponge)
This URL has the added condition that http authentication is required.
The applet must load images from the server which require
authentication. This is where the applet fails.

> > ..In all instances Sun's Java VM was used.
>
> Are you certain?  What does this report?
> <http://www.physci.org/pc/property.jsp?prop=java.version+java.vendor>

Version: 1.5.0-rc
Vendor: Sun Microsystems Inc.

I haven't checked the VM version on IE, I know it's Sun and its a
lower version than the one I have.
Andrew Thompson - 07 Oct 2004 13:38 GMT
> <http://scottbell.org/javaauth/>
> This URL should work in both IE and Mozilla (although I've only tested
> it in Mozilla).

I just want to check something quickly..

You mean the applet on this page?
<http://scottbell.org/javaauth/menuBody.html>

Singed by..
CN=International Business Machines Corporation,
OU=Lotus Software Group,

Using class..
lotus.notes.apps.outlineapplet.OutlineApplet.class

..and requiring mayscript.

That one?

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane

Scott Bell - 07 Oct 2004 13:58 GMT
> > <http://scottbell.org/javaauth/>
> > This URL should work in both IE and Mozilla (although I've only tested
[quoted text clipped - 11 lines]
> Using class..
> lotus.notes.apps.outlineapplet.OutlineApplet.class

Yes, seems familiar.

> ..and requiring mayscript.

I'm not sure what mayscript is. Is this something I should have
installed?
Andrew Thompson - 07 Oct 2004 14:17 GMT
>>> <http://scottbell.org/javaauth/>
>>> This URL should work in both IE and Mozilla (although I've only
[quoted text clipped - 19 lines]
> I'm not sure what mayscript is. Is this something I should have
> installed?

It enables, or at least allows, Java/Javascript communication
and interaction.  

Perhaps you had better be taking this one back to the
university and/or the makers (IBM/Lotus).

It might be some sort of security restriction in the particular
browser, but the most likely candidate is Internet Explorer with
SP2, whereas you said the problem is with Moz./FF. (Which share
the same basic HTML engine).

More details *might* be forthcoming from the Java console
of the Moz/FF, but you would have to enable it before you
arrive at that page, and hope that something useful shows
in the console before the browser goes haywire and dies.

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane

Scott Bell - 07 Oct 2004 23:08 GMT
> Perhaps you had better be taking this one back to the
> university and/or the makers (IBM/Lotus).

I would have liked to have known what the problem was in the first
place. :)

> It might be some sort of security restriction in the particular
> browser, but the most likely candidate is Internet Explorer with
[quoted text clipped - 5 lines]
> arrive at that page, and hope that something useful shows
> in the console before the browser goes haywire and dies.

The Java console doesn't show me much, it just tells me that its trying
to load a data file, which the server log confirms then that it is
trying to load an image, which doesn't show up in the server log.
Nothing further is shown.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.