Click here to Skip to main content
15,915,093 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: javascript: Copy the selected text to notepad automatically Pin
Perspx20-Aug-08 23:53
Perspx20-Aug-08 23:53 
AnswerRe: javascript: Copy the selected text to notepad automatically Pin
Shog921-Aug-08 4:38
sitebuilderShog921-Aug-08 4:38 
Questioncss/java popup help. (scrolling) Pin
wizard 20220-Aug-08 17:32
wizard 20220-Aug-08 17:32 
QuestionWebsite File Dependencies Tracker? Pin
hifiger200420-Aug-08 1:57
hifiger200420-Aug-08 1:57 
AnswerRe: Website File Dependencies Tracker? Pin
Johnny ²20-Aug-08 8:54
Johnny ²20-Aug-08 8:54 
QuestionAJAX Tool kit is not working Pin
ganeshMohan19-Aug-08 18:13
ganeshMohan19-Aug-08 18:13 
AnswerRe: AJAX Tool kit is not working Pin
Shog920-Aug-08 7:09
sitebuilderShog920-Aug-08 7:09 
QuestionWhy code can compiled successfully without mysql-connector-java-#-bin.jar installed Pin
cy163@hotmail.com19-Aug-08 17:00
cy163@hotmail.com19-Aug-08 17:00 
Hello All,

In my program, i want to use a Java servlet to response to users' web request, in which the info submitted by users is write into a remote MySQL database. To this end, I have to establish a connection to the MySQL database firsts. I do this using the following code and can compile it sucessfully. It is strange to me that the code can be compiled successfully,though there is actually not mysql-connector-java-###-bin.jar package installed/copied on the Linux box.

import java.sql.*;
import java.io.*;
import java.util.*;
public class welcomeyou extends HttpServlet
{
    public void doGet(HttpServletRequest rqu, HttpServletResponse resp)
    {
         String driver="com.mysql.jdbc.Driver";
         String url="jdbc:mysql://192.168.1.1/DatabaseName";
         String databaseuser="root";
         String password=""
         Connection con = null;Statement smt =null;
         Resultset rs=null; 
         try
          {

                 con=DriverManager.getConnection(url, databaseuser, password);
                 smt =con.createStatement();
          }
         catch(SQLException E)
          {
              System.out.println("SQLException:" + E.getMessage());
             System.exit(0);
           }
   }
}

I cannot provide error message, since the statement System.out.println("....) could not display error message on the screen in this circumstance.(Could anybody tell me how to do this )

I wonder if the statement 'import java.sql.*;' means import library from mysql-connector-java-###-bin.jar

Please help me, this problem has stuck me for a long time.

thanks
QuestionWhat's this hidden input tag in .Net? Pin
Mohammad Dayyan19-Aug-08 14:52
Mohammad Dayyan19-Aug-08 14:52 
AnswerRe: What's this hidden input tag in .Net? Pin
Bassam Saoud19-Aug-08 17:21
Bassam Saoud19-Aug-08 17:21 
QuestionCrystal Report in Web Form Pin
Hemant Thaker19-Aug-08 0:57
Hemant Thaker19-Aug-08 0:57 
Questioncopy file from one server to another Pin
Member 410217119-Aug-08 0:51
Member 410217119-Aug-08 0:51 
AnswerRe: copy file from one server to another Pin
dgreat121-Aug-08 4:52
dgreat121-Aug-08 4:52 
QuestionDays in a Month in Javascript Pin
.NET- India 19-Aug-08 0:50
.NET- India 19-Aug-08 0:50 
GeneralRe: Days in a Month in Javascript Pin
Perspx19-Aug-08 0:55
Perspx19-Aug-08 0:55 
AnswerRe: Days in a Month in Javascript Pin
Guffa19-Aug-08 11:53
Guffa19-Aug-08 11:53 
Questionhtml file control on Mac Firefox Pin
Saetan18-Aug-08 22:03
Saetan18-Aug-08 22:03 
AnswerRe: html file control on Mac Firefox Pin
Johnny ²18-Aug-08 22:58
Johnny ²18-Aug-08 22:58 
QuestionWhat are the different ways of sending a form to an email Pin
Christopher Clarke18-Aug-08 11:52
Christopher Clarke18-Aug-08 11:52 
AnswerRe: What are the different ways of sending a form to an email Pin
Perspx18-Aug-08 12:02
Perspx18-Aug-08 12:02 
AnswerRe: What are the different ways of sending a form to an email Pin
Manas Bhardwaj18-Aug-08 12:15
professionalManas Bhardwaj18-Aug-08 12:15 
AnswerRe: What are the different ways of sending a form to an email Pin
User 171649218-Aug-08 12:25
professionalUser 171649218-Aug-08 12:25 
GeneralRe: What are the different ways of sending a form to an email Pin
Christopher Clarke18-Aug-08 12:34
Christopher Clarke18-Aug-08 12:34 
QuestionFirefox Dropdown Menu Problem Pin
dragon1011318-Aug-08 6:19
dragon1011318-Aug-08 6:19 
AnswerRe: Firefox Dropdown Menu Problem Pin
Shog918-Aug-08 6:43
sitebuilderShog918-Aug-08 6:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.