Re: T5 Internet Browser Detection?

2010-09-22 Thread Thiago H. de Paula Figueiredo

On Wed, 22 Sep 2010 04:33:38 -0300, ael  wrote:


Is it possible that tapestry can detect web browser?


Yes. Just @Inject Request and use request.getParameter("User-Agent") to  
get the user agent string.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T5 Internet Browser Detection?

2010-09-22 Thread Kristian Marinkovic
you'd have to implement a HttpServletRequestFilter or better a Dispatcher 
that analyzes the http headers and redirects to other pages or sets some 
global state that is used during page rendering. A Dispatcher is more 
convenient as you can use all the tapestry services and don't have to use 
the servlet api directly.

g,
kris



Von:ael 
An: users@tapestry.apache.org
Datum:  22.09.2010 09:34
Betreff:T5 Internet Browser Detection?




Is it possible that tapestry can detect web browser?

I already implement it using JQuery.
Using

script type="text/javascript">
$(document).ready(function(){

if($.browser.msie)
{
if($.browser.version == 4.0)
{
window.location = "http://www.google.com";; 
alert("Please install the latest IE Browser!");
}
}
});


But i want to use Tapestry so that it can return into another page.

Is this possible?

Any ideas? ^_^.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Internet-Browser-Detection-tp2849300p2849300.html

Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org