Originally posted by Sen Aff:
....
String URL = "jdbc:mysql:localhost:8084/Practice/School?user=root&password=password";
.....
try {
con = DriverManager.getConnection(URL);
......
and this is the error i had:org.apache.jasper.JasperException: Exception in JSP: /ShowStu.jsp:51
48: Connection con = null;
49:
50: try {
51: con = DriverManager.getConnection(URL);
root cause
javax.servlet.ServletException: No suitable driver found for jdbc:mysql:localhost:8084/Practice/School?user=root&password=password
...the jar file for your JDBC driver should be installed in $CATALINA_HOME/common/lib
The Cloudscape product includes a text-based, interactive tool called ij. (This tool is not supported by Sun Microsystems, Inc.) You can run the ij tool by typing this command:
Originally posted by ransika desilva:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
The error is this ;
stockIT.java [315:1] No method found matching forName(String)
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
^
stockIT.java [352:1] No method found matching forName(String)
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
^
Thanks
Originally posted by raghav mathur:
Is is possible to access the database(Mysql) which resides at www.xyz.com through a remote client. That is, can an application which DOES NOT reside on the server ( where the database is )can acess the database by specifying the following statements :
String url = "jdbc:mysql://ip of the site:3306/xxx?user=root&password=";
connection = DriverManager.getConnection(url);
Thanks in advance
Originally posted by Reid M. Pinchback:
If you literally want simultaneous independent statement execution then you want multiple connection objects, typically managed via a connection pool.
Originally posted by jack nick:
Hi there,
This seem a very curly problem. Have got some servlet specific parameters in the web.xml. For some reason when the servlet is loaded on startup I am able to get the parameters using the getInitParameter("xyz") method. But for some reason cannot seem to get this when the servlet is initialised on first visit.
Originally posted by Jan Michael Soan:
try {
Statement statement = connect.createStatement();
String query1 = "SELECT * FROM Records " +
"WHERE IdNumber = '" + t1.getText() + "'";
String query2 = "SELECT * FROM Deductions " +
"WHERE IdNumber = '" + t1.getText() + "'";
ResultSet rs1 = statement.executeQuery( query1 );
ResultSet rs2 = statement.executeQuery( query2 );
Originally posted by sheril she:
could u pls explain when exactly the servlet constructor is called and when the init method is called.since in a servlet's lifecycle there is only the init ,service and destroy.and it is said that the init method is called when the servlet is loaded.so what is the difference between creating instances and loading the servlet?where are these instances stored?
Originally posted by thomas davis:
1)How is this method overriden in HttpServlet Or user-defined servlet?
Since service method is abstract so is GenericServlet class .
2) If service method implemented in HttpServlet class by CONTAINER, Why HttpServlet class is a abstract class?
3) Moreover there are no abstract methods in HttpServlet class,why is it called abstract class?
4) If container override the method service() in HttpServlet,why is it's access specifier abstract?
As per specification,if we implement the abstract method in its subclass ,no need of mentioning it as a abstract class. Why is it mentioned as a abstract class?