This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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