Retrieve connector version using JSP

Hi,
Is there any script i can run in java to retrieve what mysql-connector-java i'm runing? i'm making a system info page so any other useful coding to get versions etc will be great...
Regards

Consider using java web start. The swing application would be stored as a jar within a web application. A link in a html page inside the web application would launch the swing application on the user's desktop. It removes the nightmares of versioning ( the code is built and distributed at a single point ). Java web start supports caching the application on the user's desktop, checking for tha latest version of the jar hosted on the web and so on. 'Neat' is too little a word for it :)
ram.

Similar Messages

  • Checking a product's version using JSP?

    Hi,
    I'm rather new JSP, and I'm looking for a solution to a certain problem.
    If we have a certain software on a user's computer, and we would like the user to be able to check for updates to that software using the website (e.g. a "check for updates" button, similar to windows update), is it possible to do this using JSP?
    I know that when using ASP or ASP.Net, it's possible to use activeX to do this (though i'm not so sure), and I would like to be able to do something like that.
    I appreciate all the help.
    Thank you.

    Consider using java web start. The swing application would be stored as a jar within a web application. A link in a html page inside the web application would launch the swing application on the user's desktop. It removes the nightmares of versioning ( the code is built and distributed at a single point ). Java web start supports caching the application on the user's desktop, checking for tha latest version of the jar hosted on the web and so on. 'Neat' is too little a word for it :)
    ram.

  • Sending and retrieving blob data using JSP

    I need to upload images to a database through a web page (jsp)
    and then display them.
    Environment is tomcat + mysql.
    Anyone know a good site that explains
    how to work with blobs through JSP?
    thanks for any help!

    hello Sir,
    I have to make a Image Library.
    What I have done is I am just stroing the Image Path into the path
    and retrieving the path from the database.
    But now I am asked to Store the Image in the Database..
    Could U Please tell me at the time of retrieving the Image
    what exactly I have to do..
    I am just 1 month new to JSP...(Practically)
    Could U please write me the Code for Converting the BINARY Data into
    InputStream ...
    or what exactlt I have to do..
    Please Guide me man..
    Thanks In Advance...
    With Regards
    Eklavya

  • 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

  • How to retrieve the date of the itme's version using Ecmascript

    Hello, all
    I'd like to retrieve the date of minor and major versions using ecmascript. Here is my script so far.
    I am getting ID from query string in URL, then passing it to access file.
    What I don't understand is to how to instantiate Version class and loop through version to retrieve created date.
    Can someone help?
    <Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
    <pre class="brush: javascript;">
    <script language="ecmascript" type="text/ecmascript">
    //Get ID of the document
    function getParameterByName(name) {
        name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
        var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
            results = regex.exec(location.search);
        return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
    var v_id = getParameterByName('ID');
    alert(v_id);
            var item;
            var list;
            var file;
            function fileMajorandMinorVersion() {
                var clientContext = SP.ClientContext.get_current();
                if (clientContext != undefined && clientContext != null) {
                    var webSite = clientContext.get_web();
                    this.list = webSite.get_lists().getByTitle("List Title");
                    this.item = list.getItemById(v_id);
                    this.file = this.item.get_file();
                    clientContext.load(this.file);
                    clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
             function OnLoadSuccess(sender, args) {
                var version = "Major Version: " + this.file.get_majorVersion() + '\n' + "Minor Version: " + this.file.get_minorVersion();
                alert(version)
            function OnLoadFailed(sender, args) {
                alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
            </script>
    <input id="btnFileMajorandMinorVersion" onclick="fileMajorandMinorVersion()" type="button" value="File Major and Minor Version"/>
    vlad

    In order to loop through the version collection and display last version date here is the script that works for me:
    <Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
    <script language="ecmascript" type="text/ecmascript">
    //Get ID of the document
    function getParameterByName(name) {
        name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
        var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
            results = regex.exec(location.search);
        return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
    var v_id = getParameterByName('ID');
    function convertShortDate(par_date) {
       var var_date = new Date(par_date);
       var day = var_date.getDate();
       var month = var_date.getMonth() + 1;
       var year = var_date.getFullYear();
       var result_date = month+'/'+day+'/'+year;
       return result_date;
            var item;
            var list;
            var file;
            var versions;
            var _version;
            function set_LastCertDate() {
                var clientContext = SP.ClientContext.get_current();
                if (clientContext != undefined && clientContext != null) {
                    var webSite = clientContext.get_web();
                    this.list = webSite.get_lists().getByTitle("Archer Pages");
                    this.item = list.getItemById(v_id);
                    this.file = this.item.get_file();
                    this.versions = this.file.get_versions()               
                    clientContext.load(this.file);
                    clientContext.load(this.versions)
                    clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
             function OnLoadSuccess(sender, args) {
             var output = "";
             var certdate = "";
             var listItemEnumerator = this.versions.getEnumerator();
             // loop through the version items
             while (listItemEnumerator.moveNext())
              var oVersionItem = listItemEnumerator.get_current();
              certdate = oVersionItem.get_created();
              $("input[title='CertificateDate']").val(convertShortDate(certdate));
            function OnLoadFailed(sender, args) {
                alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
           document.write("<input name='Button1' type='button' value='Populate Certificate Date' onclick='set_LastCertDate()'/>");
        </script>
    vlad

  • Check Version of outlook installed using jsp

    Hi,
    Is there any way to find out using JSP what version of outlook is installed on user's machine ?

    No. Remember JSPs do ALL THEIR WORK on the server. All you will ever get is an HTTP Request. If it's not in the request, it's not information you have access to.
    You could always ask them in a form what version of Outlook they have. Then you'd know.

  • How to retrieve image in BLOB in oracle database using JSP?

    do any one the method to view image in homepage using jsp from BLOB field in oracle database ?
    thx

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Bon BOn:
    do any one the method to view image in homepage using jsp from BLOB field in oracle database ?
    thx<HR></BLOCKQUOTE>
    I am using a servlet that retrieves the BLOB from the database, sets the MIME type and puts it in a stream. The code is :
    package TestQueryITM;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.OracleDriver;
    import oracle.jdbc.driver.*;
    public class MIMEServlet extends HttpServlet {
    DbConnect myDbBean = new DbConnect();
    int Id=6;
    String MIME ="plain/text";
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest req,HttpServletResponse res)
    throws ServletException, IOException
    try
    String content_type = new String();
    String filename = new String();
    // Load the Oracle JDBC driver:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    // Connect to the database:
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:thin:@ORAVISION:1521:DEV","[username]", "[password]");
    // It's faster when auto commit is off:
    conn.setAutoCommit (false);
    // Create a Statement:
    Statement stmt = conn.createStatement ();
    try
    BLOB lob_loc = null;
    java.io.InputStream in = null;
    int pos = 0;
    int length = 0;
    OracleResultSet rset = (OracleResultSet) stmt.executeQuery (
    "SELECT text FROM test WHERE ID = "+Id);
    if (rset.next())
    lob_loc = ((OracleResultSet)rset).getBLOB(1);
    MIME=rset.getString(2);
    // File binaryFile = new File("C:/aantekeningen.doc");
    // FileInputStream in = new FileInputStream(binaryFile);
    in = lob_loc.getBinaryStream();
    // This loop fills the buf iteratively, retrieving data // from the InputStream:
    res.setContentType (application/pdf);
    res.setHeader ("Content-Disposition","attachement;filename=test.doc");
    ServletOutputStream op = res.getOutputStream ();
    byte[] buffer = new byte[32000];
    while ((in != null) && ((length = in.read(buffer)) != -1))
    // the data has already been read into buf
    System.out.println("Bytes read in: " +
    Integer.toString(length));
    op.write(buffer,0,length);
    op.flush();
    op.close ();
    in.close();
    stmt.close();
    conn.commit();
    conn.close();
    }catch (SQLException e)
    e.printStackTrace();
    }catch(Exception e)
    System.out.println("<BR>");
    e.printStackTrace();
    System.out.println("<BR>");
    public String getServletInfo() {
    return "TestQueryITM.MIMEServlet Information";
    null

  • Retrieve image from my sql database using jsp

    I want to retrieve image from my sql (blob type) & save it in given relative path in server .(using jsp and servlets)
    please give me some sample codes.

    PreparedStatement pst = null;
      ResultSet rs=null;
    pst = conn.prepareStatement("select image from imagedetails where imageid='"+imageid+"'");
    rs=pst.executeQuery();
    while(rs.next())
                                byte[] b=rs.getBytes("image");
                                FileOutputStream fos=new FileOutputStream("c://image.jpg");
                                fos.write(b);
                            } hi this the code to retrieve the image from DB and write to a file.

  • Storing / Retrieving PDF using JSP and Oracle

    Dear All
    I am building web application using Macromedia Dreamweaver , using JSP , Tomcat and Oracle 10gR1.
    I need to build a JSP to upload a PDF file to the database and have a way to retrieve it from the database ,, all through JSP .
    I need hints about the building architecture and how it is done ,, samples of code will be great.
    Thank You Very Much

    Use JSP, Servlet and some third party API (Apache Common File Upload) to store the PDF document in blob column.
    --Balaji S                                                                                                                                                                                                                                                           

  • To Retrieve dynamic radio button values using jsp & javascript

    Hi All,
    How can i retrive the dynamically created radio button values and also want to get the clicked radio button values.I am using JSP and JAVA beans to retrive the values from the form. I dont have any probs to retrieve combo box values, text box values only problem showing with radio button values. If any data which is entered wrong in the form all the fields should prefills with the old value.Except radio button values all others fields such as combo box, text box values are prefilled with the old values.
    I have given the code for radios.
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'Y\'"/>Yes   ');
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'N\'"/>No');
    document.write('<input type="hidden" name="fcidis" value="">')
    <form method="POST" action="Update.jsp" name="sampleReq" >
    <tr>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='supplier'"/> supplier
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='customer'"/>customer
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='distributor'"/> distributor
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='employee'"/> employee
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='New partner'"/>New partner
    <input type="hidden" name="requester1" value=""/>
    </td>
    </tr>
    Advanced Thanks for help
    Regards
    Sona

    Hi,
    If you have this code
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'Y\'"/>Yes ');
    document.write('<input type="radio" name="distradio" OnClick="sampleReq.fcidis.value=\'N\'"/>No');
    document.write('<input type="hidden" name="fcidis" value="">')
    <form method="POST" action="Update.jsp" name="sampleReq" >
    <tr>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='supplier'"/> supplier
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='customer'"/>customer
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='distributor'"/> distributor
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='employee'"/> employee
    </td>
    <td class="Txt_gris">
    <input type="radio" name="requester" OnClick="sampleReq.requester1.value='New partner'"/>New partner
    <input type="hidden" name="requester1" value=""/>
    </td>
    </tr>
    this field distradio will not be able Update.jsp.
    You will need to insert these field into the form definition.
    Now, to get a valeu from a radio button, you need only to do request.getAttribute("fieldName").
    To generate dinamically all radio button values, i need to know where are these information? In database? If yes, you need to read the resultset na in value attribute you need to do somethink like this <input type=radio name=fieldName value="<%out.println(resultset.getString("FieldName"));%>">
    If you have more question, only send me a email,
    best regards
    Edney Imme
    [email protected]

  • How to store and retrieve blob data type in/from oracle database using JSP

    how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
    thanks

    JSP? Why?
    start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html]

  • How to retrieve resource name in JSP page

    Hello,
    I have the following scenario:
    User wants a new resource to be provisioned to himself, he makes standard steps; chooses one resource from the list of available resources and sends a request. After that a summary page is displayed - my goal is to create an url to external application on that summary page (i.e. tjspRequestSubmitTiles.jsp) that should be displayed depending on the name of the resource, e.g. if user requests for a ResourceA - link appears, but when he requests for a ResourceB - link does not appear.
    So far I have created a link with a sample if statement - it works.
    My problem is how to make a real condition - retrieve the resource name that request deals with. Anybody know how to do that, which API to use etc.?
    Regards,
    Maciej.

    After adding the code to tjspProvideDataShowInfoTiles.jsp file, nothing has been improved, I am still facing the same result (on the console):
    RO: null
    It seems that file (tjspProvideDataShowInfoTiles.jsp) does not take part in the process.
    I have tried to pass some sample session attribute in tjspRequestVerificationTiles.jsp and this works, but I do not know how to retrieve resourceName in this file.
    I was trying to make some code retrieving resourceName in tjspRequestSubmitTiles.jsp, e.g.
    tcRequestWizardForm tcReqWizForm = (tcRequestWizardForm)session.getAttribute(requestWizardForm);
    String requestID = tcreqWizForm.getRequestID();
    ...and what to do now to retrieve resourceName?

  • Error when run a simple sample using jsp tag

    When i run a jsp using jsp tag, the tomcat gave me the following information:
    Resolve entity failed-//Sun Microsystems,Inc.//DTD JSP Tag Library 1.2//EN http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
    My tld file is:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
    "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>sample</short-name>
    <uri>WEB-INF/sampleTag</uri>
    <display-name>SampleTag</display-name>
    <description>Sample TLD</description>
    <tag>
    <name>time</name>
    <tag-class>com.sample.taglib.TimeTag</tag-class>
    <body-content>empty</body-content>
    </tag>
    </taglib>
    Anybody can tell me why?
    Thanks!!!

    It's strange bacause DTD is available under given address.
    Which JSP version are you using?
    Do you have any other tld file, which uses the same DTD version? Do tags define in it work properly?
    Maby try to use 1.1 version of DTD?
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">But remember than version 1.1 has another node names (see http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd).

  • Deleting a row from a table using jsp

    Given a table in a jsp, can an user click on a row of that table and retrieve the information so that the program can delete a record from a database table?
    most of the tables that I have seen are static, the user cannot interact with them(specially when the user wants to delete several records from a database table).
    Can anyone suggests a good book or way of deleting a row from table using jsp.

    eg use a column in the table that has a radio button or check box,
    on submit, get all the rows that are checked, using the row as an index into your db store, get the key and use the key to issue the sql delete command.

  • Windows Server 2012 Essentials Connector version is more current than server

    In trying to connect a new laptop to domain/server, it kept failing with a message indicating that other software was in the process of installing or that a reboot was pending.  Since neither was the case, I downloaded the current version of the Connector
    software from the Microsoft website to try.  That didn't work either.  It turns out that a pre-installed software component called Intel Smart Connect Tech was keeping the laptop from connecting.  I uninstalled this software and installed the
    connector software and it appeared to connect to the server.  However, it is displayed in the Essentials Dashboard as Offline.  The client (Laptop) displays a message saying "The Windows Server 2012 Essentials Connector version that is installed
    on this computer is more recent that the sever.  Contact the administrator to ensure the server is up to date".  I tried uninstalling the Connector software from Control Panel, but I get a message "Could not delete key \software\microsoft\windows
    server.  Verify that you have sufficient access to that key, or contact your support personnel".  I've tried both with domain admin and local admin credentials.  So, I ignored the message and continued the connector install.  It finished
    and appeared to connect successfully.  The connector version displayed in Control Panel\Programs and Features is correct.  However, the registry entry is not updated and the version error pops up with each login and the Dashboard shows the client
    as offline. 

    Hi C.R.Lowe,
    Based on your description, I’m a little confused with this issue. Before going further, would you please let
    me confirm something more? Thanks for your understanding.
    When connect the client to Windows Server 2012 Essentials, did you mean that use
    http://<servername>/Connect
    and then select Download software for Windows option? More descriptions, please refer to the following article.
    To connect a client computer to the
    server
    If I misunderstand, please don’t hesitate to let me know.
    On current situation, please navigate to the registry path as the error message shows. And check
    Version value and let me know. Meanwhile, please right click
    Windows Server folder in Registry Editor and select “Permissions…”, then check if the account was assigned the correct permission to delete key.
    In addition, please check if you have installed the
    Update Rollup 1 for Windows Server 2012 Essentials
    By the way, please check Event Viewer and some related logs if can find some more clues. If any update, please
    feel free to let me know.
    Hope this helps.
    Best regards,
    Justin Gu

Maybe you are looking for

  • How do you cut out the part of an image in a photo?

    How do you cut out a part of an image on a photo that you have added to Pages. For example, if I have added a picture of a giraffe to Pages how would I cut out the giraffe from the image and get rid of the rest of the image

  • XML debatching

    can XML be debatched without using file or FTP adapter in ESB or BPEL ? kindly reply if u ve any other technique for debatching an XML Thanks in advance -venkat

  • CRM Survey on Web - Submit button not working.

    Hi Gurus, We have created a Survey in CRM_Survey_suite. The Problem is, when we send the survey with one Question (mail goes out with a link, user click on the link and link take them to our QA Server BSP Page), the submit button is working but when

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated. Following is the code I am trying with: var _saveName = new

  • Disaster Recovery - Managed Server Startup

    We are testing some disaster recovery and want to be able to start our managed servers on our B node in MSI mode while the A node with admin server is down. It tests fine and works with nodemanager running. However, we want to assume that there has b