The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Here's my scenario

Posted by Hiran on January 17, 2002 at 1:59 PM

I'm creating a server/client based application using Java. For the client side, I was thinking of using an applet instead of a stand alone application. But the client needs to have access to read and write files. With the APPLET tag, I would just create the client application, create a HTML doc and include the client part using the APPLET tag. But like I originally asked, I want to use the J... classes for the GUI in my application, and that means I can't use the APPLET tag. So, if I can only use the EMBED and OBJECT tags (for Netscape and IE, respectively), I would most likely have to have two versions of the HMTL doc, one for IE users, and one for Netscape users. Now I could have a single main page that the user is brought to, and then have them click on the browser they use (and thus direct them to the appropriate page), but is there anything else I can do to perhaps automate that, so the user doesn't have to decide? Thanks

> Yes, you can know the browser used. How to get the browser type depends on your language you are using on server side. If you are using JSP then y9ou can get the browser using

> request.getHeader ( "User-Agent" ). When you use HTML converter then it takes care of browser type when it generates the OBJECT and EMBED tags for applet taga.

> Thanks
> Kishori


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us