How to detect Browser Version using JSP ?

Hi friends,
Previously i have asked regarding browser detection.
Now i want to inquiry regarding version detection.
I have to block the users other than IE6+.
So how i do that ??
Remember : Other than IE6+ users are blocked.
Please Help Me...

well in general request.getHeader("user-agent"); should help you but in few cases it may not work in because of few security reasons.
the best work around for this problem would be usage of javascript and sending browser realted information via hidden parameter
and here is an example for you
<body>
<form name="sampleForm" action="randomAction">
   <input type="hidden" id="browserVersion" name="browserVersion" />
   <input type="hidden" id="userAgentHeader" name="userAgentHeader"/>
     <input type="hidden" id="appCode" name="appCode"/>
</form>
<script language="javascript">
  this.document.getElementById('browserVersion').value = navigator.appName+' '+navigator.appVersion;
   this.document.getElementById('userAgentHeader').value = navigator.userAgent;
   this.document.getElementById('appCode').value = navigator.appCodeName;
</script>
</body>and you would get the info by getting
request.getParameter("appCode");and etc..
hope this might help :)
REGARDS,
RaHuL

Similar Messages

  • How to Detect browser crash

    hi i want to know how to detect browser crash or the way to go about it , i can use any language to any api's plz specify me some solution .It would be really healpfull

    paul_123 wrote: hi i want to know how to detect browser crash ..
    Like the other person that replied, I do not quite understand why it is of interest that the end user's browser crashes. If, like they suspect, it is to do with your applet, I think the best solution is to launch the applet using webstart and forget the browser. If the end user launches a webstart based applet from the browser and the browser crashes, the applet will keep working just fine.
    Is your applet publicly available? If so, what is the URL where we can see it?

  • Detect browser version & type from a servlet

    How can I detect browser version & type from a servlet ?
              jo
              

    Jo,
              Pls refer SnoopServlet.java(weblogic_home/examples/servlets) which
              comes with weblogic installation.
              Kumar
              Jan-Olav Eide wrote:
              > How can I detect browser version & type from a servlet ?
              >
              > --
              > jo
              

  • Hi can anyone explain me how to  syncronize two database using jsp?

    Hi can anyone explain me how to syncronize two database using jsp?

    I thinking than you really need the jsp page for calling the java methods whith sincronize the database.You think wrong.
    You wrote a bad question.What was bad about it?
    You need a java method for sincronize the two databases using a jsp page.No you don't, see my answer.

  • Detect Browser Version & Browser Name

    Hello,
    I have written some java code to detect browser version & name but its not working in ADF. Please help to detect browser details.
    public void browserDetail(HttpServletRequest request,
    HttpServletResponse response)throws IOException,ServletException{
    response.setContentType("text/html");
    Enumeration headerNames = request.getHeaderNames();
    while(headerNames.hasMoreElements()) {
    String headerName = (String)headerNames.nextElement();
    System.out.println("BrowserName" + headerName);
    System.out.println("Header" + request.getHeader(headerName));
    Please Help
    Thanks

    Hi,
    try this: http://blogs.oracle.com/jdevotnharvest/entry/how_to_detect_browser_type
    Frank

  • How to find Software version using a copy of software without installing

    How to find Software version using a copy of software without installing

    How to find Software version using a copy of software without installing
    See answer given by Ahmed
    Right click on setup file and select properties and then details tab.
    http://social.msdn.microsoft.com/forums/sqlserver/en-US/c5424ffa-ce98-4899-ac0d-97cbcac10029/how-to-get-versionbuild-from-sql-install-media
    You can also open Mediainfo.xml to see information from Installation file
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • How to call java method using jsp

    how to call java method using jsp.....
    anyone can help me.....i having problem here...coz i very new in java and jsp.....
    thanks.....

    keep an eye on this person's thread...they have code there and everything.
    http://forum.java.sun.com/thread.jspa?threadID=777263&tstart=0

  • How to detect browser close event in flex ?

    How to detect browser close event in flex ?

    This link may help:
    http://cookbooks.adobe.com/post_Close_event_of_browser_or_browser_tab-18211.html
    Best,

  • How to detect Browser using JSP ?

    Hi friends,
    I wanna to put some code to detect browser and
    Other than IE6+ i have to block other browser to display login.
    How do i check that ? Using JSP.
    e.g.
    If i open IE6+ login page should be displayed. Else on other browsers
    it will check brower and deny to display login page.
    How Do i check it ? please Help me.

    this code works for me in IE,Safari and firefox but i could not check in netscape as i dont have.
    String userAgent = request.getHeader("User-Agent");
          System.out.println("UserAgent:"+userAgent);
          userAgent=userAgent.toLowerCase(); //convert to lowercase and then check
          if(userAgent.indexOf("netscape6") != -1)
         System.out.println("Netscape");
          else if(userAgent.indexOf("msie") != -1)
              System.out.println("IE");
         else if(userAgent.indexOf("firefox") != -1)
         System.out.println("Firefox");
         else if(userAgent.indexOf("safari") != -1)
         System.out.println("Safari");
         else
              System.out.println("Else");
        

  • How to draw a line using JSP?

    Does anyone know how to draw a line using a JSP? Any help is much appreciated.
    Regards,
    Navin Pathuru.

    Graphics classes are useless in JSP files; you can only output HTML tags to the client browser.
    You should be able to give just about any presentation look that you need with HTML and CSS. Have you played with styles? Here's a simple example that works in IE 5+ and Netscape 4.7:
    <HTML>
    <HEAD>
    <STYLE>
    .box {
    border-style:solid;
    border-color:black;
    border-right-width: 1px;
    border-top-width: 1px;
    border-left-width: 1px;
    border-bottom-width: 1px;
    .line {
    border-right-width: 1px;
    border-top-width: 0px;
    border-left-width: 0px;
    border-bottom-width: 0px;
    border-style: solid;
    border-color: red;
    width:1pt;
    height:100%;
    </STYLE>
    </HEAD>
    <BODY>
    <TABLE CELLPADDING=1 CELLSPACING=0 WIDTH=100>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field One</SPAN></TD></TR>
    <TR HEIGHT=50><TD ALIGN=CENTER><SPAN CLASS="line">�</SPAN></TD></TR>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field Two</SPAN></TD></TR>
    <TR HEIGHT=50><TD ALIGN=CENTER WIDTH=50%><SPAN CLASS="line">�</SPAN></TD></TR>
    <TR><TD ALIGN=CENTER><SPAN CLASS="box">Field Three</SPAN></TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Have fun!

  • How to open Excel Sheet using JSP?

    Hi Dear,
    I want to open Excel Sheet in client browser, How to do this using JSP?
    If it is possible to open, client can make the changes in the sheet if he saves those changes, those changes must reflect on server.
    So pl. tell me how to do this?
    Thanks

    The following code gets data from an ODBC link to an Excel spreadsheet and displays it as a HTML table. You can modify the table to include <input> fields to update the spreadsheet when the form is submitted.
    I hope that this helps. -Don
    <%
    /* Establish connection to excel database(spreadsheet)
    ODBC DSN="xltest" */
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    java.sql.Connection con= java.sql.DriverManager.getConnection("jdbc:odbc:xltest");
    java.sql.Statement st = con.createStatement();
    java.sql.ResultSet rs = st.executeQuery("SELECT * from [Sheet1$]");
    java.sql.ResultSetMetaData rsmd = rs.getMetaData();
    %>
    <html>
         <head><title>Excel Database connection test</title></head>
         <body><table border=1 cellspacing=0><tr>
    <% // Print Column headings (first row of spreadsheet)
    for (int i = 1; i <= rsmd.getColumnCount(); i ++){
              %><td id='td1'><%=rsmd.getColumnName(i)%></td><%
    }//End for
    %></tr><%
    while(rs.next()) { // Print row data
    %><tr><%
         for (int i = 1; i <= rsmd.getColumnCount(); i ++) {
                   %><td id='td2'> <%=rs.getString(i)%></td><%;}// End for
    }//End while
    st.close();
    con.close();
    %>
    </tr></table></body></html>

  • Detecting Java Version using Javascript??

    Hi,
    This is a Javascript & Java question really. The problem i have is i want to detect what version of Java a user has.
    So using Javascript i can find if java is enabled like so:
    navigator.javaEnabled();
    but i want to know what version as well.
    I tried:
    var version = java.lang.System.getProperty("java.version");
    but had not luck. does anyone know if this is possible and if so how?
    thanks,
    Chris.

    Because Sun chooses to use a weird format for their version numbers, and since Internet Explorer uses ActiveX objects instead of normal plug-ins, you'd have to write a script that could skim through the Windows registry to dig up what the latest version of the Java Plug-in is.
    Scanning through the registry isn't a problem, so much as the non-conventional versioning system that Sun has in place. With Netscape, Opera, and other non-ActiveX browsers, it's a piece of cake.

  • How to code browse option in jsp

    hi
    i m making a website in jsp
    i have a option for uploading a picture in my website.i want to code browse option in website.how can i do that in jsp.
    i mean that how can a user select a picture for uploading by clicking on browse button
    and save it to a database and again see it on some another page.
    plz help me

    <input type="file">is all what you need at the client side to get a browse dialog.
    At the server side you can fetch the file in several ways. Most commonly used is the Apache Commons FileUpload API [1].
    [1] http://commons.apache.org/fileupload

  • How to send/receive XML using JSP

    Hi,
    I'm new to all this JSP/XML stuff so apologies if this is trivial.
    I'm trying to send an XML file via HTTP POST using JSP. Anyone know how to do this?
    Once the XML has been sent, how do you use JSP to request the XML file? I've figured out how to parse it already.
    Also, is it possible to call xsql directly within JSP?
    Thanks!

    I'm trying to send an XML file via HTTP POST using JSP. Anyone know how to do this?The question is, does anybody understand what you mean by this. Let me take a guess. You want to upload an XML file to a server. If this guess is right, then the answer is don't use JSP to do that. JSP is for generating output to be sent to a client. Use a servlet to handle an upload. And you don't need to write it yourself, there are already several file-upload servlets available on the web.
    Second guess: you have a POST request that asks your server to send an XML file back to the client. If it's a static XML file you don't need a JSP or a servlet or anything, just let your web server handle it just like any other static file. If it's dynamically generated then there's an answer worth giving, but I doubt that this is your question. But if it is, let us know.

  • How to build dynamic menus using JSP==Urgent==Please Help me

    Hello,
    I have exhausted searching on internet to find a book
    which tells how to build Dynmic menus in JSP.I dont want
    to use DHTML as this becomes complex as the menu categories
    are built using data from database.Is there any workaround in
    java to do this without DHTML or atleast sample code.
    can somebody help me in this regard.
    Thanks
    Jack

    Hello a.s.kumar,
    I would be greatful if you could send me the sample code.
    [email protected]
    we can't let MM Flash run away with the show can we. Javascript can do a decent job, but the underlying menu data is static.
    Cheers, Darren

Maybe you are looking for

  • ECC5 -  error message GLT0002 while clearing open entries

    hi all, Its a scenario in ECC5. Document splitting is active and One GL account which was not active with open item management is made active now with help of RFSEPA02 program . But now if I want to clear the line item in that account the system thro

  • How to define ranges for a keyfigure

    Hi Frnds, I have two keyfigures for employee experience. One for present company experience and the second for previouse experience. And I have created a calculated keyfigure for calculating the total employee experience by adding the those two keyfi

  • 802.1x switches as intermediaries

    While viewing the documentation for configuring 802.1x on Cat Series switches; there is a statement to the effect that certain switches (Cat 2940 through Cat 3750) can be used as intermediaries. What does this really mean? Is this the edge switch its

  • HT4007 How can i use aperture to make chromakey effect

    How can i make chromakey portraits in aperture

  • Mapviewer - Spatial Data Cache

    I am trying to clear the spatial data cache in two different versions (mv10 & mv11ea) of Mapviewer without success. To confirm that the cache is being cleared I have enabled the report_stats as below in the mapViewerConfig.xml for both versions     <