aspose file tools*
The moose likes Web Services and the fly likes Need Help to include jsp file while enunciate my REST service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need Help to include jsp file while enunciate my REST service" Watch "Need Help to include jsp file while enunciate my REST service" New topic
Author

Need Help to include jsp file while enunciate my REST service

vamshi reddy
Greenhorn

Joined: Aug 21, 2008
Posts: 8
I am working on Enunciate REST service, I hav a situtation to include my JSP files in generated war file..

below if my build.xml


<?xml version="1.0" ?>
<project default="declare" name="enunciat" basedir=".">
<target name="init" >
<taskdef name="enunciate" classname="org.codehaus.enunciate.main.EnunciateTask">
<classpath refid="enunciate.classpath"/>
</taskdef>
</target>
<property name="enunciate.home" value="C:/WrkSpace/TestEnunciate/RestPresentation"/>
<property name="java.home" value="C:/Program Files/Java/jdk1.6.0_23"/>
<path id="enunciate.classpath">

<fileset dir="${enunciate.home}/lib">
<include name="*.jar"/>
</fileset>
</path>

<target name="declare" depends="init">
<mkdir dir="dist"/>
<enunciate basedir="C:/WrkSpace/TestEnunciate/RestPresentation/src">
<include name="**/*.java"/>
<include name="**/*.jsp">

<classpath refid="enunciate.classpath"/>
<export artifactId="war.file" destination="dist/J2eewe.war"/>
</enunciate>
</target>

</project>

with out include jsp I can able to generate my war file, while including JSP's I am getting fallowing error..


Buildfile: C:\WrkSpace\TestEnunciate\RestPresentation\build.xml
init:
declare:

BUILD FAILED
C:\WrkSpace\TestEnunciate\RestPresentation\build.xml:31: java.lang.IllegalArgumentException: Illegal name of java source file: C:\WrkSpace\TestEnunciate\RestPresentation\src\com\locations\presentation\Welcome.jsp. (Must end with ".java")

Total time: 325 milliseconds


can any one please help me to resolve this issue, thanks in advance..

chico nanico
Greenhorn

Joined: Nov 11, 2011
Posts: 1
I'm having the same problem ... you managed to solve?


tks...
vamshi reddy
Greenhorn

Joined: Aug 21, 2008
Posts: 8
nope
Hernand Azevedo
Greenhorn

Joined: Aug 01, 2013
Posts: 1
You can use the following code in enunciate.xml according with the docs:

<webapp dir="target"
doPackage="false"
mergeWebXML="WebContent/WEB-INF/web.xml"
>

That makes only compilation,generation of the html files, merge with you web.xml file, and copying the libs and all the content to the target dir.

Then you can call another ant file that copies your other files needed to complete you war and package it.

Ant is very usefull. Try to call these 2 ant files(the enunciate build and yours) in sequence using the feature of antcalls(this can be used to call another build in your build file).

See http://ant.apache.org/manual/Tasks/antcall.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help to include jsp file while enunciate my REST service