• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

wsjspc ant task

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to use wsjspc ant task in my ant build.xml to convert my jsp's into java code. Please take a look at the build file and also the output that shows the error message when I run it.

//build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="ITS" default="compile-jsp">

<property name="build" value="c:/AntTest/ITS_build"/>
<property name="src" value="c:/AntTest/ITS"/>
<property name="websphere.home.dir" value="C:/Program Files/IBM/Websphere Studio/Application Developer/v5.1/runtimes/express_v5"/>

<taskdef name= "wsjspc" classpath="C:/Program Files/IBM/Websphere Studio/Application Developer/v5.1/runtimes/base_v5/lib/wsanttasks.jar"

classname="com.ibm.websphere.ant.tasks.JspC" />


<target name="copyfiles">
<copy todir="${build}">
<fileset dir="${src}"/>
</copy>
</target>
<target name="replace-tokens" depends="copyfiles">
<replace dir="${build}" replacefilterfile="replace.properties"/>
</target>
<target name="compile" depends="replace-tokens">
<javac srcdir="${build}" destdir="${build}/WebContent/WEB-INF/classes"/>
</target>

<target name="make-dir">
<mkdir dir="${build}/JavaSource/temp-jsp" />
</target>

<target name="compile-jsp" depends="compile,make-dir">
<wsjspc
washome= "${websphere.home.dir}"
src = "c:/AntTest/ITS/WebContent/queues"
toDir="${build}/WebContent/WEB-INF/classes"/>

</target>
</project>

Here is the output.

//Output

C:\AntTest>ant
Buildfile: build.xml

copyfiles:

replace-tokens:

compile:
[javac] Compiling 36 source files to C:\AntTest\ITS_build\WebContent\WEB-INF
\classes

make-dir:

compile-jsp:
[wsjspc] JSPG0035E: Unable to create JasperUtil.
[wsjspc] com.ibm.etools.archive.exception.OpenFailureException: IWAE0006E Arc
hive is not a valid WAR File because the deployment descriptor can not be found
(case sensitive): WEB-INF/web.xml
[wsjspc] at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.op
enSpecificArchive(CommonarchiveFactoryImpl.java:675)
[wsjspc] at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.op
enWARFile(CommonarchiveFactoryImpl.java:716)
[wsjspc] at com.ibm.ws.webcontainer.jsp.compiler.ibmtools.JspModC.compile
Dir(JspModC.java:229)
[wsjspc] at com.ibm.ws.webcontainer.jsp.compiler.ibmtools.JspModC.compile
App(JspModC.java:95)
[wsjspc] at com.ibm.ws.webcontainer.jsp.compiler.ibmtools.JspModC.main(Js
pModC.java:336)
[wsjspc] at java.lang.reflect.Method.invoke(Native Method)
[wsjspc] at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
[wsjspc] Java Result: 1


Can anybody help me out... whats going wrong??

Thanks,
Anna.

[ January 25, 2005: Message edited by: anna pillutla ]
[ January 25, 2005: Message edited by: anna pillutla ]
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I guess you have 2 threads running

Anyway, can you tell me if "c:/AntTest/ITS/WebContent/queues" has a WEB-INF in it ?
The Websphere documentation for <wsjspc> states that


The src attribute is required and specifies the directory containing JSP files to process. This directory may be the root of a WAR file or a plain directory containing JSP files and a valid WEB-INF/web.xml file.



and your error states


[wsjspc] com.ibm.etools.archive.exception.OpenFailureException: IWAE0006E Arc
hive is not a valid WAR File because the deployment descriptor can not be found
(case sensitive): WEB-INF/web.xml



Just want to confirm the directory structure ..
 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply.


can you tell me if "c:/AntTest/ITS/WebContent/queues" has a WEB-INF in it ?




WEB-INF is in WebContent folder. And queues is also in Webcontent folder.

WebContent
|__ WEB-INF (my web.xml is here)
|__ queues

Hope this give a better picture of how the folders are placed.

Thanks again,
Anna.

[ January 26, 2005: Message edited by: anna pillutla ]
[ January 26, 2005: Message edited by: anna pillutla ]
 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


The src attribute is required and specifies the directory containing JSP files to process. This directory may be the root of a WAR file or a plain directory containing JSP files and a valid WEB-INF/web.xml file.



