Detect browser using velocity

Can any one tell me how the codes are written in velocity to detect browser.

AmitChalwade123456 wrote:
rrp wrote:
Can any one tell me how the codes are written in velocity to detect browser.what's this velocity ?? share u r knowledge with usVelocity is a templating engine. [ http://velocity.apache.org/ ].
I think I would put the browser discovery code (if I really had to use it) in controller. (Or JavaScript).

Similar Messages

  • 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 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?

  • Sharepoint foundation 2013: office docs can be opened in browser using IE but not in firefox or chrome?

    Hi
    Sharepoint foundation 2013:
    why when we open an excel or word  using chrome and firefox browser it wants to download the file.
    It can be opened in browser using IE but not in firefox or chrome?
    Any issues?
    Thanks

    Hello MGerio,
    Can you check what your Browser File Handling settings are of the web application (of the excel/word files)?
    http://social.technet.microsoft.com/wiki/contents/articles/8073.sharepoint-browser-file-handling-deep-dive.aspx
    - Dennis | Netherlands | Blog |
    Twitter

  • How can I open and close private browsing using an IPAD mini in IOS 7?

    How can I open and close private browsing using an iPad mini in ios7?

    Tap the '+' to the right of the URL field to open a new tab, and at the bottom left of the screen there should be a 'Private' button - tap that and you can then go to the site that you want to go to

  • How to open a pdf file in a web browser using jsp

    Hi,
    I have a problem opening pdf file in browser using jsp.the following is my code.Can anyone help me.Thanks
    response.setContentType("application/pdf");
    String filename="C:\\FictPos\\mypdf.pdf";
    File file = new File(filename);
    FileInputStream in = new FileInputStream(file);
    OutputStream out1=response.getOutputStream();
    byte[] buf = new byte[4096];
    int count = 0;
    while ((count = in.read(buf)) >= 0)
    out1.write(buf, 0, count);
    in.close();
    out1.close();
    }

    Don't know the problem specifically, but here are some suggestions to investigate:
    Does it show anything in the page when you view source on it?
    I would recommend using a servlet rather than a JSP page for this, if only for the fact the JSPs can insert carriage returns into places where you might not want them to. This might screw up the PDF file format?
    Try setting the a link to the jsp, right-click and "save target as..." just to see if it gets any response at all - ie bypass the browser display.
    Good luck,
    evnafets

  • Could not load applet in a browser using jre 1.6.0_06

    Hi,
    I am facing problem with loading applets when the browser uses jre 1.6.0_06.
    Not able to understand what actually the problem is, I tried to check with a small applet that would simply print Hello World on the java console. Even this applet also could not be loaded on the browser. I could load this applet in the test environment of eclipse, but not able to load it on the browser when the applet is deployed on Tomcat.
    We have no problems in loading applet if the browser is using an earlier version of the jre.
    One more thing we have found out that, if we change the SSL cipher suite of the ssl.conf file such that it can support weaker protocols, my applet works with jre 1.6.0_06 also.
    But one thing we could not understand is that why changes in SSL cipher suite of the ssl.conf file creates problem in loading the applet, only in case the browser is using jre 1.6.0_06. I mean to say that changes in the SSL cipher suite does not create any problem in loading the applet if my browser is using an earlier version of jre 1.6.0_06.
    Please help me out as I don't have any clue regarding this problem.
    Thanks in advance.

    Hi,
    We have found a wor around for this problem.
    The following option has been unchecked and the applet could be loaded.
    Go to java control panel
    Under the Advanced Tab
    Under the Security section
    Uncheck the last option "Use TLSv1.0".
    This makes the applet work.
    But could not understand as why this is creating a problem.
    We have tried to include TLSv1.0 in the cipher suite of our apache server, while keeping the above option in java plugin control panel checked, but even that did not solve the problem.
    Please help me of how should I proceed for this problem, as I am totally stuck.
    Thank you.

  • How to create and install a toolbar to a browser using java

    Hi all,
    Can any one guide me about how to create and install toolbar to a browser using java ??
    please any one help me about this,i am not getting any idea about this..
    Thanks and Regards
    Sandesh S

    I doubt you can. Those browser toolbars are done by implementing to an API provided by the browser. That API, I don't believe, is provided via Java. But of course, that would be entirely up to the browser, not Java.

  • Unable to open PDF file in browser using Reader 9 with IE8

    I just updated to IE8 and when trying to open a PDF file on the browser, I received a message stating to use Adobe Reader 8 or 9.  I downloaded AR9 and still receive the same message and cannot open PDF files in browser window.  It defaults to my Adobe Acrobat 6.0 which will not open the file.  I have Windows XP.  I do not have a problem opening a PDF file in Yahoo mail with AR9.  I have tried many different ideas on the web to no avail.  Appreciate any help to be able to default to open PDF files in the browser using AR9 which is apparently required by IE8.

    Fixed problem by taking to a computer store to find that my hard drive storage was maxed out.  I had the hard drive repaced with a larger amount of storage.   Problem resulted from inadequate amount of storage space which prevented me from downloading and installing Adobe Reader 9.
    Thanks to al that responded.  

  • Trouble Setting "Display PDF in browser using" by MCX

    I want to force the PDF viewer in Safari to Mac OS X v10.6 built-in Preview Application instead of Adobe Acrobat Pro (9.4.0).
    I found that unchecking "Display PDF in browser using:" in Acrobat's Preferences, sets the viewer in Safari to Preview. It seems unchecking this box modifies ~/Library/Preferences/com.adobe.Acrobat.Pro_x86_9.0.plist. by creating the entry root => Originals (dictionary) => BrowserIntegration (array) => item 0 as number with value 0, item 1 as boolean with value 0.
    With that in mind I tried creating a MCX setting in my OD to apply root => Originals (dictionary) => BrowserIntegration (array) => item 0 as number with value 0, item 1 as boolean with value 0. Witch resulted in a grayed out, but checked settings for  "Display PDF in browser using:"
    I was wondering if any one has successfully figured out how to set this setting?

    Hi,
    Firstly during the installation of Reader X, there is an option of Customize Install. You can uncheck the Safari browser plugin from there. But this was possible before install. Now since you have installed in default mode (with above option checked during install) the method to disable plugin is as follows:
    To disable the plugin-
    1. Go to Library > Internet Plug-Ins
    2. You will see AdobePDFViewer.plugin in the list of plugins
    3. Create a new folder called Disabled Plug-Ins
    4. Move the AdobePDFViewer plugin into the Disabled Plug-Ins folder
    5. Restart  Safari
    In future if you want to re-enable this then you can put this plugin back to its original location or Reinstall Reader X (if you have permanently deleted the plug-in from your system). Reinstallation works as installing in repair mode.
    AcrobatX/ReaderX uses MANAGED installation method on Mac(as compared to MANUAL installation method used in earlier versions). In case of manual installation method installation and repair was dependent on "Self heal" mechanism that required the admin privileges each time it was invoked. This raised a bit of concern so to remove this Adobe now uses Managed installation method and discontinued Self Heal mechanism.
    You can check out this link for more information or if you want to track this discussion -
    http://acrobatusers.com/forum/deployment-installation/acrobat-x-installation-installed-saf ari-plugin-without-asking
    Thanks,
    Karan

  • Can't uncheck 'display PDF in browser using' on mac

    Reader 10.0.0
    'display PDF in browser using' in the Internet preferences is stuck on to Adobe Reader. The checkbox is checked/disabled, and cannot be unchecked.
    Also, viewing a PDF in the browser via FTP sticks the entire browser (hence my reason for noticing/disabling this plugin)
    Had to remove the plugin file from file:///Library/Internet%20Plug-Ins/ to remove.

    Hi,
    Firstly during the installation of Reader X, there is an option of Customize Install. You can uncheck the Safari browser plugin from there. But this was possible before install. Now since you have installed in default mode (with above option checked during install) the method to disable plugin is as follows:
    To disable the plugin-
    1. Go to Library > Internet Plug-Ins
    2. You will see AdobePDFViewer.plugin in the list of plugins
    3. Create a new folder called Disabled Plug-Ins
    4. Move the AdobePDFViewer plugin into the Disabled Plug-Ins folder
    5. Restart  Safari
    In future if you want to re-enable this then you can put this plugin back to its original location or Reinstall Reader X (if you have permanently deleted the plug-in from your system). Reinstallation works as installing in repair mode.
    AcrobatX/ReaderX uses MANAGED installation method on Mac(as compared to MANUAL installation method used in earlier versions). In case of manual installation method installation and repair was dependent on "Self heal" mechanism that required the admin privileges each time it was invoked. This raised a bit of concern so to remove this Adobe now uses Managed installation method and discontinued Self Heal mechanism.
    You can check out this link for more information or if you want to track this discussion -
    http://acrobatusers.com/forum/deployment-installation/acrobat-x-installation-installed-saf ari-plugin-without-asking
    Thanks,
    Karan

  • Uploading the file to server from the browser using JSP

    I have facing difficulty while uploading the file from the browser using user interface to the server or to the database. As previousy i was working in coldfusion, i find it very easy there with cffile command, but i am confused how to do that in JSP
    please reply soon, as i am stuck in my project because of that
    Sarosh

    Check out http://www.jspsmart.com , They have a nice free upload api that can be used w/ JSPs or Servlets. I hear O'Reilly has a nice one too. May as well use someone elses if they've done it already.

  • How to display Map for viewing in browser using Java

    I am fidning a solution for displaying political maps in browser using Java technology.
    Is ther anybody with a solution.
    Waiting for your respone.
    Regards
    Mithun

    palanithendral wrote:
    Hi,
    Our application using in English, German, Franch and chinese.You have several different idioms in your application and have not accurately identified where the actual problem is. You have all of the following
    -database
    -http
    -excel
    -excel in http
    -display on the target computer
    The first step with these sorts of problem is to identify where the problem actually occurs.
    String chineseCharacter=""; // chineseCharacter like 長长牀床東东彿佛. This chinese data coming from oracle database..A good theory. Now explain how you proved that that is what is coming from the database.
    After export the data to excel show the result for 長长牀床東东彿佛.As another example. Presumably you are referring to what the browser on the target computer displays. Your theory is that that computer and that browser (together) will display the correct information if they had the correct data. How did you prove that?

  • How to upload the image and diplay the image in the browser using jsp

    How to upload the image and diplay the image in the browser using jsp
    thanks
    shan

    i'll suggest looking for sample code or tutorial with a relevant query in google, which as far more time than us to answer this type of reccurent question

  • Can we select a particular area in the browser using Flex?

    Hi All,
    Is it possible to select particular area of the flex
    application in the browser using Flex and generate that area into a
    image when an button is clicked?
    Please help me.
    Thanks in advance

    Yes, you should google Flex screenshot bitmap, there are a
    number of examples. As far as 'selecting' one of the examples may
    show this, but you can just use a Canvas or similar for the box
    drawing (set background transparent, and just use the borders, and
    resize the canvas on mouse events). Otherwise you can do the
    Graphics sorite drawing by hand or use something like Degrafa for
    fancier, or look up quasimodo marching ants for an animated
    selection technique.

Maybe you are looking for

  • Why will my I phone not connect with my IMac it pairs?

    Why will my I Phone not connect with my IMAC it pairs?

  • Wifi problem with 3.1.2

    Hey, hope someone can help with my wifi problem on Iphone 3G. After update on 3.1.2 first wifi starts breaking down and now it won't find any station. I would say it is defenetly a software bug! Because after setting back the iphone to a backup from

  • My Trips and Expenses Quicklink

    In portal ESS overview page under Travel & expenses section for quicklinks i can see only Create Expense Report and My trips and Expenses quick  link is not displaying . We are using Web Dynpro ABAP application for My trips and expenses which calls F

  • Price in Contract

    Dear SAP expert, I have a business scenario, where my company have a contract with a vendor, where the vendor promise to give 30% discount of the market price of ALL the items they're offering. As it is a contract, I attempt to use Contract functiona

  • Linking DIR to PRT

    Is there a way to create in a DIR an Object link to PRT of a Maintenance Task List? Do I have to consult PM expert or DMS expert ? I'll be glad to discuss this topic with any one with the same problem since it seems that this may be a non standard ob