This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes doubt in servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "doubt in servlets" Watch "doubt in servlets" New topic
Author

doubt in servlets

Murali Jaya Rao
Ranch Hand

Joined: Jun 10, 2007
Posts: 43
hai everyone,

my doubt is when we are writing an servlet application how to know whether the request is coming from browser(form request from browser) or mobile devices? and if i want to send my response to mobile device rather than to browser how i can send?

//the request may be get or post

Murali,
SCJP 1.4.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The User-Agent request header should give you a good idea.

See:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html#getHeader(java.lang.String)


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt in servlets
 
Similar Threads
BASIC authentication doubt.
Doubt: jsp:useBean
Socket doubt
doubt regarding request parameters
doubt on a question from ibm test