Mysql and jsp PLZ PLZ PLZ HELP ME

Hi >>>>>
I want to as if there any problem with the fallowing code????
===========================================================
DriverManager.registerDriver(driver);
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/ecom","ecomAdmin","ecomAdmin");
state=conn.createStatement();
============================================================
becoz this code isn`t work and givn`t any Exception er ERROR or any thing .
so PLZ Tell me what to do ?????

Since I am not using the same driver I cannot be sure of the problem.
This is how I make a connection using the com.mysql.jdbc.Driver
// Set SQL jdbc driver
String connectionDriver = "com.mysql.jdbc.Driver";
// Create connection string for local host
String connectionString = "jdbc:mysql://localhost/passport?user=root&password=xxx";
// Load database driver
Class.forName(connectionDriver);
// Make the actual connection
Connection sqlCon = DriverManager.getConnection(connectionString);
I hope this helps
rykk

Similar Messages

  • Sir i have iphone 4s i brought second hand and i dont no icloud id and password plz help me

    sir, i have apple iphone 4s i brought second hand and i dont no icloud id and password plz help me.
    <Personal Information Edited by Host>

    It's a bad idea to post your IMEI number and I've asked the Hosts to remove it.
    If the phone had been locked by the previous owner only he can unlock it, either by providing you with the passcode or by removing it from his list of devices.
    If you are unable to contact the previous owner and get him to do this then I'm afraid your phone cannot be unlocked and is useless; there is no way round this.

  • Did all the resets and still wifi connects and disconnects , plz help

    did all the resets and still wifi connects and disconnects , plz help

    I upgraded Apple TV late last week. Last weekend I rented a couple of movies from Apple TV. I watched one immediately, and was going to watch the other one the next day. On Sunday I opened up Apple TV to watch the film, and..... NOTHING THERE. I could see 'purchased movies', 'top movies', etc., at the top of the bar, but no mention of rentals. Even the film I'd watched (which obviously you can see for 48 hours) had disappeared into a black hole in Apple TV. I have been charged for these movie, and sent in a complaint.
    My airplay seemed to be fine, but.... last night, my computer was not seeing an Apple TV or showing an airplay sing, so I restarted and the Apple TV and airplay sign returned. If I chose to watch the film on the computer it started up immediately, if I chose airplay, I got the first image of the film and the loading sign going on and on (round and round) forever. The film never started. I restarted my Apple TV, the same. I restarted the computer, the same. I tried with various programmes and no go.
    iMore has the following suggestion. I am not sure if this will help. It sounds a PIA, but if I can't get airplay to work, I might try it: http://www.imore.com/how-restore-2nd-or-3rd-generation-apple-tv-back-factory-set tings-itunes

  • Hello  I upgraed my iphone to ios 7 but its dosent work like app stor dosent install any brogram or update programs and its slow and stuck plz help me

    Hello
    I upgraed my iphone to ios 7 but its dosent work like app stor dosent install any brogram or update programs and its slow and stuck plz help me

    My iPhone 5 wouldn't start after I turned it off a few minutes after writing this. It went into recovery mode and I had no choice but to connect to iTunes on PC and restore.
    I restored to factory setting first, just to validate my phone was okay. For a second consecutive iOS update, the  iPhone 5 did not update smoothly while connected to PC and iTunes - I had to retry two times before the progress bar for the update showed. (The exact same problem with the restart occured when I updated to 7.0.4.)
    The good news is that I was ultimately able to restore the iPhone 5 to factory settings while running iOS 7.0.6. I did have a backup from about a month ago lying around and was able to successfully restore with that as well, so the damage done is almost negligible since I had my contacts, notes, mail, etc. backed up to iCloud.
    Once I completed both restores, the sync with iTunes worked fine.

  • Tabs in JSP- Plz help-Urgent

    I want to have 3 tabs say Tab1, tab2, tab3 in my page and based on which tab is clicked , I have to display the contents of a table.
    Ex: if Tab1 is clicked, i have to display contents of Table1 and tab2,table2 and so ...
    Plz help with how to link the click on the tab to calling of the JSP file which retrives and displays the data???....
    Its urgent ;plz help

    dnamiot ,
    I'm also looking for similar funcitonality.
    the URL mentioned in your reply is not free ware. you know, it is tough to convince management to buy a software for the project even it is $1.
    So if you know any taglibrary which is free ware , which generates maximum of 4 tabs and dynamic in nature, please let me know.
    Thanks in advance
    tekbond

  • MySQL  database? Plz help.

    Hi all
              I am doing a project in p2p video conferencing.So to maintain all the user details can I use MySQL database. Is there any other appropriate databases?
                Plz help me with any tutorials if any one knows.
    Advance thanx

    Yes,
    You can use any database and backend. All you need for video chatting is to exchange identities using a webservice that spits out xml.
    Download the sample application
    http://labs.adobe.com/technologies/stratus/samples/#resources
    In it you will find a python cgi script. The script is self explanatory on how to configure a web service. It uses SQLite but you can use mysql or any other database.

  • Error while trying to synchronize Audio and MIDI. plz help i cant hear anything

    plz help me i cant hear nothing and its says: Error while trying to synchronize Audio and MIDI.
    Sample Rate 38536 recognized.
    Check conflict between Logic Pro X and external device. ????????   PLZ HELP

    It means you are overtaxing the CPU, likely with just one (3rd party-)software instrument plugin. Ignore the word "external", in this context it often means "3rd party plugin".
    So what synth is it? Since you're Dutch, it's probably one of the trancy dancy synths, such as Albino, Diva, Sylenth or Massive... I could be wrong though...
    The best way to avoid this message is to Freeze the track with the guilty synner - however, a frozen track cannot be edited, so if that is a problem, you will have to make the synth itself run lighter, which can be achieved by turning of internal effects that are ON the synth itself, especially reverb.
    http://help.apple.com/logicpro/mac/10/#lgcpf1cbfd51

  • We are unable to start your subscription  plz help me ladies and gentlemen PLZ HELP ME!!!

    i just need help because every time i type in my serial number it just says unable to start your subscription plz help me people

    -LogiKzzz we will not able to solve this issue for you in a public setting as we will require personal information to resolve the issue.  For the best assistance, I recommend our chat support at http://adobe.ly/rSZYR5.  Our chat representatives can provide a personalized experience to resolve the issue you have described.

  • Hiii . i have encountere a problem . my notes app are not syncing in my ipad and iphone . plz help

    hiii . i have encountere a problem . my notes app are not syncing in my ipad and iphone . plz help

    Hi marcmartineau,
    I'm not sure why this is happening, but I think I'm seeing the same thing. Many times when I get an email on the iPad or iPhone with a picture attached, I don't see the picture but instead just a placeholder icon.
    I have found a work around though to at least see the picture. If I forward it and include the attachment, I see the picture in the outgoing email. I can even save the image from the sending email if I really don't want to send it. If i do send it to myself, chances are I will see the picture in the email when I receive it even though it's just a resend of the original.
    weird.

  • JSP update using MySQL...Plz help

    Can you try and check if anything is wrong or missing in the code coz i keep getting this error msg:
    org.apache.jasper.JasperException: Duplicate key or integrity constraint violation, message from server: "Cannot add or update a child row: a foreign key constraint fails"
    This is the code that i used:
    <%@ page import = "java.sql.*" %>
    <%@ page import = "java.util.*" %>
    <HTML>
    <TABLE BORDER=1 WIDTH="300" CELLPADDING=0 CELLSPACING=2>
    <%!
    Connection connection;
    Statement statement;
    ResultSet results;
    %>
    <title>Save Remarks</title>
    <body><font size=+1>Remarks have been saved into the database</font>
    <% Class.forName("com.mysql.jdbc.Driver").newInstance();
    connection = DriverManager.getConnection("jdbc:mysql://localhost/test","sid","");
    statement = connection.createStatement();
    String qty = request.getParameter("qty");
    String id = request.getParameter("id");
    String tn = request.getParameter("tn");
    String st = request.getParameter("st");
    String pname = request.getParameter("pname");
    String rmks = request.getParameter("rmks");
    %>
    <%
    statement.executeUpdate("INSERT INTO members5(La_Na, Fi_Na, NRIC, Treatment_Notes, Small_Talks,
    Remark) VALUES('"+id+"', '"+pname+"', '"+qty+"', '"+tn+"', '"+st+"', '"+rmks+"')");
    statement.executeUpdate("UPDATE members5 SET Remark = "+rmks+" where La_Na =" +id);
    %>
    <%
    results.close(); statement.close(); connection.close();
    %>
    <p>
    <input type="Button" onClick="javascript:location.href='SearchMem.jsp'" value="Done">
    </p>
    </TABLE></BODY></HTML>
    Pls do help... and reply ASAP... thanks...

    The message says it all - there's another table to which your members5 table is related. And one of the columns in member5 is a foreign key and you are inserting a row into members5 with a foreignkey value not existing in the other table. First insert the appropriate row in the other table and then insert into members5

  • About XML/XSL and Javascript : Plz Help Urgent

    Hai , I am developing one module which invloves XML database ,XSL and Javascript.
    In this I want to transform XML data to XHTML form using XSLT .,
    I have done this ,(using xsl templates ,In my form two radio buttons one dropdown box and two text boxes are there .).
    All the information which ever is displayed coming from XML .,
    But I want to validate this elements (which are in xslt ,ie checking text box is empty or not ..)
    Where I have to add script in XSL .,
    Plz give simple example on this ,
    I am sending this code ,plz have a look at this ,,
    XML -----+ ---XSLT---------------> XHTML(HTML) (where validation is required)*
    Hotels.xml
    ==============>
    <Services>
         <Service>
              <Hotels type="radio" title="Hotel" groupname="service" default="true"/>
              <HotelsFlights type="radio" title="Flight+Hotel" groupname="service"/>
         </Service>
         <Hotels>
              <Destination title_d="Destination :">          
                   <DestinationPlace type="OPTION" id="" title_d="Select Destination" value_d="Select Destination" defalut="true"/>
                   <DestinationPlace type="OPTION" id="" title_d="Aruba" value_d="Aruba" />
              </Destination>
              <HotelChoice title_hc="Hotels :">
                   <choice type="OPTION" id=" " title_h="AmsterDam Manor Beach" value_h="AmsterDam Manor Beach"/>
                   <choice type="OPTION" id=" " title_h="Wyndham Aruba Beach" value_h="Wyndham Aruba Beach"/>
              </HotelChoice>
              <Dates>
                   <CheckIn type="INPUT" title_dt="Check In :" id="chkin" name="chkin" size_dt="10" maxlength="10">mm/dd/yyyy</CheckIn>
                   <CheckOut type="INPUT" title_dt="Check Out :" name="chkout" size_dt="10" maxlength="10">mm/dd/yyyy</CheckOut>
              </Dates>
              <RoomNos title="No.of Rooms :">
                   <room type="OPTION" id="" titl="1" valu="1"/>
                   <room type="OPTION" id="" titl="1" valu="2"/>
                   <room type="OPTION" id="" titl="1" valu="3"/>
              </RoomNos>
              <Submit tile="Search :" type="submit" id="search" value="Search"/>
         </Hotels>
    </Services>
    Hotels.xsl-
    ------------->
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
         <html>
         <head>
         <script language="javascript">
         function RadioFunc()
              var result;
              alert(" Radio ");
              result +=document.write("<TABLE >");
              result +=document.write("<TR><TD>"+'Praveen'+"</TD></TR>");
              result +=document.write("</TABLE>");
              alert("Result "+result);
         function validateForm()
              alert("Before validating");
              var chkindate= document.getElementById(chkin).value;
              alert(chkindate);
         </script>
         </head>
         </html>
         <xsl:apply-templates/>
    <xsl:if test="@value_d='Select Destination'">
                        alert("Please Enter Destination");
              </xsl:if>
    </xsl:template>
    <xsl:template match="Services" >
         <form name="myform" action="two.jsp" method="get" >
              <table bgcolor="lightgreen" width="350" height="200" border="1" >
              <tr><td><xsl:apply-templates/></td></tr>
              </table>
         </form>
    </xsl:template>
    <xsl:template match="Service">
         <table border="0" align="center" valign="top"><tr>
         <xsl:for-each select="*">
              <td align="left"><xsl:value-of select="@title"/></td>
              <td align="center">
              <input type="{@type}" onClick="RadioFunc()">
                   <xsl:attribute name="Name">
                        <xsl:value-of select="@groupname"/>
                   </xsl:attribute>
                   <xsl:attribute name="value">
                        <xsl:value-of select="@value"/>
                   </xsl:attribute>
                   <xsl:if test="@default='true'">
                        <xsl:attribute name="checked"/>
                   </xsl:if>
              </input>
              </td>
         </xsl:for-each>
         </tr></table>
    </xsl:template>
    <xsl:template match="Hotels/Destination">
    <xsl:value-of select="@title_d"/>
         <SELECT id="dest" name="dest">
         <xsl:for-each select="*">
              <xsl:element name="{@type}">
                   <xsl:value-of select="@value_d"/>
              </xsl:element>
         </xsl:for-each>     
         </SELECT>
    </xsl:template>
    <xsl:template match="Hotels/HotelChoice">
    <xsl:value-of select="@title_hc"/>
    <SELECT id="hcid" name="hcid">
         <xsl:for-each select="*">
              <xsl:element name="{@type}">
                   <xsl:value-of select="@value_h"/>
              </xsl:element>
         </xsl:for-each>
    </SELECT>
    </xsl:template>
    <xsl:template match="Hotels/Dates">
    <table><tr>
    <xsl:for-each select="*">
              <td>
                   <xsl:value-of select="@title_dt"/>
              </td>
              <td>
              <xsl:element name="{@type}" >
                   <xsl:attribute name="size">
                        <xsl:value-of select="@size_dt"/>
                   </xsl:attribute>
                   <xsl:attribute name="maxlength">
                        <xsl:value-of select="@maxlength"/>
                   </xsl:attribute>
                   <xsl:attribute name="value">
                        <xsl:value-of select="text()"/>
                   </xsl:attribute>
              </xsl:element>
              </td>
    </xsl:for-each>
    </tr></table>
    </xsl:template>
    <xsl:template match="Hotels/RoomNos">
    <table align="center"><th>Travellers</th>
    <tr><td><xsl:value-of select="@title"/></td>
    <td><SELECT id="rooms" name="rooms">
              <xsl:for-each select="*">
                   <xsl:element name="{@type}">
                        <xsl:value-of select="@valu"/>
                   </xsl:element>
              </xsl:for-each>     
    </SELECT>
    </td></tr>
         </table>
    </xsl:template>
    <xsl:template match="Hotels/Submit">
         <table align="center" border="0" >
         <tr>
         <td align="center">
              <input type="{@type}" onclick="validateForm();">
                   <xsl:attribute name="value">
                        <xsl:value-of select="@value"/>
                   </xsl:attribute>
              </input>
         </td>
         </tr>
         </table>
    </xsl:template>
    </xsl:stylesheet>
    ======================================================

    Hi
    This is not the forum for this type of question ...sorry. Try the XMLDB forum, XML DB
    Tim

  • Class cast exception in jsp plz help

    i have written a jsp where i displayed a text box with value given by user inside it
    when the user enters some other value in text box and clicks on update button then i forwarded reqeust to servlet which will some data base work
    servlet will forward again to the same jsp with the new value in text box.
    but i am getting CLASS CAST EXCEPTION when servlet is forwarding reqeust to same JSP
    help me what to do ........
    thanking you in advance ..cheers

    display cart.jsp file:
    <%@ page import="java.util.*,org.*" %>
    <html>
    <body>
    <%
    Vector cartupdate = (Vector)session.getAttribute("cartlist");
    for (int i = 0; i < cartupdate.size(); i++) {
    CartListBean clb = (CartListBean)cartupdate.elementAt(i);
    %>
    <form name="itemslist<%=i%>" action="updateCart" method="post">
    <input type="hidden" name="itemcode" value="<%=clb.getItemCode()%>">
         <input type="hidden" name="itemname" value="<%= clb.getItemName()%>">
    <input type="hidden" name="price" value="<%= clb.getPrice()%>">
    <%= clb.getItemName() %>
    <input type="text" name="qty" value="<%=clb.getQuantity()%>">
    <input type="submit" name="<%=clb.getItemCode()%>" value="update">
    </form>
    <br>
    <%
    %>
    <form name="tobuy" action="buysrv" method="post">
    <input type="submit" name="buy" value="BUY">
    </form>
    </body>
    </html>
    updatecart servlet code:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import org.*;
    import java.sql.*;
    import java.util.*;
    public class UpdateCart extends HttpServlet
    public void service(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
    HttpSession session=request.getSession(false);
    Vector cartupdate = (Vector)session.getAttribute("cartlist");
    for (int i = 0; i < cartupdate.size(); i++) {
    org.CartListBean cart = (org.CartListBean)cartupdate.elementAt(i);
    if((cart.getItemCode()).equals(request.getParameter("itemcode")))
    org.CartListBean clb=new org.CartListBean();
    clb.setItemCode(request.getParameter("itemcode"));
         clb.setQuantity(request.getParameter("qty"));
         clb.setItemName(request.getParameter("itemname"));
    clb.setPrice(request.getParameter("price"));
    cartupdate.setElementAt(clb,i);
    session.setAttribute("cartlist",cart);
    ServletContext application=getServletContext();
    System.out.println("got finished");
              RequestDispatcher rd=application.getRequestDispatcher("/displaycart.jsp");
                   rd.forward(request,response);
    Message was edited by:
    143java

  • Plot function and Interpolate Plz Help!!!!

    Im trying to obtain a plot from  the following function ( see attached file)  a I-V curve and then from the plot i wanna determine values for "I" when  values of V are specified. I wanna do this without using cursers but programmatically.(possibly using interpolate functions) .. I hope someone can help me..thanks a lot
    Attachments:
    eq.JPG ‏10 KB

    lil_zu wrote:
    ...is it possible to plot this function without solving?
    No! You cannot plot a function unless you can solve it (either analytically or numerically).
    Do you have an image of how it is supposed to look like?
    What are typical ranges for I and V?
    Do you have a link to a website that explains your application?
    LabVIEW Champion . Do more with less code and in less time .

  • I forget my iphone 5 passward and i cant remove the ownership passward and so plz help me this topic coz what can i do?

    i forget my iphone 5 passward and i can't rem ove it because i update the software and when my phone finally done then asking the ownership passward so i forget it.  so what can i do i solved this probleum.  thanks
    i buy this phone in my friend so my friend is not here so i will be waiting your cute answers
    thank's

    Hi bilalusman,
    If you are having issues with the password on your iPhone, you may find the following article helpful:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    Regards,
    - Brenden

  • When I use VPN on iPad 2 ,it disconnects alot and frequently,plz help me

    Hi friends,when I use VPN on my new iPad 2 ,the VPN disconnects a lot and frequently in short periods,please help me,is there any solution???

    You should provide more detailed info, like who is your VPN provider, what VPN protocol (PPTP, L2TP, IPSec,) whether you're on home Wi-Fi, public Wi-Fi, 3G and if public Wi-Fi or 3G, then geographical location. (i.e.: Starbucks on 5th & Broadstreet, Detroit.)

Maybe you are looking for

  • Budget in Training and Events

    Hello, I'm trying to configure the budget in training module. I will not have integration with Billing and Materials Management so I only want to create a Budget and have always the budget comparison, this means to compare the budgets created for eac

  • Wizard progress list not linking

    Hi I am using a list to show progress through a wizard with the wizard progress template. It shows what part of the wizard the user is in by highlighting the correct entry in the list. I would like the user to be able to click on the wizard progress

  • Solaris FC Tape Drive

    Hi Folks, We have the following scenario: - SunFire v490 server - DAT 72 tape, SCSI - LTO4 tape, FC (via qlogic HBA) - Solaris 9 + updated patches We need some help regarding the FC tape configuration. *"cfgadm -al"* shows the FC tape as: c4::500110a

  • Old phone and need the PUK code

    I have found an old phone in the bottom of a draw, that I though was lost, it has a sim card in it,I think it must be an old pay as you go phone but not sure, it is asking for a PUK code and I don't have any details of the provider or even the phone

  • MBP Turning off unexpectedly

    Hi! My MBP is just turned off after somewhat 30 mins - 1 hr if i don't use power, even though my battery has been fully loaded. It works just fine with the power plugged in... I have tried to calibrate the battery as apple recommends and I have tried