|
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
") );
|
- resolution John McDonald
- Re: resolution Jianhong
- Re: resolution Lance Lavandowska
- Re: resolution Chris Gow
