You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by li...@apache.org on 2007/10/08 20:49:08 UTC

svn commit: r582930 - in /geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper: ./ META-INF/ src/ src/org/ src/org/apache/ src/org/apache/geronimo/ src/org/apache/geronimo/devtools/ src/org/apache/geronimo/devtools/j2g/ src/org/a...

Author: linsun
Date: Mon Oct  8 11:49:07 2007
New Revision: 582930

URL: http://svn.apache.org/viewvc?rev=582930&view=rev
Log:
update the jasper plugin for GERONIMODEVTOOLS-221

Added:
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.classpath   (with props)
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.project   (with props)
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/META-INF/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/META-INF/MANIFEST.MF
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/build.properties   (with props)
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/plugin.xml   (with props)
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/pom.xml   (with props)
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/jasper/
    geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/jasper/JspCompiler.java   (with props)

Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.classpath
URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.classpath?rev=582930&view=auto
==============================================================================
--- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.classpath (added)
+++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.classpath Mon Oct  8 11:49:07 2007
@@ -0,0 +1,21 @@
+<classpath>
+  <classpathentry kind="src" path="." including="plugin.xml" excluding="**/*.java"/>
+  <classpathentry kind="src" path="lib" including="*.jar" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-jsp_2.0_spec/1.1/geronimo-jsp_2.0_spec-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler/5.5.15/jasper-compiler-5.5.15.jar"/>
+  <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.12/log4j-1.2.12.jar"/>
+  <classpathentry kind="var" path="M2_REPO/tomcat/jasper-runtime/5.5.15/jasper-runtime-5.5.15.jar"/>
+  <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar"/>
+  <classpathentry kind="var" path="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler-jdt/5.5.15/jasper-compiler-jdt-5.5.15.jar"/>
+  <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
+  <classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar"/>
+  <classpathentry kind="src" path="/org.apache.geronimo.devtools.j2g.common"/>
+  <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-servlet_2.4_spec/1.1.1/geronimo-servlet_2.4_spec-1.1.1.jar"/>
+</classpath>
\ No newline at end of file

Propchange: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.classpath
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.project
URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.project?rev=582930&view=auto
==============================================================================
--- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.project (added)
+++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.project Mon Oct  8 11:49:07 2007
@@ -0,0 +1,31 @@
+<projectDescription>
+  <name>org.apache.geronimo.devtools.j2g.jasper</name>
+  <comment>JBoss to Geronimo Conversion Tool</comment>
+  <projects>
+    <project>org.apache.geronimo.devtools.j2g.common</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.ManifestBuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.pde.SchemaBuilder</name>
+    </buildCommand>
+    <buildCommand>
+      <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+      <arguments>
+        <dictionary>
+          <key>LaunchConfigHandle</key>
+          <value>&lt;project&gt;/.externalToolBuilders/Maven_Ant_Builder.launch</value>
+        </dictionary>
+      </arguments>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.pde.PluginNature</nature>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Propchange: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/.project
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/META-INF/MANIFEST.MF?rev=582930&view=auto
==============================================================================
--- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/META-INF/MANIFEST.MF (added)
+++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/META-INF/MANIFEST.MF Mon Oct  8 11:49:07 2007
@@ -0,0 +1,57 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: J2G Jasper Plug-in
+Bundle-SymbolicName: org.apache.geronimo.devtools.j2g.jasper;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: Apache.org
+Bundle-ClassPath: .,
+ lib/commons-el-1.0.jar,
+ lib/commons-logging-1.1.jar,
+ lib/geronimo-jsp_2.0_spec-1.1.jar,
+ lib/geronimo-servlet_2.4_spec-1.1.1.jar,
+ lib/jasper-compiler-5.5.15.jar,
+ lib/jasper-compiler-jdt-5.5.15.jar,
+ lib/jasper-runtime-5.5.15.jar
+Require-Bundle: org.apache.ant,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.apache.geronimo.devtools.j2g.common
+Export-Package: javax.servlet,
+ javax.servlet.http,
+ javax.servlet.jsp,
+ javax.servlet.jsp.el,
+ javax.servlet.jsp.resources,
+ javax.servlet.jsp.tagext,
+ javax.servlet.resources,
+ org.apache.commons.el,
+ org.apache.commons.el.parser,
+ org.apache.commons.logging,
+ org.apache.commons.logging.impl,
+ org.apache.geronimo.devtools.j2g.jasper,
+ org.apache.jasper,
+ org.apache.jasper.compiler,
+ org.apache.jasper.compiler.tagplugin,
+ org.apache.jasper.resources,
+ org.apache.jasper.runtime,
+ org.apache.jasper.security,
+ org.apache.jasper.servlet,
+ org.apache.jasper.tagplugins.jstl,
+ org.apache.jasper.tagplugins.jstl.core,
+ org.apache.jasper.util,
+ org.apache.jasper.xmlparser,
+ org.eclipse.jdt.core.compiler,
+ org.eclipse.jdt.internal.compiler,
+ org.eclipse.jdt.internal.compiler.ast,
+ org.eclipse.jdt.internal.compiler.batch,
+ org.eclipse.jdt.internal.compiler.classfmt,
+ org.eclipse.jdt.internal.compiler.codegen,
+ org.eclipse.jdt.internal.compiler.env,
+ org.eclipse.jdt.internal.compiler.flow,
+ org.eclipse.jdt.internal.compiler.impl,
+ org.eclipse.jdt.internal.compiler.lookup,
+ org.eclipse.jdt.internal.compiler.parser,
+ org.eclipse.jdt.internal.compiler.parser.diagnose,
+ org.eclipse.jdt.internal.compiler.problem,
+ org.eclipse.jdt.internal.compiler.util,
+ org.eclipse.jdt.internal.core.util

Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/build.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/build.properties?rev=582930&view=auto
==============================================================================
--- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/build.properties (added)
+++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/build.properties Mon Oct  8 11:49:07 2007
@@ -0,0 +1,33 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+ source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               lib/commons-el.jar,\
+               lib/commons-logging-1.1.jar,\
+               lib/jasper-compiler.jar,\
+               lib/jasper-runtime.jar,\
+               lib/jsp-api.jar,\
+               lib/servlet-api.jar,\
+               lib/jasper-compiler-jdt.jar,\
+               lib/commons-el-1.0.jar,\
+               lib/geronimo-jsp_2.0_spec-1.1.jar,\
+               lib/geronimo-servlet_2.4_spec-1.1.1.jar,\
+               lib/jasper-compiler-5.5.15.jar,\
+               lib/jasper-compiler-jdt-5.5.15.jar,\
+               lib/jasper-runtime-5.5.15.jar

Propchange: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/build.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/plugin.xml?rev=582930&view=auto
==============================================================================
--- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/plugin.xml (added)
+++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/plugin.xml Mon Oct  8 11:49:07 2007
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<plugin>
+</plugin>
\ No newline at end of file

Propchange: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/plugin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/pom.xml?rev=582930&view=auto
==============================================================================
--- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/pom.xml (added)
+++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/pom.xml Mon Oct  8 11:49:07 2007
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~    http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<!-- $Rev: 561821 $ $Date: 2007-08-01 11:05:12 -0400 (Wed, 01 Aug 2007) $ -->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.geronimo.devtools.j2g</groupId>
+        <artifactId>plugins</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+        
+    <artifactId>org.apache.geronimo.devtools.j2g.jasper</artifactId>
+    <packaging>jar</packaging>
+    <name>${artifactId}</name>
+    <build>
+        <resources>
+            <resource>
+                <directory>.</directory>
+                <includes>
+                    <include>plugin.xml</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>lib</directory>
+                <targetPath>lib</targetPath>
+                <includes>
+                    <include>*.jar</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>commons-el</groupId>
+                                    <artifactId>commons-el</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>commons-logging</groupId>
+                                    <artifactId>commons-logging</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>tomcat</groupId>
+                                    <artifactId>jasper-compiler-jdt</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>tomcat</groupId>
+                                    <artifactId>jasper-compiler</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>tomcat</groupId>
+                                    <artifactId>jasper-runtime</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.geronimo.specs</groupId>
+                                    <artifactId>geronimo-jsp_2.0_spec</artifactId>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.geronimo.specs</groupId>
+                                    <artifactId>geronimo-servlet_2.4_spec</artifactId>
+                                </artifactItem>
+                            </artifactItems>
+                            <outputDirectory>lib</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.geronimo.devtools</groupId>
+                <artifactId>maven-eclipsepde-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>commons-el</groupId>
+            <artifactId>commons-el</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>tomcat</groupId>
+            <artifactId>jasper-compiler-jdt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>tomcat</groupId>
+            <artifactId>jasper-compiler</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>tomcat</groupId>
+            <artifactId>jasper-runtime</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jsp_2.0_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.4_spec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.devtools.j2g</groupId>
+            <artifactId>org.apache.geronimo.devtools.j2g.common</artifactId>
+            <version>${version}</version>
+        </dependency>
+    </dependencies>
+</project>

