I have to admit that I am new to application server administration, and being
a programmer, I have a new found respect for the administrators I work with.
That being said, I am having a problem configuring my web application to
load when I type www.mydomain.com in my browser address bar. My
application does work as long as I type www.mydomain.com/myapp for the url.
I have tried changing my server.xml host context and WEB-INF/context.xml
with no luck. The closest I get to this working is the application starts
to load but as soon as it gets to a point in the servlet where it is
referencing my formBean it stops loading the page. When I look at the log I
notice that the first error fails to get the database resource need to build
the form. Then of course I get jsp exceptions because the formBean failed
to initialize. Below is the first line in of the first exception that is
thrown as well as my server.xml and META-INF/context.xml entries.
I have been through several forum threads that are similar to this issue,
but I have had no luck translating the suggestions successfully, and have
yet to find out why it works as long as I qualify the context path in the
url. Any help would be greatly appreciated.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'
server.xml
<Server
port="9999">
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
<GlobalNamingResources>
<Resource
auth="Container"
description="User database"
name="UserDatabase"
type="org.apache.catalina.UserDatabase"
pathname="conf/tomcat-users.xml"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
</GlobalNamingResources>
<Service
name="Catalina">
<Connector
port="9999"
minSpareThreads="1"
address="127.0.0.1"
maxThreads="50"
maxSpareThreads="3"
connectionTimeout="30000"
protocol="AJP/1.3">
</Connector>
<Engine
defaultHost="mydomain.com"
name="Catalina">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
<Host
appBase="/home/userId/public_html"
name="mydomain.com">
<Alias>www.mydomain.com</Alias>
<Context
docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/admin"
path="/admin"
privileged="true"
reloadable="true">
</Context>
<Context
docBase="/usr/local/tomcat/apache-tomcat-5.5.26/server/webapps/manager"
path="/manager"
privileged="true"
reloadable="true">
<ResourceEnvRef
name="users"
type="org.apache.catalina.UserDatabase"/>
</Context>
<Context
docBase="/home/userId/public_html/myapp"
path=""
reloadable="true">
</Context>
</Host>
</Engine>
</Service>
</Server>
META-INF/context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myapp" docBase="myapp" reloadable="true"
crossContext="true">
<Resource name="jdbc/mycon" auth="Container" type="javax.sql.DataSource"
maxActive="40" maxIdle="5" maxWait="5000"
username="user" password="password"
driverClassName="com.mysql.jdbc.Driver"
removeAbandoned="true" removeAbandonedTimeout="3"
logAbandoned="true"
url="jdbc:mysql://www.mydomain.com:3306/database?autoReconnect=true" />
</Context>
--
View this message in context:
http://www.nabble.com/Virtual-host-configuration-problems-tp23501325p23501325.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]