Hi, I've continue to have problems with parsing the struts-config.xml. As Craig pointed out I've now included the missing DOCTYPE-element in the struts-config.xml. >From the stacktrace below you can see that the ActionServlet tries to locate a dtd from a alternate location which is the dtd in the struts.jar. Why is it doing that ? The dtd is already present at the jakarta site. Then the Digester throws an exception because it cannot find the dtd file in the struts.jar, which also is weird since I've included the struts.jar in my webapp /WEB-INF/lib directory. I'm using Struts 20001712 binary dist., Xerces-1.1.3, Resin 1.1.5, JDK 1.3.0 (see also the attached xml files) Any suggestions ? /caucho.com/http/host/: [2000/12/18 08:38:38] org.apache.struts.action.ActionSer vlet: init /caucho.com/http/host/: [2000/12/18 08:38:39] org.apache.struts.action.ActionSer vlet: Loading application resources from resource com.smartmediatech.internet.sh are.AppResources /caucho.com/http/host/: [2000/12/18 08:38:39] org.apache.struts.action.ActionSer vlet: Initializing configuration from resource path /WEB-INF/struts-config.xml /caucho.com/http/application/: realPath: /WEB-INF/struts-config.xml -> g:\Apache Group\Apache\webapps\trinity\WEB-INF\struts-config.xml register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'fil e:/org/apache/struts/resources/struts-config_1_0.dtd' resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') Resolving to alternate DTD 'file:/org/apache/struts/resources/struts-config_1_0 .dtd' /caucho.com/http/host/: [2000/12/18 08:38:40] Can't load servlet `org.apache.str uts.action.ActionServlet' /caucho.com/http/host/: java.io.FileNotFoundException: \org\apache\struts\resour ces\struts-config_1_0.dtd (The system cannot find the path specified) at org.apache.struts.digester.Digester.resolveEntity(Digester.java:573) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExtern alEntity(DefaultEntityHandler.java:739) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExtern alSubset(DefaultEntityHandler.java:566) at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScann er.java:1131) at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDoc umentScanner.java:2177) at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentSc anner.java:2133) at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispa tch(XMLDocumentScanner.java:882) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS canner.java:380) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861) at javax.xml.parsers.SAXParser.parse(SAXParser.java:211) at javax.xml.parsers.SAXParser.parse(SAXParser.java:137) at org.apache.struts.digester.Digester.parse(Digester.java:708) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java :1180) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:416) at javax.servlet.GenericServlet.init(GenericServlet.java:52) at com.caucho.server.http.Application.loadServlet(Application.java:1278) at com.caucho.server.http.Application.initServlets(Application.java:798) at com.caucho.server.http.Application.init(Application.java:763) at com.caucho.server.http.VirtualHost.init(VirtualHost.java:233) at com.caucho.server.http.ServletServer.initHosts(ServletServer.java:255 ) at com.caucho.server.http.ServletServer.init(ServletServer.java:156) at com.caucho.server.http.ServletServer.<init>(ServletServer.java:130) at com.caucho.server.http.RunnerServer.main(RunnerServer.java:184) /caucho.com/util/jni/: java.lang.UnsatisfiedLinkError: no caucho in java.library .path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312) at java.lang.Runtime.loadLibrary0(Runtime.java:749) at java.lang.System.loadLibrary(System.java:820) at com.caucho.util.CauchoNative.create(CauchoNative.java:63) at com.caucho.util.CpuUsage.create(CpuUsage.java:74) at com.caucho.server.TcpConnection.<init>(TcpConnection.java:100) at com.caucho.server.TcpServer.startConnection(TcpServer.java:401) at com.caucho.server.TcpServer.init(TcpServer.java:240) at com.caucho.server.http.RunnerServer.main(RunnerServer.java:190) Med venlig hilsen/Best Regards ----------------------------------------------- Jannik Nørgaard Steen Software Developer Digital Zone International http://www.digitalzone.dk mailto:[EMAIL PROTECTED] ----------------------------------------------- "As a software developer, I can offer you this advice: if you have a performance issue, buy faster hardware!"
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> <struts-config> <form-beans> <!-- Login form bean --> <form-bean name="com.smartmediatech.internet.actionForm.LoginForm" type="com.smartmediatech.internet.actionForm.LoginForm"/> <!-- Database form bean --> <form-bean name="com.smartmediatech.internet.actionForms.DatabaseForm" type="com.smartmediatech.internet.actionForms.DatabaseForm"/> <!-- Image quality form bean --> <form-bean name="com.smartmediatech.internet.actionForms.ImageQualityForm" type="com.smartmediatech.internet.actionForms.ImageQualityForm"/> <!-- Simple search form bean --> <form-bean name="com.smartmediatech.internet.actionForms.SimpleSearchForm" type="com.smartmediatech.internet.actionForms.SimpleSearchForm"/> <!-- Material info form bean --> <form-bean name="com.smartmediatech.internet.actionForms.MaterialInfoForm" type="com.smartmediatech.internet.actionForms.MaterialInfoForm"/> </form-beans> <!-- +++++++++ action mapping definitions +++++++++ --> <action-mappings> <!-- login action --> <action path="/login" type="com.smartmediatech.internet.actions.LoginAction" name="com.smartmediatech.internet.actionForms.LoginForm" scope="request"> <forward name="login_success" path="/show/simplesearch" redirect="false"/> <forward name="login_failure" path="/show/login" redirect="true"/> </action> <!-- logout action --> <action path="/logout" type="com.smartmediatech.internet.actions.LogoutAction"> <forward name="logout_success" path="/show/logout" redirect="true"/> <forward name="logout_failure" path="/show/logout" redirect="true"/> </action> <!-- category action --> <action path="/category" type="com.smartmediatech.internet.actions.CategoryAction"> <forward name="show_categories" path="/show/categories" redirect="false"/> <forward name="failure_category" path="/show/categories" redirect="false"/> </action> <!-- ascend category action --> <action path="/ascendcategory" type="com.smartmediatech.internet.actions.AscendCategoryAction"> <forward name="show_categories" path="/show/categories" redirect="false"/> </action> <!-- descend category action --> <action path="/descendcategory" type="com.smartmediatech.internet.actions.DescendCategoryAction"> <forward name="show_categories" path="/show/categories" redirect="false"/> <forward name="show_material" path="/show/materialindex" redirect="false"/> <forward name="failure_descend_category" path="/show/simplesearch" redirect="false"/> </action> <!-- jump to category action --> <action path="/jumpcategory" type="com.smartmediatech.internet.actions.JumpCategoryAction"> <forward name="show_categories" path="/show/categories" redirect="false"/> </action> <!-- reset categories action --> <action path="/resetcategories" type="com.smartmediatech.internet.actions.ResetCategoryAction"> <forward name="reset_categories" path="/show/categories" redirect="false"/> </action> <!-- category subsearch action --> <action path="/subsearchcategory" type="com.smartmediatech.internet.actions.SubsearchCategoryAction"> <forward name="show_material" path="/show/materialindex" redirect="false"/> </action> <!-- simple search action --> <action path="/simplesearch" type="com.smartmediatech.internet.actions.SimpleSearchAction" name="com.smartmediatech.internet.actionForms.SimpleSearchForm" scope="request"> <forward name="success_simple_search" path="/show/materialindex" redirect="false"/> <forward name="no_data_in_resultset" path="/show/simplesearch" redirect="false"/> <forward name="failure_simple_search" path="/show/simplesearch" redirect="false"/> </action> <!-- advanced search action --> <action path="/advancedsearch" type="com.smartmediatech.internet.actions.SearchAction" name="com.smartmediatech.internet.actionForms.SearchForm" scope="request"> <forward name="success_adv_search" path="/show/materialindex" redirect="false"/> <forward name="no_data_in_resultset" path="/show/advancedsearch" redirect="false"/> <forward name="failure_adv_search" path="/trinity/show/test" redirect="false"/> </action> <!-- change search terms action --> <action path="/changesearchterms" type="com.smartmediatech.internet.actions.ChangeSearchTermsAction"> <forward name="success_term_change" path="/show/advancedsearch" redirect="false"/> </action> <!-- change database action --> <action path="/changedb" type="com.smartmediatech.internet.actions.DatabaseAction" name="com.smartmediatech.internet.actionForms.DatabaseForm"> <forward name="success_db_change" path="/show/simplesearch" redirect="false"/> </action> <!-- get material info action --> <action path="/materialinfo" type="com.smartmediatech.internet.actions.MaterialInfoAction" name="com.smartmediatech.internet.actionForms.MaterialInfoForm"> <forward name="success_info" path="/show/materialinfo" redirect="false"/> </action> <!-- update material info action --> <action path="/updateinfo" type="com.smartmediatech.internet.share.MaterialInfoUpdateAction" name="com.smartmediatech.internet.actionForms.MaterialInfoForm"> <forward name="success_update_info" path="/trinity/show/materialinfo" redirect="false"/> </action> <!-- switch view action --> <action path="/switchview" type="com.smartmediatech.internet.actions.SwitchViewAction" name="com.smartmediatech.internet.actionForms.ViewForm"> <forward name="simplesearch_screen" path="/show/simplesearch" redirect="false"/> <forward name="materialindex_screen" path="/show/materialindex" redirect="false"/> </action> <!-- get page action --> <action path="/getpage" type="com.smartmediatech.internet.actions.GetPageAction"> <forward name="success_getpage" path="/show/materialindex" redirect="false"/> <forward name="failure_getpage" path="/show/simplesearch" redirect="false"/> </action> <!-- basket action --> <action path="/basket" type="com.smartmediatech.internet.actions.BasketAction"> <forward name="show_basket" path="/show/basket" redirect="false"/> </action> <!-- basket transfer action --> <action path="/baskettransfer" type="com.smartmediatech.internet.actions.BasketTransferAction"> <forward name="success_baskettransfer" path="/show/materialindex" redirect="false"/> </action> <!-- The standard administrative actions --> <action path="/admin/addFormBean" type="org.apache.struts.actions.AddFormBeanAction"/> <action path="/admin/addForward" type="org.apache.struts.actions.AddForwardAction"/> <action path="/admin/addMapping" type="org.apache.struts.actions.AddMappingAction"/> <action path="/admin/reload" type="org.apache.struts.actions.ReloadAction"/> <action path="/admin/removeFormBean" type="org.apache.struts.actions.RemoveFormBeanAction"/> <action path="/admin/removeForward" type="org.apache.struts.actions.RemoveForwardAction"/> <action path="/admin/removeMapping" type="org.apache.struts.actions.RemoveMappingAction"/> </action-mappings> </struts-config>
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <servlet> <servlet-name>initialization</servlet-name> <servlet-class>com.smartmediatech.internet.share.InitializationServlet</servlet-class> <init-param> <param-name>hostname</param-name> <param-value>caroline</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>com.smartmediatech.internet.share.TemplateServlet</servlet-name> <servlet-class>com.smartmediatech.internet.share.TemplateServlet</servlet-class> <init-param> <param-name>templateFileName</param-name> <param-value>/smtTemplate.jsp</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet> <servlet-name>com.smartmediatech.internet.share.ImageSupplierServlet</servlet-name> <servlet-class>com.smartmediatech.internet.share.ImageSupplierServlet</servlet-class> <init-param> <param-name>hostname</param-name> <param-value>caroline</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet> <servlet-name>org.apache.struts.action.ActionServlet</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>application</param-name> <param-value>com.smartmediatech.internet.share.AppResources</param-value> </init-param> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>nocache</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>validate</param-name> <param-value>true</param-value> </init-param> <load-on-startup>4</load-on-startup> </servlet> <!-- Struts Tag Library Descriptor --> <taglib> <taglib-uri>bean</taglib-uri> <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>form</taglib-uri> <taglib-location>/WEB-INF/tlds/struts-form.tld</taglib-location> </taglib> <taglib> <taglib-uri>logic</taglib-uri> <taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>template</taglib-uri> <taglib-location>/WEB-INF/tlds/struts-template.tld</taglib-location> </taglib> <!-- Smart Media Technologies Tag Library Descriptor --> <taglib> <taglib-uri>smttaglib</taglib-uri> <taglib-location>/WEB-INF/tlds/smttaglib.tld</taglib-location> </taglib> </web-app>