In the above statement it says directory should contain a valid WEB-INF/web.xml. What does that mean? What should that web.xml contain to make <wsjspc> work. Please take a look at my current web.xml and let me know if I need to change/add something to make it work.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app id="WebApp">
<display-name>ITS</display-name>
<description>Image Tracking System</description>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>queues/Login.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/isratags</taglib-uri>
<taglib-location>/WEB-INF/isratags.tld</taglib-location>
</taglib>
</web-app>


Thanks,
Anna.
 
Amber Vaidya
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just went through some more documentation on the web and found this

Websphere Batch tasks

If you scroll through to the bottom of the page, it lists the JspC Ant Task Attributes and their Batch Compiler EquivalentsJspC Ant Task Attributes and their Batch Compiler Equivalents

The src attribute of the jspc maps to the war.path of the batch compiler.
Maybe that is the reason why its looking for a valid web application and the way it verifies that is by looking for the WEB-INF/web.xml.

I could be wrong here, but that is my guess.
 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Amber for your time and reply.

Even I saw that article, actually I have been following the same in a way. Anyway, if we think that src maps to war.path. I made changes to my build.xml by first building war file then pre-compiling jsps using <wsjspc>. It gives a different message now. Please take a look at the build.xml and also the message it displays.

//build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="ITS" default="compile-jsp">

<property name="build" value="c:/AntTest/ITS_build"/>
<property name="src" value="c:/AntTest/ITS"/>
<property name="websphere.home.dir" value="C:/Program Files/IBM/Websphere Studio/Application Developer/v5.1/runtimes/base_v5"/>

<taskdef name= "wsjspc" classpath="C:/Program Files/IBM/Websphere Studio/Application Developer/v5.1/runtimes/base_v5/lib/wsanttasks.jar"

classname="com.ibm.websphere.ant.tasks.JspC" />


<target name="copyfiles">
<copy todir="${build}">
<fileset dir="${src}"/>
</copy>
</target>
<target name="replace-tokens" depends="copyfiles">
<replace dir="${build}" replacefilterfile="replace.properties"/>
</target>
<target name="compile" depends="replace-tokens">
<javac srcdir="${build}" destdir="${build}/WebContent/WEB-INF/classes"/>
</target>

<target name="make-dir">
<mkdir dir="${build}/JavaSource/temp-jsp" />
</target>

<target name="war" depends="compile,make-dir">
<war destfile="${build}/ITSWeb.war" webxml="${build}/WebContent/WEB-INF/web.xml">
<fileset dir="${build}"/>
</war>
</target>

<target name="compile-jsp" depends="war">

<wsjspc
wasHome="${websphere.home.dir}"
src = "${build}/ITSWeb.war"
toDir="${build}/JavaSource/temp-jsp">
</wsjspc>
</target>
</project>


//Message it displays when I run build.xml

C:\AntTest>ant
Buildfile: build.xml

copyfiles:
[copy] Copying 169 files to C:\AntTest\ITS_build

replace-tokens:

compile:
[javac] Compiling 36 source files to C:\AntTest\ITS_build\WebContent\WEB-INF
\classes

make-dir:
[mkdir] Created dir: C:\AntTest\ITS_build\JavaSource\temp-jsp

war:
[war] Building war: C:\AntTest\ITS_build\ITSWeb.war

compile-jsp:
src attribute must represent an existing directory.

BUILD SUCCESSFUL
Total time: 6 seconds
C:\AntTest>

Please let me know if I'm going wrong. Thanks again for your help so far.

Anna.
 
Amber Vaidya
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you run the same command again with "ant -verbose" and post the trace ?
 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have many files in my folders.. I was able to catch few statements when I did "ant -verbose". Here are the statements....

