Hi You can go to, http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/ and look at the User-Agent request header returned by the browser in the HttpServletRequest object, which is accessible to JSPs via inbuilt object named- request. Please try go google on User-Agent format to see how to really detect the browser from that string... Regards Maulin
Thanks a lot.... if i am running on IE request.getHeader("User-Agent") returns Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) And in netscape am getting Mozilla/4.7 [en] (WinNT; I). Now How to compare This and take a decision.should we check the whole string and accordingly do the operation???smallconfussion....
hai, u can call this function and see. <SCRIPT LANGUAGE="JavaScript"> function aaa() { alert(window.navigator.appName); } </script> in the alert box u get the type of browser. jyothsna
place the above code before the body tag of a jsp page and call the function on onload of the body tag. tried to paste the code but some error is commimg.
u want the browser type in u'r java class? if yes then u can get the type from jsp page and set in a session variable and pass it to u'r java class. if no,then pls give me some details so that i may help u. jyothsna
Thanks Jyothsana.......Now how to call window.open() for netscape. This is working with IE but not with Netscape... window.open("browsertest.jsp","","alwaysRaised=yes,dependent=yes,height=200,width=300,menubar=no,resize=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no");