Hi . I�ve been experiencing problems for running an application that mixes Struts and Struts-Layout. I have a page with 3 tabs on it, where each has its on form to post... Once I submit one of these forms, I get an "Servlet action is currently unavailable" , which means that my controller is off , isn�t it ? So I checked the Tomcat�s logs and got the following :
"Servlet /testes/struts-layout threw load() exception javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE" and... in stderr.log "org.apache.struts.action.ActionServlet initModuleDataSources SEVERE: Initializing application data source org.apache.struts.action.DATA_SOURCE java.sql.SQLException: Cannot create JDBC driver of class 'COM.ibm.db2.jdbc.app.DB2Driver' for connect URL 'jdbc b2:base' "
My DataSource declaration in the struts-config.xml is : <data-sources> <data-source> <set-property property="driverClass" value="COM.ibm.db2.jdbc.app.DB2Driver" /> <set-property property="url" value="jdbc b2:base" /> <set-property property="maxCount" value="5"/> <set-property property="minCount" value="1"/> <set-property property="user" value="japiadm"/> <set-property property="password" value="admin"/> </data-source> </data-sources> I think the serlvet controller is not being instantiated because of some sort of problem with the Data Source ... but I don�t know what... In general, what causes the controller not to start ? I�ve also already checked the names for the Action class called by the posting... and it�s ok...
Any idea ? Tks ! Fabio [ June 05, 2003: Message edited by: fabio gama ]
Joined: Nov 22, 2008
I found it out myself... In fact , I�m running all my tests under Tomcat 4.1.x... Comparing many log files, I saw problems with the DataSource... So, I disabled 2 contexts and another host that were Struts-bases applications and left only context configured for running Struts applications, once apparently, it�s not possible to run 2 or more Struts applications under Tomcat...(or most likely I don�t know how to configure it...) . Does anybody know how to configure it to run many Struts-based applications ?
Joined: Nov 22, 2008
Making myself clearer... : Does anybody know how to configure Tomcat to run several Struts-based apps to work concurrently under the same host (different contexts ) or different hosts ? Tks F�bio