tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject switching
Date Sat, 03 Sep 2005 15:28:28 GMT
Could someone point out what's wrong with this setup? 

I have a laptop, sometimes going offline and don't want to
change strings each time I'm online or offline. (And don't want to run any
db server on the laptop if I can avoid it.)

Error is here:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 1 in the jsp file: conn_products.jsp
Generated servlet error:
sDriver cannot be resolved

In setup.jsp,

if(request.getServerName().equals("")) {
  String sDriver = "com.mysql.jdbc.Driver";
  String sUser = "user";
  String sPass = "password";
  String sDSN = "jdbc:mysql://localhost:3306/products";
} else if (request.getServerName().equals("localhost")) {
  String sDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
  String sUser = "";
  String sPass = "";
  String sDSN = "jdbc:odbc:products";

In conn_products.jsp,

        String MM_products_DRIVER = sDriver ;
        String MM_products_USERNAME = sUser ;
        String MM_products_PASSWORD = sPass ;
        String MM_products_STRING = sDSN ;
And in list.jsp,
<%include file="setup.jsp"%>
<%include file="conn_products.jsp"%>

Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message