John,
 
ToolKit.getScreenResolution() would get you the resolution of the machine that the servlet is running on.
 
The only way to get the user's resolution that I'm aware of is using Javascript (4th generation browsers only). 
You could then use that result to populate a hidden form element to be submitted
and stored in the user's Session.
 
Disclaimer: the following is untested.
 
<!-- HTML Code -->
<SCRIPT language=javascript>
    function getWidth() { return screen.width; }
    function getHeight() { return screen.width; }
</SCRIPT>
 
<input type=hidden name=screenWidth value="<script>document.write(getWidth());</script>" >
<input type=hidden name=screenHeight value="<script>document.write(getHeight());</script>" >
 
// Servlet Code
// I'm taking short cuts here and assuming there is a handle to the session already
// and that request.getParameter() won't return NULL here
session.setAttribute("screenWidth", request.getParameter("screenWidth") );
session.setAttribute("screenHeight ", request.getParameter("screenHeight ") );
 
----- Original Message -----
From: Jianhong
Sent: Monday, December 13, 1999 6:52 PM
Subject: Re: resolution

Use ToolKit.getScreenResolution()
 
Jianhong
 
----- Original Message -----
Sent: Tuesday, December 14, 1999 6:51 AM
Subject: resolution

Is there any way to get a users system screen resolution?
 
Thanks.
 
John D. McDonald
CipherStream Systems
Phone: 925.373.8700
Fax:     413.793.6603
email: [EMAIL PROTECTED]
web: www.cipherstream.com
-------------------------------------------------------
Secure E-Business Is Our Business
-------------------------------------------------------

Reply via email to