Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help to include jsp file while enunciate my REST service

 
vamshi reddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having the same problem ... you managed to solve?


tks...
 
vamshi reddy
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nope
 
Hernand Azevedo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic