Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to check the display screen size?

 
Anitha Aravind
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,
I am doing a web application for a PDA and I would like the application to be customized to any screen I display. I mean It should align the objects according to the screen size.
How do I do it in JSP? How do I check or get the display screen size.
Anitha
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't. JSP has no way of knowing anything about screen sizes or other client-side information. You will need to perform some client-side operation to find out this kind of info. I do not know what the PDA client allows, but if it is Javascript-capable, you should be able to do this with some simple Javascript code. If not, then you need to find out what the PDA client can do for you in this regard.
I'll move this off to the HTML/Javascript forum for any further discussion.
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using JavaScript, you could use window.screen object.
Here is a description
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic