Servlet plus mysql problem

Well... Using Tomcat 557 and MySQL 411 I have a problem. I load a Driver (MySQL Connector/J) and create a connection object in servlet's init procedure. All woks fine. I stop Mysql and reload the servlet, nothing can be seen on a browser window - as it should be. When I start MySQL again - it cannot read from database - as if mysql were down. It works again if I reload the context, but not otherwise.
Is there some way to correct this problem?
There is also another peculiarity when using Mozilla Firefox 1.0.4. When I make a servlet that saves something to a file, it does it three times. Same happens with database systems. When I read from a database, it does it three times. Using MSIE or Opera, reading or writing is done once.
-poj

Hi! And thanks for the answer.
I still don't understand.
Connection object is alive in the servlet, because it is a global attribute of the servlet and servlet is alive.
Am I right when I think that servlet does not do it's init method again until servlet stops. If so, connection object, created in init, should be alive although database is down.
Connection object seems to loose database when database is temporarily down meanwhile you try to read from database. Connection does not nullify. All works fine after restarting database if there is no action to database when it is down.
I have not tested system when using datasource and pooling with tomcat servlet.xml, but creating connections in init method seems to have a problem.
Can anyone find a way to correct my problem.
And the Firefox problem. There is no javascript and this peculiar three times loading/writing to a file happens with Firefox.
-poj

Similar Messages

  • Nullpointerexception when using servlet with Mysql on a cobalt Raq3 Server

    I'm a student and i have to use servlets and Mysql to make a Database application. Our school has a Cobalt Raq3 server and has installed Java Dev Kit 1.3a.
    First problem they can't tell me their driver manager for Mysql.
    Second problem when i try my servlet it gives a NullpointerException
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Testingo2 extends HttpServlet {
    // Hier word een Statement en Connectie object aangemaakt die later zullen worden gebruikt om een database aan te spreken
    Statement stm;
    Connection con;
         // Hier word de servlet geinitialiseerd
    public void init() throws ServletException {
         try {
              // Hier wordt de database driver geladen
              Class.forName("org.gjt.mm.mysql.Driver");
              /** Hier gaan we gebruik maken van het Connection Object om verbinding te maken met de database CFP door een           * jdbc.odbc bridge en dit zonder username en passwoord
              con = DriverManager.getConnection("jdbc:mysql://cfp.ehsal.be:3306/cfp","bjorn","disaronno");
              // Hier zorgen we ervoor dat als er een zich een fout voordoet dat deze getoond wordt
                   catch (ClassNotFoundException cnfe ) {
                   System.out.println(cnfe.toString());
                   catch (SQLException e) {
                   System.out.println(e.toString());
    // Als de servlet het einde van zijn levenscyclus heeft bereikt gaat het connectie object worden afgesloten
    public void destroy() {
         try { con.close();}
         catch (SQLException e) {}
    public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
    try {
         /** Hier gaat men met het Connectie object een statement aanmaken,welk dan later zal worden gebruikt voor het           * uitvoeren van query's
         stm = con.createStatement();
         /** Hier gaat men de query "selecteer alles van de tabel projecten" uitvoeren op de cfp database dankzij het      * statement en connection object. Deze gegevens worden dan opgeslagen in de Resultset rs.
         ResultSet rs = stm.executeQuery("SELECT project,land,titel,omschrijving,budget,informatie FROM PROJECTEN ");
         /** Hier gaat men informatie, over de gegevens die in de ResultSet rs zijn opgeslagen, opslaan in ResultSetMetaData      * meta.
         ResultSetMetaData meta = rs.getMetaData();
         // Hiergaat men het aantal kolommen van de tabel tellen en opslagen in de Integer kolom
         int kolom;
         kolom = meta.getColumnCount();
         // Hier declareerd men welk soort meta type we naar browser sturen, hier dus HTML tekst
         res.setContentType("text/html");
         // Hier gaan we een PrintWriter object out aanmaken dat gebruikt zal worden om de html tekst naar de client te sturen
         PrintWriter out = res.getWriter();
         // De basis html code voor deze pagina
         out.println("<HTML >");
         out.println("<BODY BGCOLOR =fd8017>");
         out.println("<H1> <B><CENTER><FONT COLOR='#00008b'> Overzicht van de projecten </FONT></CENTER></B></H1>");
         /** Hier defini�ren we een tabel die van de hoogte en breedte van het scherm volledig gebruik maakt, waarvan de boord      * van de tabel een dikte van 1 heeft, de ruimte tussen de cellen in de tabel en tussen de randen van een cel en de      * inhoud is gelijk aan 2 (in pixels) en een achtergrondkleur fd8017
         out.println("<TABLE HEIGHT='100%' WIDTH='100%' BORDER=1 CELLPADDING = 2 CELLSPACING = 2 BGCOLOR =fd8017>");
              // begintag voor een nieuwe rij
              out.println("<TR>");
              /** Hier creeren we een lus om de kolom hoofden naar de client te sturen. Deze lus begint als j=1 en gaat           * door tot j = aantal kolommen en na elke loop wordt j verhoogd met 1. Normaal werden alle kolom hoofden           * uit de database opgehaald en afgebeeld, maar vermits MySQL geen kolom hoofden aanvaard waar spaties           * inzitten heb ik gekozen om hier de kolom hoofden die uit meer dan 1 woord bestaan op te halen en aan te           * passen. Dit voor estetische redenen, voor het functioneren van de servlet heeft dit echter geen belang
    for(int j=1;j<=kolom;j++){
              if (meta.getColumnName(j).equals("project")) {
              out.println("<TH><FONT COLOR='#00008b'> project nr </TH>");
              else if (meta.getColumnName(j).equals("budget")) {
              out.println("<TH><FONT COLOR='#00008b'> budget (in 1000 �) </TH>");
              else if (meta.getColumnName(j).equals("informatie")) {
              out.println("<TH><FONT COLOR='#00008b'> meer informatie ? </TH>");
              else {
              out.println("<TH><FONT COLOR='#00008b'>");     
              out.println(meta.getColumnName(j)+" ");
              out.println("</TH>");
              // Hier wordt de tag voor een nieuwe rij afgesloten
              out.println("</TR>");
              // Hier initialiseren we een Integer en String die later zullen worden gebruikt
              int k = 0;
              String nummer ="";
    // Dit deel van de programma code gaan we uitvoeren zolang er nog een volgende rij in de database bestaat
    while (rs.next()) {
              // Voor elke nieuwe rij wordt k verhoogd met 1
              k =k +1;
              // De tag voor een nieuwe rij
              out.println("<TR>");
         // Dit deel van de code wordt uitgevoerd zolang Integer i kleiner is dan het aantal kolommen
         for(int i=1;i <= kolom;i++) {
              // Een nieuwe cel waarin de data worden afgebeeld in de kleur #00008b
              out.println("<TD ALIGN='left' VALIGN ='top'>");
              out.println("<FONT COLOR='#00008b'> ");
              /** Hier halen we de kolomnaam op van kolom i en slagen we deze op in de String kolomnaam. Dan gaan we van           * deze naam de overtollige spaties (links en rechts van de naam) wegwerken.
              String kolomnaam = meta.getColumnName(i);
              kolomnaam = kolomnaam.trim();
              /** Als de kolomnaam gelijk is aan "project" dan gaan we de data van deze cel opslagen in de String nummer en           * deze dan doorsturen naar de client. Anders gaan we voort in onze programma code.
              if (kolomnaam.equals("project")) {
              nummer = rs.getString(i);
              out.println(nummer);
              /** Als het vorige niet waar is dan gaan we zien of de kolomnaam gelijk is aan "informatie", als dat zo is           * dan gaan we de data van de cel opslaan in de String celwaarde.
              else if ( kolomnaam.equals("informatie")) {
                   String celwaarde = rs.getString(i);
                   char punt = '.';
                   char under ='_';
                   nummer = nummer.replace(punt,under);               
                   /** Als deze String celwaade gelijk is aan "Y" dan gaan we een hyperlink afbeelden die opgebouwd is                * uit drie delen : de naam "project", de String nummer (de data uit de cel van project waar het                * "." is vervangen door "_" ) en de extensie ".html"
                   if (celwaarde.equals("Y") ){
                   out.println("<A HREF=project" + nummer + ".html> Project" +" "+ k +" </A>");     
                   /** Als de celwaarde niet gelijk is aan "Y" dan gaan we gewoon de naam "Project" en de Integer k                * afbeelden
                   else {
                   out.println("Project" +" " + k);
              else {
              out.println(rs.getString(i));
              out.println("</FONT>");
              out.println("</TD>");
              out.println("</TR>");
         out.println(" </TABLE>");
         out.println("</BODY>");
         out.println("</HTML>");
         // Hier wordt het object Satement afgesloten vermts we het niet meer nodig hebben
         stm.close();
    // Als er bij het uitvoeren van de programma code een fout zich voordoet dan wordt er een foutmelding weergegeven
    catch (SQLException e) {
    System.out.println(e.toString());

    The exception is thrown in the Doget method namely stm = con.createStatement();
    But i think that when i run my servlet that the init method is not used. I believe the problem is the access to the database.
    Thanks for the answer because i'm beginning to hate the cobalt server at my school

  • Examination system using JSP/SErvlet and MySQL

    Hi
    I am new to JSP /servlet.
    I am designing online examination system using JSP/Servlet and MySQL ,where multiple choice questions would be selected randomly from the database. After completion of the examination user gets the results ,also the results would be stored in the database for the future reference.
    Can anyone guide me for this? If possible give me the code for similar type of application.
    Thanks

    Sounds like you want someone else to do your homework for you, did you not read this:
    "This forum works so much better when you try to program the code yourself, then let us know where it doesn't work. Otherwise you learn very little, and we work a whole lot."
    and this
    "If you want free code, have you tried searching Google for it? You may want to consider looking for survey software. It will give you the question/answer capabilities then all you have to do is find a way to grade the survey (if you will)...
    If you are using Tomcat as your server, which you probably are, there is a jdbc tutorial included in the documentation, that is the fastest way to set up your database.
    As for your random selection, have a look at Math.random(), this is one way to generate random numbers, you will need an algorithm to convert this value (between 0.0 and 1.0) into a form that can be used to select information from your database.

  • Problem create servlet connecting mysql

    Hello,
    I'm trying to create a servlet with JBuilder foundation.
    I've a java file, not included in the package of the JBuilder project and i want to deploi it on the Tomcat server (version 5.0). I 'Make' it and i deploy the .class.
    When i execute it I've the following driver error :
    java.sql.SQLException: No suitable driver
    I don't know what to do... :-(
    Thank you........
    My code:
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import sun.beans.editors.IntEditor;
    import net.homeip.trv.util.*;
    import com.mysql.jdbc.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import com.mysql.jdbc.Statement;
    import com.mysql.jdbc.ResultSet;
    import java.util.Locale;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldExample extends HttpServlet
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    //-------------------------------start MySQL connection-----------------------------
    ResultSet rs = null;
    String queryString = "";
    String url = "jdbc:mysql://localhost:3306/db_client";
    String user = "root";
    String password = "root";
    try
    Class.forName("com.mysql.jdbc.Driver");//.newInstance();
    catch (ClassNotFoundException ex2)
    String msg = "";
    Connection con = null;
    try
    con = (Connection) DriverManager.getConnection(url, user, password);
    catch (SQLException ex1)
    msg += ex1;
    }

    I've to deploy it in the same place of .class ?No, you should create a war (or ear) file, and place the driver jar in the correct location of that file.
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WebComponents3.html
    Kaj

  • Apache2 local web server + Perl 5 + mysql problem

    this problem has been bugging me for some months; it's stopping me developing on my new MBP.
    I cannot connect to mysql 5.0.45 database when web sharing w/ Apache2 with either Perl 5.8 & Activeperl 5.10 cgi scripts on Mac OS X Leopard 10.5.2 & 10.5.3
    Although I can connect to the mysql DB when running the Perl scripts from the command line.
    The problem only occurs on my local web server in Mac OS X 10.5.2 & 10.5.3.
    On my old development Mac running 10.3 the code runs fine, as it also does on my remote site.
    server error log: Can't locate DBD/mysql.pm . . .
    I suspect there is a problem somewhere between Apache2, Perl & MySQL.
    Please advise.
    Sarpedon Jones
    Message was edited by: Sarpedon Jones

    I've got the same problem but It sounds like I've gotten farther. I was forced to do an emergency move of some Perl and PHP sites to 10.5.4 when our 10.4 web server refused to authenticate to AD anymore...
    Leopard's Apache/Perl support is terrible. There is not click to add option anymore so you have to manually set up mod_perl. No big deal but the first sign that there isn't reasonable support.
    The bigger issue is that Apple's Perl will not compile some modules.. namely DBD::mysql.
    Normally you'd use "cpan" to install the modules you need. The core module for connecting to a mysql database is DBD.. specifically DBD::mysql
    You should be able to run "cpan" or "cpanp" [cpan plus] to get a cpan interactive prompt. At this point you should be able to compile DBD by issuing either of the following:
    "install DBD::mysql" or
    "install Module DBD::mysql"
    I've tried this on two installs of OS X Server and that module (and others) will not compile on either system. One of my servers had been set up as a Wiki server before but the other had not been running any web services before I started using it as a test bed for my site move. (BTW these sites are unavailable until I can move them).
    There is another bug (noted on mysql's site) with Apple's version of cpan. If you try to add some modules, cpan will report that it needs to install a new, full version of Perl. The recommendation is to not do this, but rather force the install.. "install f DBD::mysql"
    Forcing the install is a questionable idea but it doesn't work anyway.
    I eventually did install perl 5.0.10 on the system in /usr/ and that does allow me to compile the needed Perl mods. However, the global @INC path has the old Perl paths listed so my perl CGIs will not use the new perl install.
    I'm sorry I don't have a solution. Hopefully my troubleshooting will elicit some more feedback.
    steven.

  • JSP + JDBC + MySql Problem (Tomcat 4.1)

    I'm completely helpless... whenever I try to retrieve stuff from the db (using a jsp page), I get errors that don't even make sense.
    out.println(stmt.executeQuery("SELECT * FROM newsTbl WHERE articleID = 1").getString("articleTitle"));if I try doing the above, I get a "ServletException : Before start of result set" error that supposedly occurred at this line of the generated servlet:
    if (pageContext != null) pageContext.handlePageException(t);---------------
    If i try this:
    ResultSet rsSec = stmt.executeQuery("SELECT * FROM newsSecTbl");
    rsSec.beforeFirst();  //<-- Even if I don't have this line the result does not change
      out.println(rsSec.next());
      while (rsSec.next()) { ... }I the while loop is never initiated, because rsSec.next() is false... kind of weird if you ask me, I even put two entries into the table to make sure the cursor wasnt at the first record and saying there was no second one (which would have been right if there were only one record).
    I would be very grateful if someone could help me out with this. I've never done any db programming with Java yet, so I dont have a clue what Im doing. By the way, I'm using MySql (indicated in the title) and the server was running and available when I ran the above code.
    Cheers,
    Tom

    You can't do this:
    out.println(stmt.executeQuery("SELECT * FROM newsTbl WHERE articleID = 1").getString("articleTitle"));The ResultSet you get back is a database cursor that doesn't point to the first row yet. The correct idiom is:
    String sql = "SELECT * FROM newsTbl WHERE articleID = 1";
    ResultSet result = stmt.executeQuery(sql);
    String articleTitle = "";
    while (result.next())
       title = result.getString("articleTitle");
    result.close();
    stmt.close();If you've never done DB programming before, I'd recommend that you click on the Tutorials link to the left and go through the JDBC tutorial carefully. You'll save yourself a lot of grief.
    Another good idea would be to separate out all your database code into at least one separate object, independent of the servlet. That way you can test and develop it off to the side until it's 100% solid. Then your servlet can simply instantiate one and use it. All your problems from that point forward will be servlet issues, because you'll know that your database code is working. - MOD
    See if that works better. - MOD

  • JDBC/MySQL Problem

    Hello, I'm getting this error when trying to make a connection with MySQL:
    Internal Servlet Error:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\tomcat\work\localhost_8080\_0002fdb_0002ejspdb_jsp_10.java:62: Undefined variable or class name: DriverManager
         conn = DriverManager.getConnection("jdbc:mysql:numbers", "username", "password");
         ^
    1 error, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:536)
    Here's the code I'm using:
    <%
         Class.forName("org.gjt.mm.mysql.Driver").newInstance();
         java.sql.Connection conn;
         conn = DriverManager.getConnection("jdbc:mysql:numbers", "username", "password");
    %>
    If anyone knows how to fix this, I'd appreciate any help!

    Hi,
    Three things:
    1. I presume numbers refers to the prot you are accesaing mysql - i tend to use default 3306.
    2. If there are problems recognising DriverManagaer are you importing java.sql.*; I'm sure you are.
    3. I think the sun.tools.javac.Main error relates to the tools version that you are using, although I would not guarantee this. The tools.jar in later versions of tomcat is twice the size of earlier versions and you have to ensure this is the version that your application is checking for. A quick test for this is to put the newer version(size 74k) into WEB-INF \lib directory where an application looks first for complied java files.
    best,
    kev
    ps If I'm wrong completely, let me know as I am watching this topic

  • EJB 3.0 entity beans generation with MySql - problem

    Hi,
    I am using JDev 10.1.3 Production and using the EJB3.0 CMP wizard to generate the code from a MySQL database. No matter what type I specify for my database columns in schema, code generator always generates the properties of type String only. e.g if a column called Age is specified as Integer in schema, the generator generates setters/getters with String type.
    Can somebody please help me.
    Regards
    Vimal

    Hi,
    I'm experiencing same problems, is this a bug or an feature?

  • JAVA with MYSQL problem

    i am using jdk1.6.0_02,apache tomcat 5.5.23 ,mysql integrated with redhat linux EE 4 and.mysql connector java 5.0.7.bin.jar.
    look at the the following java program
    import java.sql.*;
    public class TestMysql
    public static void main(String args[])
    try
    String driver = "com.mysql.jdbc.Driver";
    Class.forName( driver );
    String url = "jdbc:mysql://localhost/test";
    DriverManager.getConnection( url, "root", "mysql" );
    catch( Exception x )
    {      x.printStackTrace();
    i got the following exception
    java.sql.SQLException: Access denied for user 'root'@'localhost.localdomain' (us *** password:
    YES)
    at com.mysql.jdbc.SQLError.createSQLException(java.lang.String, java.lang.Str ***, int)
    (Unknown Source)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(int) (Unknown Source)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket() (Unknown Source)
    at com.mysql.jdbc.MysqlIO.secureAuth411(com.mysql.jdbc.Buffer, int, java.lang .String,
    java.lang.String, java.lang.String, boolean) (Unknown Source)
    at com.mysql.jdbc.MysqlIO.doHandshake(java.lang.String, java.lang.String, jav a.lang.String)
    (Unknown Source)
    at com.mysql.jdbc.Connection.createNewIO(boolean) (Unknown Source)
    at com.mysql.jdbc.Connection.Connection(java.lang.String, int, java.util.Prop erties,
    java.lang.String, java.lang.String) (Unknown Source)
    at com.mysql.jdbc.NonRegisteringDriver.connect(java.lang.String, java.util.Pr operties)
    (Unknown Source)
    at java.sql.DriverManager.getConnection(java.lang.String, java.util.Propertie s)
    (/usr/lib/libgcj.so.5.0.0)
    at java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, j
    ava.lang.String) (/usr/lib/libgcj.so.5.0.0)
    at Connect.main(java.lang.String[]) (Unknown Source)
    access denied problem. but the user name and password are correct. i can login to mysql by using
    the same username and password.
    but when connecting through java , i can't ? what is the problem?
    can u help me.?
    actually i am working in JSP. and when i got this problem, i created a small java program for testing.
    here i am submitting the java program.

    friend please put your code inside
       // your code goes here  it will more readable and other can solve it better.
    ==================
    and your problem tells that you must set access permission inside
    mySQL server.
    or try with creating new User with password.
    EnJOY.
    Ghanshyam
    Edited by: Ghanshyam on Sep 28, 2007 4:13 PM

  • TV@nywhere Plus FM problem

    I guys,
    I have no problem using the TV tuner, image is ok, sound is ok, record is ok... but if I choose FM, I will get the interface but cant ear anything?
    When you read the spec for the card, beside FM tuner you will see a (option)... How do I know if it is not an option on my card???
    Thanks
    Al

    Ok, I do got static, my speaker sound was to low. I do ear static now, I uninstalled the driver and reboot my pc, then reinstall driver + reboot but same problem, just static.
    I'm running Vista Ultimate Genuine (all updates done) over a MSI K7T266 Pro with 1.4G AMD Athlon, 1024MB, Sound Blaster Live 5.1, and of course TV@anywhere Plus card with latest Vista Driver and Vista Sofware.
    Thanks

  • TV@nywhere Plus Cable problem

    Hello folks...
    I have recently gotten a TV@nywhere Plus card and installed it in my machine.  It scans for channels and seems to find them, but the picture quality is terrible.  However,  If I choose antenna as the input it picks up the channels 2 to 12 and the picture is great! (I don't have an antenna connected, so the signal just is picked up out of the air) But, as soon as I choose the Cable input it sucks.  I live in Canada and my machine is an AMD 1800+ with a MSI KT3 Ultra motherboard, 1 GB of RAM, a MSI FX 5500 viodeo card, Running XP Home with service pack 2 and all updates applied
    Hope someone can help,
    Nets

    Lets start from the bottom and work up. Have you eliminated the cable & splitter hookup as the source of the problem by connecting to a TV? I had a problem similar to that when I first installed my TV@Plus and I had to remove/re-install the software and get a new cable & splitter before I could get it work.. No you don't need to use RG6. It does not hurt to have better but it's not a requirement.

  • MySQL problem with 1and1 hosting

    I have just discovered this group.  I posted a similar post in the Dreamweaver area, but it probably needs to
    be here.
    I was asked to add database functionality to a website hosted by 1and1.  I just started to use DW CS5
    recently and when I tried to connect the MySQL db using Dreamweaver, I got the 404 file not found error
    message.  It has been a while since I have worked with PHP and MySQL, but I have used MySQL many times in the
    past using DW CS4 and using 1and1, so I know that it used to be possible.
    Here is what I have done so far:
    Tried to connect using DS CS5.  Tried to connect using DW CS4.  I contacted 1and1 and they told me that they
    no longer allow MySQL to connect using Dreamweaver.  However, they sell DWCS4 software to be used with their
    higher end hosting packages (which I am using).
    Here are my questions:
    1) Is this a known problem with 1and1?  If so, is the DW that they sell altered to get around this?
    2) Is this how other hosting companies are going, or is this only true of 1and1?

    RobertBoy wrote:
    Tried to connect using DS CS5.  Tried to connect using DW CS4.  I contacted 1and1 and they told me that they
    no longer allow MySQL to connect using Dreamweaver.
    This means that they disabled remote access to their MySQL server for security reasons, meaning that you´ll have to...
    1. set up a local testing server (eg. MAMP, XAMPP) and develop/test your work locally
    2. upload the finalized files to the remote server and run them from there.
    If so, is the DW that they sell altered to get around this?
    Unlikely, because the product EULA declares a "No Modification" restriction.
    Is this how other hosting companies are going, or is this only true of 1and1?
    This is not uncommon with shared hostings in particular, though there may be some which allow remote access. Let´s hope that other forum participants can provide recommendations.

  • Servlet and utility problem

    Can we Implement "observer" utility in a class extending "HttpServlet"???
    I am giving a proposed code. Assume that all the packages has been imported. This code is giving run time error......
    The Code follows Like :
    class SomeServlet extends HttpServlets implements Observer
           public void Service(HttpServletRequest request, HttpServletResponse response)
                    BeingWatched bw = new BeingWatched(this);
          update(Observable o, Object arg)
    //Here is the code which is implementing Observable
    public class BeingWatched extends Observable
         public BeingWatched(Observer o)
              addObserver(o);
              counter(10);
         void counter(int period)
              for(;period>=0;period--)
                   setChanged();
                   //notifyObservers();
                   notifyObservers(new Integer(period));
                   try
                        Thread.sleep(1000);
                   catch(InterruptedException e)
                        System.out.println("sleep Interrupted");
         }

    Hi sumitk,
    Sorry for the delay in responding, I live down under so I'm in bed when everyone else is logged on.
    You can implement Observer as you have done from a servlet, I think something in the way you have written the servlet is causing you threading problems. My knowledge is a bit vague but try this article from javaworld:
    http://www.javaworld.com/javaworld/javatips/jw-javatip29.html?
    Its seems pretty good.

  • NX8600GTS - Diamond Plus HDMI Problem

    I have this new video card and am trying to connect a single display via HDMI only.  I do not wish to use DVI.  I'm having difficulity in setting this up properly.  I need help.  So far the only way I can get this to work is using Dual Display option and use DVI and then send the signal to the HDMI interface; however it requires the DVI connecter be active.  Any suggestions would be appreciated.

    I too am having this problem!!  This is a serious problem that someone from MSI needs to address.  I bought this card to use on my HTPC in my living room on my new Sony 52" LCD for gaming and HDTV.  If I plug just the HDMI in then then everything works up until the point Windows is supposed to start, and the sytem goes still and no display unless I plug something into the DVI port, even a VGA adapter to the TV's built in PC input, then suddently the system starts to boot.  I don't want to have to flip back and forth just to get windows to boot everytime!
    I did some searching on the internet and noticed other people have had this problem in the past with older model Nvidia cards like the 6800.  They appeared to have solved the problem by updating the Nvidia Bios with an ASUS version bios (even though their card was a different manufacturer).  I don't want to attempt this, but the moral of the story is it means the problem most likely is bios related, not driver.  Also the fact that Windows doesn't even boot yet, meaning the driver isn't even loaded yet, confirms that assumption.  What is probably happening is Windows is not detecting any displays so it doesn't boot.  I tried to update the MSI bios but apparently it's at the most current version, and there are no older versions listed for download I could try.
    Can someone from MSI please help us out here with this problem?  Most of the people who buy this HDMI card want to plug it into their HDTV as the only display.  If you can't do that with the HDMI it's worthless for that use!
    Quote from: jzizzi on 11-December-07, 05:44:02
    I have the same problem as the original poster with still no solution.
    Maybe I can clear it up a little as far as the specific problem.
    Hardware:
    MSI 8600GTS Diamond Plus (just one, no sli)
    MSI K9N SLI MB
    Corsair XMS2 Ram
    Sony Bravia 60" Projection TV
    If I plug the video card into a regular monitor via DVI, video card works great. Boots into Windows XP, everything is good.
    As soon as I disconnect the card from the monitor and move it to the tv and connect the tv via HDMI, system can boot into BIOS but after the summary screen, goes blank and Windows won't load. No HDD active LED, nothing.
    As soon as I plug in a monitor via DVI, boot into Windows, plug in HDMI, switch to Multiple monitors, I can then use the TV as a monitor.
    This wont due since I don't want to have a monitor sitting next to my TV all the time.
    I don't want to use another output method for my TV as, the way my sound system is connected, I don't want to have to select different sound sources everytime I switch input's on my tv (if that makes sense to anyone).
    I have done a MSILive BIOS update for the card but I'm not sure what it did since I didn't read the release notes.
    Drivers have no affect in this problem since it doesn't physically boot into Windows anyway.
    ANY HELP WOULD BE AWESOME!!!

  • Mysql problem with german special characters

    hi,
    I wrote a software and it worked quite good, but after I installed it on a new machine with j2se 1.4 I've problems with the german special characters.
    this code works good on the old machine (jdk 1.3.1) and prints the wanted characters like �,�,�.
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    java.sql.Connection conn;
    conn = DriverManager.getConnection("jdbc:mysql://localhost/testdb?user=testuser&password=xxxx");
    Statement s = conn.createStatement();
    ResultSet r = s.executeQuery("select something from testtb where id='1'");
    r.first();
    System.out.println( r.getString(1) );
    but on the new machine (j2se 1.4) I only receive the character ?.
    I updated my org.gjt.mm.mysql to the current MySQL Connector/J 3.0.9 and added
    conn = DriverManager.getConnection("jdbc:mysql://localhost/testdb?user=testuser&password=xxxx&useUnicode=true&characterEncoding=ISO-8859-1");
    but I've got still the same problem.
    Thanks in advance
    Markus

    with "wanted characters like �,�,�"
    I meant: like &#x00E4;,&#x00FC;,&#x00F6;

Maybe you are looking for

  • Opening an Application on IMAC

    I have just downloaded the "Pages" application on my IMAC but I cant open it. I open Itunes and then click on the icon but it does nothing.

  • How do I read a pdf file in Acrobat Reader (vs. Preview)?

    How do I read a pdf file in Acrobat Reader (vs. Preview)? I have a Mac OS, need to know the process to read a pdf file document in Acrobat Reader instead of Preview. Much thanks for suggestions.

  • Issues with Macbook Pro display.

    Hi. Recently, I haven't been having too much luck with Apple products. It started with my Macbook pro Core 2 duo 2.16. It had screen issues, leading to the screen being replaced (replacement screen contained several dead pixels), alongside a logic bo

  • Urgent help on reading data into ByteBuffer

    Hi, I am trying to read data into ByteBuffer using SocketChannel. The following code working fine but the problem is with ByteBuffer size. The data varies from request to request . How do I read data into ByteBuffer with out specifing size . The prob

  • How to stop the OS X from asking password?

    Everytime I wake up my computer from sleep mode, this message appears and I have to enter my username and password several times before it stops...what to do to stop this from appearing? Thanks!