Propchange: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/jasper/JspCompiler.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/jasper/JspCompiler.java?rev=582930&view=auto
==============================================================================
--- geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/jasper/JspCompiler.java (added)
+++ geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/jasper/JspCompiler.java Mon Oct  8 11:49:07 2007
@@ -0,0 +1,101 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.devtools.j2g.jasper;
+
+import java.io.File;
+import java.io.FileFilter;
+
+import org.apache.geronimo.devtools.j2g.common.FatalToolException;
+import org.apache.geronimo.devtools.j2g.common.Tool;
+import org.apache.jasper.JasperException;
+import org.apache.jasper.JspC;
+
+
+/**
+ * Compiles jsp sources to java sources.
+ */
+public class JspCompiler {
+	
+	/** Jasper compiler */
+	private JspC jspCompiler;
+	
+	/** File filter for jsp files */
+	private FileFilter jspFilesFilter;
+	
+	/** Compiler constructor. */
+	public JspCompiler(FileFilter jspFilesFilter){
+		jspCompiler = new JspC();
+		jspCompiler.setCompile(false);
+		jspCompiler.setVerbose(0);
+		this.jspFilesFilter = jspFilesFilter;
+	}
+	
+	/**
+	 * Gets jasper default encoding.
+	 * @return jasper encoding.
+	 */
+	public String getEncoding(){
+		return jspCompiler.getJavaEncoding();
+	}
+	
+	/**
+	 * Compiles jsp sources to java sources and saves its into outputDir.
+	 * @param classPath classpath for compilation.
+	 * @param outputDir output directory.
+	 * @param uriRoot full path to directory with web content.
+	 * @throws FatalToolException if any problems occurs.
+	 */
+	public void compileJsp(String classPath, String outputDir, String uriRoot) throws FatalToolException{
+		jspCompiler.setClassPath(classPath);
+		jspCompiler.setOutputDir(outputDir);
+		jspCompiler.setUriroot(uriRoot);
+		File webSource = new File(uriRoot);
+		searchJspFiles("", webSource);
+		try {
+			jspCompiler.setCompile(false);
+			jspCompiler.execute();
+		} catch (JasperException ex) {
+			Tool.getCurrent().getOutput().fatal(JspCompiler.class.getSimpleName(), "Jasper error: " + ex.getMessage());
+			throw new FatalToolException("Cannot compile jsp sources: " + webSource.getAbsolutePath(), ex);
+		}
+	}
+
+	/**
+	 * Recursively adds jsp files to the jsp compiler relative to the root.
+	 * @param base relative path.
+	 * @param file directory.
+	 * @throws FatalToolException if file is not a web directory.
+	 */
+	private void searchJspFiles(String base, File file) throws FatalToolException {
+		if (file.isDirectory()) {
+			File[] fileList = file.listFiles(jspFilesFilter);
+			if (base.equals(""))
+				base = ".";
+			for (int i = 0; i < fileList.length; i++) {
+				if (fileList[i].isDirectory()) {
+					searchJspFiles(base + File.separator + fileList[i].getName(), fileList[i]);
+				}
+				else {
+					jspCompiler.setJspFiles(base + File.separator + fileList[i].getName());
+				}
+			}
+		}
+		else {
+			throw new FatalToolException("Incorrect parameter: " + file.getAbsolutePath() + "; Please provide Web directories only.");
+		}
+	}
+}

Propchange: geronimo/devtools/j2g/trunk/plugins/org.apache.geronimo.devtools.j2g.jasper/src/org/apache/geronimo/devtools/j2g/jasper/JspCompiler.java
------------------------------------------------------------------------------
    svn:eol-style = native