Re: [Winstone-devel] Winstone consequently runs on Web-App 2.3
Status: Beta
Brought to you by:
rickknowles
From: Rick K. <ri...@kn...> - 2011-12-27 03:56:05
|
Would you mind modifying the run.sh to add --debug=9 to the command line that executes winstone (presumably something like "java -jar winstone.jar ...") and sending me that ? I can't tell if you're running the lite version or the full version without that, and whether you're having jar loading issues. I'll mail you a bunch of jars that I use for servlet spec 2.4 jsp execution separately. Using the jetty ones is something I haven't tried. Thanks, Rick On Mon, 2011-12-26 at 22:34 +0100, Jens Rapp wrote: > hi, > I got a maven based build which uses the maven-winstone-plugin to create > a standalone webapp. creating jsp-enabled applications seems not to work > with this maven plugin. Therefore I enabled jasper manually in my > web.xml. For iasper I use the jsp lib from jetty (didn't find any other..?) > Next I want to use JSTL for iterating Collections and configure it in my > web.xml. > > When I start my app I get this message: > tecdroid@tecdroidWS:~/workspaces/mvn/app/workdir$ ./run.sh > [Winstone 2011/12/26 22:10:25] - Beginning extraction from war file > [Winstone 2011/12/26 22:10:26] - XML Error (Line 2): Document is > invalid: no grammar found. > [Winstone 2011/12/26 22:10:26] - XML Error (Line 2): Document root > element "web-app", must match DOCTYPE root "null". > [Winstone 2011/12/26 22:10:26] - HTTP Listener started: port=8080 > [Winstone 2011/12/26 22:10:26] - AJP13 Listener started: port=8009 > [Winstone 2011/12/26 22:10:26] - Winstone Servlet Engine v0.9.10 > running: controlPort=disabled > > running some jsp with jstl included I get an exception > [webapp 2011/12/26 22:31:08] - Exception initializing TldLocationsCache: > XML parsing error on file /WEB-INF/web.xml: (line 2, col 9): Document is > invalid: no grammar found. > [Winstone 2011/12/26 22:31:08] - Untrapped Error in Servlet > > org.apache.jasper.JasperException: This absolute uri > (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or > the jar files deployed with this application > at > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:105) > at > org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430) > at > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154) > at > org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:159) > at > org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) > at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) > at org.apache.jasper.compiler.Parser.parseElements(Parser.java:795) > at org.apache.jasper.compiler.Parser.parse(Parser.java:122) > at > org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) > at > org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) > at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227) > at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) > at > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) > at winstone.ServletConfiguration.execute(ServletConfiguration.java:249) > at winstone.RequestDispatcher.forward(RequestDispatcher.java:335) > at de.docjunior.framework.WebApp.doPost(WebApp.java:98) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:121) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) > at winstone.ServletConfiguration.execute(ServletConfiguration.java:249) > at winstone.RequestDispatcher.forward(RequestDispatcher.java:335) > at > winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244) > at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) > at java.lang.Thread.run(Thread.java:636) > > > To me this looks like winstone tries to parse my web.xml using > Web-Application Standard 1.3. My web.xml uses 2.4. How can I prove this > theory and how can I repair this? > > I don't want to send my whole project since it's a bit dirty but here's > my web.xml > > <?xml version="1.0" encoding="ISO-8859-1" ?> > <web-app xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > > <display-name>KlientenManager</display-name> > <description> > This is a simple web application with a source code organization > based on the recommendations of the Application Developer's Guide. > </description> > <servlet> > <servlet-name>KliMa</servlet-name> > <servlet-class>de.docjunior.framework.WebApp</servlet-class> > </servlet> > <servlet-mapping> > <servlet-name>KliMa</servlet-name> > <url-pattern>/klima</url-pattern> > </servlet-mapping> > > <servlet> > <servlet-name>jsp</servlet-name> > <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> > <init-param> > <param-name>fork</param-name> > <param-value>false</param-value> > </init-param> > <init-param> > <param-name>xpoweredBy</param-name> > <param-value>false</param-value> > </init-param> > <load-on-startup>3</load-on-startup> > </servlet> > > <servlet> > <servlet-name>H2Console</servlet-name> > <servlet-class>org.h2.server.web.WebServlet</servlet-class> > <init-param> > <param-name>webAllowOthers</param-name> > <param-value></param-value> > </init-param> > <init-param> > <param-name>trace</param-name> > <param-value></param-value> > </init-param> > <load-on-startup>1</load-on-startup> > </servlet> > > <servlet-mapping> > <servlet-name>H2Console</servlet-name> > <url-pattern>/console</url-pattern> > </servlet-mapping> > > <servlet-mapping> > <servlet-name>jsp</servlet-name> > <url-pattern>*.jsp</url-pattern> > </servlet-mapping> > > <servlet-mapping> > <servlet-name>jsp</servlet-name> > <url-pattern>*.jspx</url-pattern> > </servlet-mapping> > > <welcome-file-list> > <welcome-file>index.jsp</welcome-file> > </welcome-file-list> > > <taglib> > <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri> > <taglib-location>/WEB-INF/fmt.tld</taglib-location> > </taglib> > > <taglib> > <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri> > <taglib-location>/WEB-INF/fmt-rt.tld</taglib-location> > </taglib> > > <taglib> > <taglib-uri>http://java.sun.com/jstl/core</taglib-uri> > <taglib-location>/WEB-INF/c.tld</taglib-location> > </taglib> > > <taglib> > <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri> > <taglib-location>/WEB-INF/c-rt.tld</taglib-location> > </taglib> > > <taglib> > <taglib-uri>http://java.sun.com/jstl/x</taglib-uri> > <taglib-location>/WEB-INF/x.tld</taglib-location> > </taglib> > > <taglib> > <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri> > <taglib-location>/WEB-INF/x-rt.tld</taglib-location> > </taglib> > </web-app> > > and this is my pom.xml > > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>de.docjunior.teenex</groupId> > <artifactId>Klientenmanager</artifactId> > <version>0.0.1-SNAPSHOT</version> > <packaging>war</packaging> > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>2.3.2</version> > <configuration> > <source>1.6</source> > <target>1.6</target> > </configuration> > </plugin> > <plugin> > <groupId>net.sf.alchim</groupId> > <artifactId>winstone-maven-plugin</artifactId> > <version>1.2</version> > <configuration> > <outputDirectory>workdir</outputDirectory> > </configuration> > <executions> > <execution> > <goals> > <goal>embed</goal> > </goals> > <phase>package</phase> > </execution> > </executions> > </plugin> > </plugins> > </build> > <dependencies> > <dependency> > <groupId>log4j</groupId> > <artifactId>log4j</artifactId> > <version>1.2.13</version> > </dependency> > <dependency> > <groupId>jetty</groupId> > <artifactId>jsp</artifactId> > <version>2.1-6.0.2</version> > <type>jar</type> > <scope>compile</scope> > </dependency> > <dependency> > <groupId>org.javassist</groupId> > <artifactId>javassist</artifactId> > <version>3.15.0-GA</version> > <type>jar</type> > </dependency> > <dependency> > <groupId>org.slf4j</groupId> > <artifactId>slf4j-log4j12</artifactId> > <version>1.6.1</version> > <type>jar</type> > <scope>runtime</scope> > </dependency> > <dependency> > <groupId>de.docjunior.teenex</groupId> > <artifactId>Klientenmanager-persistence</artifactId> > <version>0.1.0</version> > <type>jar</type> > <scope>compile</scope> > </dependency> > <dependency> > <groupId>de.docjunior</groupId> > <artifactId>webframework</artifactId> > <version>0.1.0</version> > <type>jar</type> > <scope>compile</scope> > </dependency> > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>jstl</artifactId> > <version>1.1.2</version> > <type>jar</type> > <scope>compile</scope> > </dependency> > <dependency> > <groupId>taglibs</groupId> > <artifactId>standard</artifactId> > <version>1.1.2</version> > <type>jar</type> > <scope>compile</scope> > </dependency> > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>servlet-api</artifactId> > <version>3.0-alpha-1</version> > <type>jar</type> > <scope>provided</scope> > </dependency> > </dependencies> > </project> > > hope this helps you to help me.. > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > Winstone-devel mailing list > Win...@li... > https://lists.sourceforge.net/lists/listinfo/winstone-devel |