Diky za odkaz. Radu veci jsem pochopil, ale problem stale trva.
Tomcat mi stale vraci:
javax.servlet.ServletException: Unable to get connection, DataSource invalid:
"java.sql.SQLException: No suitable driver"
Na strance
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations
jsem si precetl:
Configure the JNDI DataSource in Tomcat by adding a declaration for your
resource to |$CATALINA_HOME/conf/server.xml|.
Add this in between the |</Context>| tag of the examples context and the
|</Host>| tag closing the localhost definition.
Provozuju NetBeans na WinXP, a Tomcat mi vratil:
Using CATALINA_HOME: C:\Program
Files\netbeans-5.0\enterprise2\jakarta-tomcat-5.5.9
Podle toho se tedy pokousim upravit soubor server.xml. Bohuzel nevim,
jestli spravne.
Tag <context> v souboru server.xml vubec neni a tak jsem to pridal az na
jeho konec:
<Context path="/DB2" docBase="DB2"
debug="5" reloadable="true" crossContext="true">
<Resource name = "jdbc/cegelec"
auth = "Container"
type = "javax.sql.DataSource"
username = "sa"
password = "test"
driverClassName = "net.sourceforge.jtds.jdbc.Driver"
url =
"jdbc:jtds:sqlserver://delphi/cegelec_ostra"
maxActive = "8"
maxIdle = "4"/>
</Context>
</Host>
</Engine>
</Service>
</Server>
V jine casti dokumentace se zminuji, ze se musi editovat soubor
meta-inf/context.xml. To jsem taky zkousel.