dcsimg
Javascript browser detection - page redirecting gives trouble
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   m_stan_m_stan
Posted On:   Monday, November 18, 2002 09:17 AM

hi all, I am developing a JSP application. i am using the following script to forward the client to a particular page depending on the browser: ------- //detect Netscape 4.7+ if (navigator.appName=="Netscape"&&parseFloat(navigator.appVersion)>=4.7){ alert("You are using Netscape 4.7+") window.location="http://mydomainname/JSP/CreateMessage.jsp"; } version=0 if (navigator.appVersion.indexOf("MSIE")!=-1){ temp=navigator.appVersion.split("MSIE") version=parseFloat(temp[1]) } if (version>=5.5){ //NON IE browser will return 0 //alert("You're using IE5.5+") window.location="http://mydomainname/JSP/CreateMessageIE5.5.jsp"; } if (version alert("You're not using IE5.5+") window.location="http://mydomainname/JSP/CreateMes   More>>

hi all,
I am developing a JSP application.
i am using the following script to forward the client to a particular page depending on the browser:


-------



------------


I always get a NullPointerException error from tomcat when the browser is forwarded. I am not sure why. There are not problems with the JSP page , beacuse if I load the page using jsp:forward then the page works fine.


Can somebody point me to a mistake in my Javscript code?


thanks


m_stan

   <<Less

Re: Javascript browser detection - page redirecting gives trouble

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, November 18, 2002 11:09 AM

The problem must be in your jsp page, if it throws a NullPointerException from Tomcat.



Maybe your jsp is expecting something to be set in some scope, which is done correctly when you forward to it on the server side (if you say that works)?

About | Sitemap | Contact