Getting errors when using StrutsCX0.9.2 in own application
"Rautenberg, Stefan" <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Message-ID | <18D602BD42B7E24EB810D6454A58DB9001FFAE5B@ibfftce505.is.de.dresdnerkb.com> |
Hi all, some newbie questions: I have put the strutscx jar and appropriate config files into my existing struts app. Having an existing xml and xsl file I can't get them parsed and transformed well. Locale seems to be "null" in the StrutsCXDocumentBuilder line 341. xsl_clientside seems to be null, too, although I set it manually in the Action. The StrutsCXConstants class has references to the cappuccino package. How does this fit if StrutsCX is running in a different project with its own package name ? Why do I have to build a Document manually and put it into the request ? Doc says that the servlet does that automatically ... Project name and package: PrismDocumentation (com.drkw.prismdocumentation....) Transformation definition: <definition name="html"> <put>/WEB-INF/xsl/html/contentfile.xsl</put> </definition> files reside in: /WEB-INF/xml/index.xml (and actually also in /index.xml) /WEB-INF/xsl/html/contentfile.xsl ((no xsd file so far)) Code in the requested action: executeAtStart(mapping, form, request, response); HttpSession session = getValidSession(request); StrutsCXBaseActionHelper initParams = new StrutsCXBaseActionHelper(); String outputFormat = initParams.getViewtype(request, properties); String xmlFileName = "/WEB-INF/xml/index.xml"; String xslFileName = outputFormat + "." + "contentfile.xsl"; StrutsCXXMLReader myReader = new StrutsCXXMLReader(servlet, xmlFileName); Document xmlDoc = myReader.getDocument(); request.setAttribute(StrutsCXConstants.XML_KEY, xmlDoc); request.setAttribute(StrutsCXConstants.XSL_KEY, xslFileName); session.setAttribute(StrutsCXConstants.LOCALE, "de"); request.setAttribute(StrutsCXConstants.XSL_CLIENTSIDE, "true"); return (mapping.findForward(StrutsCXConstants.FORWARD_SUCCESS)); log output as follows: Apache Tomcat/4.0.6 2003-04-11 09:29:35,476 INFO - [StrutsCXBaseAction] -------------------------------------------- STRUTSCX BASEACTION INVOCED 2003-04-11 09:29:35,539 INFO - [StrutsCXXMLReader] begin to load: /WEB-INF/strutscx-config.xml 2003-04-11 09:29:35,554 INFO - [StrutsCXXMLReader] file last modified: Thu Apr 10 14:49:22 CEST 2003 2003-04-11 09:29:35,554 INFO - [StrutsCXXMLReader] the time we know: null 2003-04-11 09:29:35,554 INFO - [StrutsCXXMLReader] XML File has changed: reparsing...! 2003-04-11 09:29:35,851 INFO - [StrutsCXXMLReader] org.jdom.Document successfully created 2003-04-11 09:29:35,882 DEBUG - [StrutsCXXMLReader] lang en de ko 2003-04-11 09:29:35,898 DEBUG - [StrutsCXXMLReader] encoding 2003-04-11 09:29:35,898 DEBUG - [StrutsCXXMLReader] variables 2003-04-11 09:29:35,898 DEBUG - [StrutsCXXMLReader] param 2003-04-11 09:29:35,898 DEBUG - [StrutsCXXMLReader] strutscx-definitions 2003-04-11 09:29:35,898 DEBUG - [StrutsCXXMLReader] actioncache 2003-04-11 09:29:35,898 INFO - [StrutsCXXMLReader] /WEB-INF/strutscx-config.xml set to StrutsCXConstants.PACKAGE/WEB-INF/strutscx-config.xml 2003-04-11 09:29:35,898 INFO - [StrutsCXXMLReader] /WEB-INF/strutscx-config.xml set to StrutsCXConstants.PROPERTIES 2003-04-11 09:29:36,539 INFO - [StrutsCXBaseActionHelper] SET VIEW_KEY TO: html 2003-04-11 09:29:36,539 WARN - invoking XML file: /WEB-INF/xml/index.xml 2003-04-11 09:29:36,539 WARN - invoking XSL file: html.contentfile.xsl 2003-04-11 09:29:36,539 WARN - ServletConfig: parameter debug 2003-04-11 09:29:36,539 WARN - ServletConfig: parameter config 2003-04-11 09:29:36,554 INFO - [StrutsCXXMLReader] begin to load: /WEB-INF/xml/index.xml 2003-04-11 09:29:36,554 INFO - [StrutsCXXMLReader] file last modified: Fri Apr 11 09:02:31 CEST 2003 2003-04-11 09:29:36,554 INFO - [StrutsCXXMLReader] the time we know: null 2003-04-11 09:29:36,554 INFO - [StrutsCXXMLReader] XML File has changed: reparsing...! 2003-04-11 09:29:36,570 INFO - [StrutsCXXMLReader] org.jdom.Document successfully created 2003-04-11 09:29:36,570 DEBUG - [StrutsCXXMLReader] headline 2003-04-11 09:29:36,570 DEBUG - [StrutsCXXMLReader] listitems 2003-04-11 09:29:36,570 INFO - [StrutsCXXMLReader] /WEB-INF/xml/index.xml set to StrutsCXConstants.PACKAGE/WEB-INF/xml/index.xml 2003-04-11 09:29:36,570 WARN - Put XML file in session: [Document: No DOCTYPE declaration, Root is [Element: <contentfile/>]] 2003-04-11 09:29:36,570 WARN - Put XSL file in session: html.contentfile.xsl ************************************** ApplicationControllerAction *********************** 2003-04-11 09:29:36,617 INFO - [XSLTServlet] ------------------------------------------- STRUTSCXSERVLET STARTED 2003-04-11 09:29:36,632 INFO - [StrutsCXDocumentBuilder] ------------------------------------------- BUILD OF DOCUMENT STARTED 2003-04-11 09:29:36,632 INFO - [StrutsCXDocumentBuilder] xsl_clientside is set to: null 2003-04-11 09:29:36,632 INFO - [StrutsCXDocumentBuilder] Created root element: root ------------------------- locale was null Sorry for asking so much since it's the first time we use StrutsCX. And thanks for everything that helps ... Regards, Stefan Rautenberg Software Engineer Dresdner Kleinwort Wasserstein Global Business Services mailto:[email protected] CRM IT Voice : +49(0)69 713 19713 Theodor-Heuss-Allee 44/3rd floor Fax : +49(0)69 713 25044 60486 Frankfurt/ Main, Germany ---------------------------------------------------------------------- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. ---------------------------------------------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com