Hi
You must use the jspc plugin in conjunction with the maven-war-plugin. The maven-war-plugin must have its *webXml* configuration parameter set to the newly created web.xml, which is $basedir/target/jspweb.xml by default. See the following example configuration in the link : http://mojo.codehaus.org/jspc-maven-plugin/usage.html Also try to add the following dependencies to your POM: <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> </dependency> Thanks Saritha S.V On 11/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > hi, > > i have a difficult problem with precompiling jsp with jspc-maven-plugin > (v1.4.6) > > i get this error: > [INFO] [jspc:compile {execution: jspc}] > java.lang.NumberFormatException: For input string: "${count}" > java.lang.NumberFormatException.forInputString(NumberFormatException.java > :48) > at java.lang.Integer.parseInt(Integer.java:447) > at java.lang.Integer.valueOf(Integer.java:553) > [...] > > > this is my jspc pom snippet > > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>jspc-maven-plugin</artifactId> > <configuration> > <source>1.5</source> > <target>1.5</target> > <javaEncoding>UTF-8</javaEncoding> > </configuration> > <executions> > <execution> > <id>jspc</id> > <goals> > > <goal>compile</goal> > </goals> > </execution> > </executions> > </plugin> > [...] > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>servlet-api</artifactId> > <version>2.5</version> > </dependency> > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>jstl</artifactId> > <version>1.1.2</version> > </dependency> > <dependency> > <groupId>taglibs</groupId> > <artifactId>standard</artifactId> > <version>1.1.2</version> > </dependency> > > this is my jsp file > > <?xml version="1.0" encoding="UTF-8" ?> > <jsp:root xmlns="http://www.w3.org/1999/xhtml" > xmlns:jsp="http://java.sun.com/JSP/Page" > xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.0"> > > <jsp:directive.page contentType="text/html;charset=utf-8" /> > > <c:forEach var="i" begin="1" end="${count}"> > <c:out value="${i}" /> > </c:forEach> > > </jsp:root> > > To track down the error i created a second project with this pom.xml > (complete) and just this jsp file in src/main/webapp and a minimal web.xml > and everything works even without > > <?xml version="1.0" encoding="UTF-8"?> > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>jspc</groupId> > <artifactId>jspc</artifactId> > <packaging>war</packaging> > <version>0.0.1</version> > <description></description> > <build> > <plugins> > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>jspc-maven-plugin</artifactId> > <executions> > <execution> > <id>jspc</id> > <goals> > > <goal>compile</goal> > </goals> > </execution> > </executions> > </plugin> > </plugins> > </build> > </project> > > if i add dependencies to this pom it doesnt work anymore: > > <dependencies> > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>servlet-api</artifactId> > <version>2.5</version> > </dependency> > <dependency> > <groupId>javax.servlet</groupId> > <artifactId>jstl</artifactId> > <version>1.1.2</version> > </dependency> > <dependency> > <groupId>taglibs</groupId> > <artifactId>standard</artifactId> > <version>1.1.2</version> > </dependency> > </dependencies> > > i guess my understanding of jspc is entirly wrong. Can someone help me > explaining what went wrong and how to fix it? > > kind regards, > janning > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
