aspose file tools*
The moose likes Servlets and the fly likes jspc is unable to generate web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jspc is unable to generate web.xml " Watch "jspc is unable to generate web.xml " New topic
Author

jspc is unable to generate web.xml

Swapna Sam
Greenhorn

Joined: Jul 03, 2001
Posts: 7
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

Joined: Feb 02, 2001
Posts: 22
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

Joined: Jul 03, 2001
Posts: 7
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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jspc is unable to generate web.xml
 
Similar Threads
Class not found
pre-compilation of JSP
Problem in running JSPs on Tomcat
Problem with JspC taskdef
Deploying precompiled JSPs...