C:\AntTest>ant -verbose
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile: build.xml
Detected Java version: 1.3 in: C:\Program Files\Oracle\jre\1.3.1
Detected OS: Windows 2000
parsing buildfile C:\AntTest\build.xml with URI = file:///C:/AntTest/build.xml
Project base dir set to: C:\AntTest
Build sequence for target `ear' is [copyfiles, replace-tokens, compile, make-dir
, war, compile-jsp, ear]
Complete build sequence is [copyfiles, replace-tokens, compile, make-dir, war, c
ompile-jsp, ear, ]

copyfiles:
[copy] JavaSource\DashboardClientProperties.properties added as JavaSource/
DashboardClientProperties.properties doesn't exist.
[copy] JavaSource\com\client\BaseException.java added as JavaSource/com/cli
ent/BaseException.java doesn't exist.
[copy] JavaSource\com\client\BatchDetails.java added as JavaSource/com/clie
nt/BatchDetails.java doesn't exist.
[copy] JavaSource\com\client\ClientDatabase.java added as JavaSource/com/cl
ient/ClientDatabase.java doesn't exist.
[copy] JavaSource\com\client\DashboardResources.java added as JavaSource/co
m/client/DashboardResources.java doesn't exist.
[copy] JavaSource\com\client\DateConvert.java added as JavaSource/com/clien
t/DateConvert.java doesn't exist.
[copy] JavaSource\com\client\DocumentStatus.java added as JavaSource/com/cl
ient/DocumentStatus.java doesn't exist.
[copy] JavaSource\com\client\HistoryDetails.java added as JavaSource/com/cl
ient/HistoryDetails.java doesn't exist.
[copy] JavaSource\com\client\PolicyDetails.java added as JavaSource/com/cli
ent/PolicyDetails.java doesn't exist.
[copy] JavaSource\com\client\QueueData.java added as JavaSource/com/client/
QueueData.java doesn't exist.
[copy] JavaSource\com\client\QueueMap.java added as JavaSource/com/client/Q
ueueMap.java doesn't exist.
[copy] JavaSource\com\client\ReadClientProperties.java added as JavaSource/
com/client/ReadClientProperties.java doesn't exist.
[copy] JavaSource\com\client\ds\RoleAttributes.java added as JavaSource/com
/client/ds/RoleAttributes.java doesn't exist.
[copy] JavaSource\com\client\ds\RoleManager.java added as JavaSource/com/cl
ient/ds/RoleManager.java doesn't exist.
[copy] JavaSource\com\client\ds\UserAccount.java added as JavaSource/com/cl
ient/ds/UserAccount.java doesn't exist.
[copy] JavaSource\com\client\ds\UserAttributes.java added as JavaSource/com
/client/ds/UserAttributes.java doesn't exist.
[copy] JavaSource\com\client\ds\UserManager.java added as JavaSource/com/cl
ient/ds/UserManager.java doesn't exist.
[copy] JavaSource\com\client\security\AccessRights.java added as JavaSource
/com/client/security/AccessRights.java doesn't exist.
[copy] JavaSource\com\client\security\AccessType.java added as JavaSource/c
om/client/security/AccessType.java doesn't exist.
[copy] JavaSource\com\client\security\CRDPrivileges.java added as JavaSourc
e/com/client/security/CRDPrivileges.java doesn't exist.
[copy] JavaSource\com\client\security\ManagerPrivileges.java added as JavaS
ource/com/client/security/ManagerPrivileges.java doesn't exist.
[copy] JavaSource\com\client\security\Privilege.java added as JavaSource/co
m/client/security/Privilege.java doesn't exist.
[copy] JavaSource\com\client\security\SecurityAdminPrivileges.java added as
JavaSource/com/client/security/SecurityAdminPrivileges.java doesn't exist.
[copy] JavaSource\com\client\security\SecurityUtil.java added as JavaSource
/com/client/security/SecurityUtil.java doesn't exist.
[copy] JavaSource\com\client\security\SupervisorPrivileges.java added as Ja
vaSource/com/client/security/SupervisorPrivileges.java doesn't exist.
[copy] JavaSource\com\client\security\UserPrivileges.java added as JavaSour
ce/com/client/security/UserPrivileges.java doesn't exist.
[copy] JavaSource\com\client\session\Session.java added as JavaSource/com/c
lient/session/Session.java doesn't exist.
[copy] JavaSource\com\client\session\SessionMgr.java added as JavaSource/co
m/client/session/SessionMgr.java doesn't exist.
[copy] JavaSource\com\client\util\BaseObject.java added as JavaSource/com/c
lient/util/BaseObject.java doesn't exist.
[copy] JavaSource\com\client\util\ITSXferInventory.java added as JavaSource
/com/client/util/ITSXferInventory.java doesn't exist.
[copy] JavaSource\com\client\util\LifeCompanyInfo.java added as JavaSource/
com/client/util/LifeCompanyInfo.java doesn't exist.
[copy] JavaSource\com\client\util\LifeDocTypeInfo.java added as JavaSource/
com/client/util/LifeDocTypeInfo.java doesn't exist.
[copy] JavaSource\com\client\util\LifeQueueInfo.java added as JavaSource/co
m/client/util/LifeQueueInfo.java doesn't exist.
[copy] JavaSource\com\client\util\LifeSystemInfo.java added as JavaSource/c
om/client/util/LifeSystemInfo.java doesn't exist.
[copy] JavaSource\com\client\util\SearchData.java added as JavaSource/com/c
lient/util/SearchData.java doesn't exist.
[copy] JavaSource\com\client\util\SessionBean.java added as JavaSource/com/
client/util/SessionBean.java doesn't exist.
[copy] JavaSource\com\client\util\WIStatus.java added as JavaSource/com/cli
ent/util/WIStatus.java doesn't exist.
[copy] WebContent\META-INF\MANIFEST.MF added as WebContent/META-INF/MANIFES
T.MF doesn't exist.
[copy] WebContent\WEB-INF\classes\DashboardClientProperties.properties adde
d as WebContent/WEB-INF/classes/DashboardClientProperties.properties doesn't exi
st.
[copy] WebContent\WEB-INF\classes\com\client\BaseException.class added as W
ebContent/WEB-INF/classes/com/client/BaseException.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\BatchDetails.class added as We
bContent/WEB-INF/classes/com/client/BatchDetails.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\ClientDatabase.class added as
WebContent/WEB-INF/classes/com/client/ClientDatabase.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\DashboardResources.class added
as WebContent/WEB-INF/classes/com/client/DashboardResources.class doesn't exist
.
[copy] WebContent\WEB-INF\classes\com\client\DateConvert.class added as Web
Content/WEB-INF/classes/com/client/DateConvert.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\DocumentStatus.class added as
WebContent/WEB-INF/classes/com/client/DocumentStatus.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\HistoryDetails.class added as
WebContent/WEB-INF/classes/com/client/HistoryDetails.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\PolicyDetails.class added as W
ebContent/WEB-INF/classes/com/client/PolicyDetails.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\QueueData.class added as WebCo
ntent/WEB-INF/classes/com/client/QueueData.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\QueueMap.class added as WebCon
tent/WEB-INF/classes/com/client/QueueMap.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\ReadClientProperties.class add
ed as WebContent/WEB-INF/classes/com/client/ReadClientProperties.class doesn't e
xist.
[copy] WebContent\WEB-INF\classes\com\client\ds\RoleAttributes.class added
as WebContent/WEB-INF/classes/com/client/ds/RoleAttributes.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\ds\RoleManager.class added as
WebContent/WEB-INF/classes/com/client/ds/RoleManager.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\ds\UserAccount.class added as
WebContent/WEB-INF/classes/com/client/ds/UserAccount.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\ds\UserAttributes.class added
as WebContent/WEB-INF/classes/com/client/ds/UserAttributes.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\ds\UserManager.class added as
WebContent/WEB-INF/classes/com/client/ds/UserManager.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\security\AccessRights.class ad
ded as WebContent/WEB-INF/classes/com/client/security/AccessRights.class doesn't
exist.
[copy] WebContent\WEB-INF\classes\com\client\security\AccessType.class adde
d as WebContent/WEB-INF/classes/com/client/security/AccessType.class doesn't exi
st.
[copy] WebContent\WEB-INF\classes\com\client\security\CRDPrivileges.class a
dded as WebContent/WEB-INF/classes/com/client/security/CRDPrivileges.class doesn
't exist.
[copy] WebContent\WEB-INF\classes\com\client\security\ManagerPrivileges.cla
ss added as WebContent/WEB-INF/classes/com/client/security/ManagerPrivileges.cla
ss doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\security\Privilege.class added
as WebContent/WEB-INF/classes/com/client/security/Privilege.class doesn't exist
.
[copy] WebContent\WEB-INF\classes\com\client\security\SecurityAdminPrivileg
es.class added as WebContent/WEB-INF/classes/com/client/security/SecurityAdminPr
ivileges.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\security\SecurityUtil.class ad
ded as WebContent/WEB-INF/classes/com/client/security/SecurityUtil.class doesn't
exist.
[copy] WebContent\WEB-INF\classes\com\client\security\SupervisorPrivileges.
class added as WebContent/WEB-INF/classes/com/client/security/SupervisorPrivileg
es.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\security\UserPrivileges.class
added as WebContent/WEB-INF/classes/com/client/security/UserPrivileges.class doe
sn't exist.
[copy] WebContent\WEB-INF\classes\com\client\session\Session.class added as
WebContent/WEB-INF/classes/com/client/session/Session.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\session\SessionMgr.class added
as WebContent/WEB-INF/classes/com/client/session/SessionMgr.class doesn't exist
.
[copy] WebContent\WEB-INF\classes\com\client\util\BaseObject.class added as
WebContent/WEB-INF/classes/com/client/util/BaseObject.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\util\ITSXferInventory.class ad
ded as WebContent/WEB-INF/classes/com/client/util/ITSXferInventory.class doesn't
exist.
[copy] WebContent\WEB-INF\classes\com\client\util\LifeCompanyInfo.class add
ed as WebContent/WEB-INF/classes/com/client/util/LifeCompanyInfo.class doesn't e
xist.
[copy] WebContent\WEB-INF\classes\com\client\util\LifeDocTypeInfo.class add
ed as WebContent/WEB-INF/classes/com/client/util/LifeDocTypeInfo.class doesn't e
xist.
[copy] WebContent\WEB-INF\classes\com\client\util\LifeQueueInfo.class added
as WebContent/WEB-INF/classes/com/client/util/LifeQueueInfo.class doesn't exist
.
[copy] WebContent\WEB-INF\classes\com\client\util\LifeSystemInfo.class adde
d as WebContent/WEB-INF/classes/com/client/util/LifeSystemInfo.class doesn't exi
st.
[copy] WebContent\WEB-INF\classes\com\client\util\SearchData.class added as
WebContent/WEB-INF/classes/com/client/util/SearchData.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\util\SessionBean.class added a
s WebContent/WEB-INF/classes/com/client/util/SessionBean.class doesn't exist.
[copy] WebContent\WEB-INF\classes\com\client\util\WIStatus.class added as W
ebContent/WEB-INF/classes/com/client/util/WIStatus.class doesn't exist.
[copy] WebContent\WEB-INF\ibm-web-bnd.xmi added as WebContent/WEB-INF/ibm-w
eb-bnd.xmi doesn't exist.
[copy] WebContent\WEB-INF\ibm-web-ext.xmi added as WebContent/WEB-INF/ibm-w
eb-ext.xmi doesn't exist.
[copy] WebContent\WEB-INF\isratags.tld added as WebContent/WEB-INF/isratags
.tld doesn't exist.
[copy] WebContent\WEB-INF\web.xml added as WebContent/WEB-INF/web.xml doesn
't exist.
[copy] WebContent\errors\TryAgain.jsp added as WebContent/errors/TryAgain.j
sp doesn't exist.
[copy] WebContent\errors\loginerror.html added as WebContent/errors/loginer
ror.html doesn't exist.
[copy] WebContent\html\ITSHELPPAGE.htm added as WebContent/html/ITSHELPPAGE
.htm doesn't exist.
[copy] WebContent\html\UserHelp.htm added as WebContent/html/UserHelp.htm d
oesn't exist.
[copy] WebContent\html\outline.js added as WebContent/html/outline.js doesn
't exist.
[copy] WebContent\html\sliding_menu.js added as WebContent/html/sliding_men
u.js doesn't exist.
[copy] WebContent\images\MainHeader1.gif added as WebContent/images/MainHea
der1.gif doesn't exist.
[copy] WebContent\images\MainHeader2.gif added as WebContent/images/MainHea
der2.gif doesn't exist.
[copy] WebContent\images\MainHeader3.gif added as WebContent/images/MainHea
der3.gif doesn't exist.
[copy] WebContent\images\closed.gif added as WebContent/images/closed.gif d
oesn't exist.
[copy] WebContent\images\its-ctxt_help.gif added as WebContent/images/its-c
txt_help.gif doesn't exist.
[copy] WebContent\images\menu.gif added as WebContent/images/menu.gif doesn
't exist.
[copy] WebContent\images\opened.gif added as WebContent/images/opened.gif d
oesn't exist.
[copy] WebContent\images\spacer.gif added as WebContent/images/spacer.gif d
oesn't exist.
[copy] WebContent\images\warning3.gif added as WebContent/images/warning3.g
if doesn't exist.
[copy] WebContent\queues\ActionPerformer.jsp added as WebContent/queues/Act
ionPerformer.jsp doesn't exist.
[copy] WebContent\queues\AddRole.jsp added as WebContent/queues/AddRole.jsp
doesn't exist.
[copy] WebContent\queues\AddUser.jsp added as WebContent/queues/AddUser.jsp
doesn't exist.
[copy] WebContent\queues\AdminActionPerformer.jsp added as WebContent/queue
s/AdminActionPerformer.jsp doesn't exist.
[copy] WebContent\queues\AdminIndex.jsp added as WebContent/queues/AdminInd
ex.jsp doesn't exist.
[copy] WebContent\queues\AdminLeftFrame.jsp added as WebContent/queues/Admi
nLeftFrame.jsp doesn't exist.
[copy] WebContent\queues\AdminTopFrame.jsp added as WebContent/queues/Admin
TopFrame.jsp doesn't exist.
[copy] WebContent\queues\AdminWelComePage.jsp added as WebContent/queues/Ad
minWelComePage.jsp doesn't exist.
[copy] WebContent\queues\AnnNBStatus.jsp added as WebContent/queues/AnnNBSt
atus.jsp doesn't exist.
[copy] WebContent\queues\AnnuityConstants.jsp added as WebContent/queues/An
nuityConstants.jsp doesn't exist.
[copy] WebContent\queues\CallCtrQStatus.jsp added as WebContent/queues/Call
CtrQStatus.jsp doesn't exist.
[copy] WebContent\queues\CarmelPolBenQStatus.jspf added as WebContent/queue
s/CarmelPolBenQStatus.jspf doesn't exist.
[copy] WebContent\queues\CarmelPolChgQStatus.jsp added as WebContent/queues
/CarmelPolChgQStatus.jsp doesn't exist.
[copy] WebContent\queues\ChangePassword.jsp added as WebContent/queues/Chan
gePassword.jsp doesn't exist.
[copy] WebContent\queues\ClaimsQStatus.jsp added as WebContent/queues/Claim
sQStatus.jsp doesn't exist.
[copy] WebContent\queues\DeleteUser.jsp added as WebContent/queues/DeleteUs
er.jsp doesn't exist.
[copy] WebContent\queues\DisplayResults.jsp added as WebContent/queues/Disp
layResults.jsp doesn't exist.
[copy] WebContent\queues\DocumentTypes.jsp added as WebContent/queues/Docum
entTypes.jsp doesn't exist.
[copy] WebContent\queues\FilenetHistory.jsp added as WebContent/queues/File
netHistory.jsp doesn't exist.
[copy] WebContent\queues\FilenetPassword.jsp added as WebContent/queues/Fil
enetPassword.jsp doesn't exist.
[copy] WebContent\queues\FixAnnAdminStatus.jsp added as WebContent/queues/F
ixAnnAdminStatus.jsp doesn't exist.
[copy] WebContent\queues\ITSIndex.jsp added as



at the end are the following statements.....



[war] adding entry WebContent/WEB-INF/ibm-web-bnd.xmi
[war] adding entry WebContent/WEB-INF/ibm-web-ext.xmi
[war] adding entry WebContent/WEB-INF/isratags.tld
[war] adding entry WebContent/WEB-INF/web.xml
[war] adding directory WebContent/errors/
[war] adding entry WebContent/errors/TryAgain.jsp
[war] adding entry WebContent/errors/loginerror.html
[war] adding directory WebContent/html/
[war] adding entry WebContent/html/ITSHELPPAGE.htm
[war] adding entry WebContent/html/UserHelp.htm
[war] adding entry WebContent/html/outline.js
[war] adding entry WebContent/html/sliding_menu.js
[war] adding directory WebContent/images/
[war] adding entry WebContent/images/MainHeader1.gif
[war] adding entry WebContent/images/MainHeader2.gif
[war] adding entry WebContent/images/MainHeader3.gif
[war] adding entry WebContent/images/closed.gif
[war] adding entry WebContent/images/its-ctxt_help.gif
[war] adding entry WebContent/images/menu.gif
[war] adding entry WebContent/images/opened.gif
[war] adding entry WebContent/images/spacer.gif
[war] adding entry WebContent/images/warning3.gif
[war] adding directory WebContent/queues/
[war] adding entry WebContent/queues/ActionPerformer.jsp
[war] adding entry WebContent/queues/AddRole.jsp
[war] adding entry WebContent/queues/AddUser.jsp
[war] adding entry WebContent/queues/AdminActionPerformer.jsp
[war] adding entry WebContent/queues/AdminIndex.jsp
[war] adding entry WebContent/queues/AdminLeftFrame.jsp
[war] adding entry WebContent/queues/AdminTopFrame.jsp
[war] adding entry WebContent/queues/AdminWelComePage.jsp
[war] adding entry WebContent/queues/AnnNBStatus.jsp
[war] adding entry WebContent/queues/AnnuityConstants.jsp
[war] adding entry WebContent/queues/CallCtrQStatus.jsp
[war] adding entry WebContent/queues/Login.jsp
[war] adding entry WebContent/queues/Logout.jsp
[war] adding entry WebContent/queues/ManagerInbox.jspf
[war] adding entry WebContent/queues/ModifyRole.jsp
[war] adding entry WebContent/queues/Priorities.jspf
[war] adding entry WebContent/queues/QueueIndex.jsp
[war] adding entry WebContent/queues/QueueMenu.jsp
[war] adding entry WebContent/queues/Reasons.jsp
[war] adding entry WebContent/queues/ResetPassword.jsp
[war] adding entry WebContent/queues/RoleDetails.jsp
[war] adding entry WebContent/queues/RouteDocumentReasons.jsp
[war] adding entry WebContent/queues/Search.jsp
[war] adding entry WebContent/queues/SearchResults.jsp
[war] adding entry WebContent/queues/SecurityAdminInbox.jsp
[war] adding entry WebContent/queues/SplitFunctions.jsp
[war] adding entry WebContent/queues/StatusQueues.jsp
[war] adding entry WebContent/queues/TechAdmin.jsp
[war] adding entry WebContent/queues/TechAdminPassword.jsp
[war] adding entry WebContent/queues/UnlockUserLogin.jsp
[war] adding entry WebContent/queues/UpdateIndexInfo.jsp
[war] adding entry WebContent/queues/UpdateRole.jsp
[war] adding entry WebContent/queues/UpdateUser.jsp
[war] adding entry WebContent/queues/UserSearch.jsp
[war] adding entry WebContent/queues/WorksiteUWQStatus.jsp
[war] adding entry WebContent/queues/batchindexnavscreen.jsp
[war] adding entry WebContent/queues/batchnavscreen.jsp
[war] adding entry WebContent/queues/confirmReactivate.jsp
[war] adding entry WebContent/queues/scripts.js
[war] adding directory WEB-INF/
[war] adding entry WEB-INF/web.xml

compile-jsp:
src attribute must represent an existing directory.

BUILD SUCCESSFUL
Total time: 1 minute 13 seconds
C:\AntTest>


Thanks,
Anna.
 
Amber Vaidya
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you could try this (If it does not work , please post the ant -verbose trace):

Create your war file in a folder called "${build}/war" , so the path of the war file should be "${build}/war/ITSWeb.war".

Then to your wsjspc task, pass the name of the war directory as the source. The target will look like this



This is because the src attribute should be :


This directory may be the root
of a WAR file
or a plain directory containing JSP files and a
valid WEB-INF/web.xml file.

 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Amber,

I tried the way you specified that is creating a directory called war and placing my war file in that and pointing wsjspc src attribute to war directory. But still it displays same old message of "Unable to create JasperUtil" and "cannot find file WEB-INF/web.xml". Here is my modified build file.

//build.xml

<?xml version="1.0" encoding="UTF-8"?>
<project name="ITS" default="compile-jsp">

<property name="build" value="c:/AntTest/ITS_build"/>
<property name="src" value="c:/AntTest/ITS"/>
<property name="websphere.home.dir" value="C:/Program Files/IBM/Websphere Studio/Application Developer/v5.1/runtimes/base_v5"/>

<taskdef name= "wsjspc" classpath="C:/Program Files/IBM/Websphere Studio/Application Developer/v5.1/runtimes/base_v5/lib/wsanttasks.jar"

classname="com.ibm.websphere.ant.tasks.JspC" />


<target name="copyfiles">
<copy todir="${build}">
<fileset dir="${src}"/>
</copy>
</target>
<target name="replace-tokens" depends="copyfiles">
<replace dir="${build}" replacefilterfile="replace.properties"/>
</target>
<target name="compile" depends="replace-tokens">
<javac srcdir="${build}" destdir="${build}/WebContent/WEB-INF/classes"/>
</target>

<target name="make-dir">
<mkdir dir="${build}/JavaSource/temp-jsp" />
<mkdir dir="${build}/war" />
</target>

<target name="war" depends="compile,make-dir">
<war destfile="${build}/war/ITSWeb.war" webxml="${build}/WebContent/WEB-INF/web.xml">
<fileset dir="${build}"/>
</war>
</target>

<target name="compile-jsp" depends="war">

<wsjspc
wasHome="${websphere.home.dir}"
src = "${build}/war"
toDir="${build}/JavaSource/temp-jsp">
</wsjspc>
</target>

</project>


Here is output it displays.....


//output


C:\AntTest>ant
Buildfile: build.xml

copyfiles:

replace-tokens:

compile:
[javac] Compiling 36 source files to C:\AntTest\ITS_build\WebContent\WEB-INF
\classes

make-dir:
[mkdir] Created dir: C:\AntTest\ITS_build\war

war:
[war] Building war: C:\AntTest\ITS_build\war\ITSWeb.war

compile-jsp:
[wsjspc] JSPG0035E: Unable to create JasperUtil.
[wsjspc] com.ibm.etools.archive.exception.OpenFailureException: IWAE0006E Arc
hive is not a valid WAR File because the deployment descriptor can not be found
(case sensitive): WEB-INF/web.xml
[wsjspc] at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.op
enSpecificArchive(CommonarchiveFactoryImpl.java:675)
[wsjspc] at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.op
enWARFile(CommonarchiveFactoryImpl.java:716)
[wsjspc] at com.ibm.ws.webcontainer.jsp.compiler.ibmtools.JspModC.compile
Dir(JspModC.java:229)
[wsjspc] at com.ibm.ws.webcontainer.jsp.compiler.ibmtools.JspModC.compile
App(JspModC.java:95)
[wsjspc] at com.ibm.ws.webcontainer.jsp.compiler.ibmtools.JspModC.main(Js
pModC.java:336)
[wsjspc] at java.lang.reflect.Method.invoke(Native Method)
[wsjspc] at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
[wsjspc] Java Result: 1

BUILD SUCCESSFUL
Total time: 6 seconds
C:\AntTest>
 
Amber Vaidya
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, so that did not work

Got one more for you ..

Remove the "war" target (don't create a war file at all) and pass "${build}/WebContent" as the "src" to the <wsjspc> task.

I'm sorry that I cannot try these things cause I don't have Websphere.

P.S. Remember to post the ant -verbose trace
 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again.

No Problem..I can try if you have ideas.

Do you know by any chance..if this <wsjspc> compiles include files?

I mean suppose, there are 2 jsp's say JspA and JspB. If JspB is included in JspA. This in include with <%@ include . My question is, will <wsjspc> compiles JspB independently?

If so, if JspB using some parameters declared in JspA..will it take care of importing those from JspA or will it give us error saying cannot resolve......

My need is to be able to compile include files independantly also. Hope you understood what my requirement is. Let me know if its not clear.

Thanks,
Anna.
 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Amber,

Tried by giving ${build}/WebContent as src value to <wsjspc>. It works .

But as I said in my previous reply..its giving me errors saying "cannot resolve symbol...." of the parameters which are declared in JspA and used in JspB. I mean when <wsjspc> compiles JspB.. its giving errors.

got me?

Thanks for your help.
Anna.
[ January 27, 2005: Message edited by: anna pillutla ]
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One strategy is to name the included files (jsp fragments or more recently called segments) something.jspf instead of something.jsp so they don't get compiled independently.

see

best practice article
 
Amber Vaidya
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm .. that's interesting, naming them as jspf. Yeah that would work fine.

Or if you insist on keeping them jsps, then put the included jsps in a different folder and exclude this folder from the <wsjspc>
That would also prevent them from getting compiled independently.
 
anna pillutla
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all for your time and help.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic