Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jspc is unable to generate web.xml

 
Swapna Sam
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We had been provided with JSPC for pre-compilation of JSP in tomcat..
But problem is I am unable to generate web.xml file with new JSP file mapping like if I give this command
jspc -webxml c:\tomcat\web-inf\pweb.xml -uriroot c:\myapp *.jsp
the above should actualy convert all JSP files in directory myapp to *.java files by giving appropriate mapping in pweb.xml file
But genrate pweb.xml is not updated with mappings in web.xml file.
Problem is as there is no mapping for this JSP and java file generated ,when client hits JSP page it is again converting jsp to java file in work directory
It would be greatful if u can let me know the steps to do this
If I explicity give mapping ,when I request for that jsp it is again compiled to java in work directory ..
But I need it to point to class file I have got after pre-compilation of JSP
It would be greatful if some one helps on this

 
Venugopal nandikolla
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Swapna,
I have tried it long time ago.It'll work ,try using the command below.You must specify the uriroot (The root directory of your input files -- jsp's).The -webxml creates web.xml(but you must use -webapp as show below).The c.jsp is my only jsp in the c:\.Hope this will help you.
jspc -uriroot c:\ -webxml c:\web.xml -webapp c:\ c.jsp

Venu
 
Swapna Sam
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Venu,
Thanks for your reply..
Now the problem for me is I am able to generate web.xml but with no contents in xml like below

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<!--
Automatically created by Tomcat JspC.
-->
<web-app>

</web-app>
Command I typed
jspc -uriroot c:\cosmo\src\webroot -webxml c:\cosmo\src\web.xml -webapp c:\src\webroot\genStatus.jsp
Previously it is used to generate java file but now it is not generating Java file for the given JSP file
Can u please let me know where I am going wrong
Thanks
SwapnaSam
Originally posted by Venugopal nandikolla:
Hi Swapna,
I have tried it long time ago.It'll work ,try using the command below.You must specify the uriroot (The root directory of your input files -- jsp's).The -webxml creates web.xml(but you must use -webapp as show below).The c.jsp is my only jsp in the c:\.Hope this will help you.
jspc -uriroot c:\ -webxml c:\web.xml -webapp c:\ c.jsp

Venu

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic