Forums Register Login

how to know the device type in JSP.

+Pie Number of slices to send: Send
Hi All,
Our application supports both PC as well as hand held devices for the business.
the PC will have standard browser and the Handheld device will have mini version of the browser. I am planning to write a controller servlet or jsp which finds out the device type and sends the different version of jsp to the individual devices. This is because the browser in handheld devices doesn't support screens which have heavy graphics and heavy content.
Can you pl give me some pointers how to identify the device type in the controller.
Thanks in advance.
Sudhakar.Y
+Pie Number of slices to send: Send
Seems to me you should be able to find out the kind of browser used from the request headers. I would try request.getHeaderNames() which returns an Enumeration of header name strings.
You might have to cast the request reference to HttpServletRequest in order to use getHeaderNames.
Bill
+Pie Number of slices to send: Send
vydeek,
Please change your name to be compliant with JavaRanch's naming policy. It should not be obviously fictitious.
Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name.
You can change your name: here.
Thanks,
Cindy
Life just hasn't been the same since the volcano erupted and now the air is full of tiny ads.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1524 times.
Similar Threads
PC vs X-BOX/PS2
Bar code reading
Sending SMS thru Palm
Defining CSS for Blackberry and PC
Need to identify tools for synchronizing application/data with server
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:28:54.