Hi thanks for the reply.

I am using jboss app. server. And using ant 1.5.1. Below I am adding web.xml and build.xml pl. have a look at them.
I manually added serverlet-mapping entry in web.xml. But I came to know that in jspc tag we have an attribute which automatically adds mapping. I checked in doc. but did not find any attribute as such.
Can you please help


On Thu, 05 Dec 2002 "Schulte-Döinghaus, Meinolf, NMG-ME" wrote :
Hi,
I've done jsp precompilng for weblogic by using
the java tag. Maybe it helps:



<!-- ######################## -->
<!-- Compile JSPs -->
<!-- ######################## -->
<target name="jspc" depends="init,copyprops,compile,test,copyconfig">
<java
fork="yes"
classpath="${classpath}${path.separator}${classpath.compile}"
classname="weblogic.jspc" >
<arg line="-d ${classes} -webapp ${web} -compileAll -keepgenerated
-O"/>
</java>
</target>


webapp is the "document root path where to find the jsps

Best
Meinolf




-----Ursprüngliche Nachricht-----
Von: Shankar [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 5. Dezember 2002 12:41
An: [EMAIL PROTECTED]
Betreff: using jspc tag

Hi friends,

Can any one please give me an example how to use jspc and
precomile jsps. And how to give mapping from the resulting
compiled servlets into the proper jsp in web.xml.

Thankx






--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



<project name="MyProject" default="copy" basedir=".">
	<!-- set global properties for this build -->
    <property name="src" value="../src/java"/>
    <property name="class" value="../build/WEB-INF/classes"/>
    <property name="jars" value="../WEB-INF/lib"/>
    <property name="build" value="../build"/>
    <property name="dist"  value="dist"/>
    <property name="html"  value="../html"/>
    <property name="WEB-INF"  value="../WEB-INF"/>
    <property name="jsp"  value="../jsp"/>		
    <target name="init">
		<!-- Creating Directories -->
		<mkdir dir="${build}/html"/>
		<mkdir dir="${build}/WEB-INF"/>
		<mkdir dir="${build}/jsp"/>
		<mkdir dir="${dist}/lib"/>
		<!-- Copying a directory to another directory  -->
		<copy todir="${build}/html">
			<fileset dir="${html}"/>   
		</copy>
		<copy todir="${build}/WEB-INF">
			<fileset dir="${WEB-INF}"/>    
		</copy>
		<copy todir="${build}/jsp">
			<fileset dir="${jsp}"/>
		</copy>
    </target>
    <target name="compile" depends="init">
		<!-- Compile the java code from ${src} into ${build} -->
		<jspc destdir="${src}" srcdir="${jsp}" verbose="9">	</jspc>
		<!-- Compile the java code from ${src} into ${build} -->
		<javac srcdir="${src}" destdir="${class}">
			 <classpath>
				<pathelement path="${class};${jars}/struts.jar;"/>
			 </classpath>
		</javac>
    </target>
	<target name="dist" depends="compile">
        <!-- Put everything in ${build} into the testjspsc.war file -->
        <jar jarfile="${dist}/lib/testjspc.war" basedir="${build}"/>
    </target>
    <target name="copy" depends="dist">
         <copy file="${dist}/lib/testjspc.war" todir="f:\jboss-3.0.4_tomcat-4.0.6\server\default\deploy"/>
    </target>
    <target name="clean" depends="copy">
	<!--
         <Delete the ${build} and ${dist} directory trees>
         <delete dir="${build}"/>
         <delete dir="${dist}"/> 
	 -->
    </target>
</project>
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"     "http://java.sun.com/dtd/web-app_2_3.dtd";>
    
<web-app>
<servlet>
    <servlet-name>Home</servlet-name>
    <servlet-class>Home</servlet-class>
</servlet>
<servlet-mapping>
	<servlet-name>Home</servlet-name>
	<url-pattern>/jsp/Home.jsp</url-pattern>
</servlet-mapping>
</web-app>
--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to