File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Need Folder inside WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Need Folder inside WEB-INF" Watch "Need Folder inside WEB-INF" New topic
Author

Need Folder inside WEB-INF

karthik manick
Ranch Hand

Joined: Aug 25, 2009
Posts: 52
I have added classes and jar folders inside my WEBINF using <classes> and <lib> tags. I want to add an addition folder inside WEB-INF as Jsp. If i add <filedir>, the Jsp folder is coming outside WEB-INFCan anyone help me on getting Jsp folder inside WEB-INF?
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2850
    
  11

Are you adding the folder to an existing war archive? If so, are you using some tool like WinZip to help you?

It might be easier to get all the files and folders on the regular file system, i.e., in a regular folder instead of a war archive. Once you've got everything arranged the way you want it you can build your war. Also, many app servers will let you deploy a folder named something.war just as if it were an archive. That's sometimes called an exploded war. I often do that in development because it makes it easier to tweak the contents, then I deploy it to production as an archive ... because that makes it harder to tweak the contents.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

karthik manick wrote:using <classes> and <lib> tags. . . . If i add <filedir>

Sounds like you are using some kind of a tool that uses and xml-style config file. Perhaps if you told us what tool you are using we might be more helpful.


JBoss In Action
karthik manick
Ranch Hand

Joined: Aug 25, 2009
Posts: 52
I am using simple ant scripts for building a war.. But i am not able to add a folder other than Classes and Lib inside WEB-INF.. Any help?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10101
    
164

Post the relevant task from your Ant build script, where you are trying to do this.

[My Blog] [JavaRanch Journal]
karthik manick
Ranch Hand

Joined: Aug 25, 2009
Posts: 52
Here is my ant code snippet for your reference

<target name = "war" depends = "compile">
<war destfile = "test.war">
<classes dir = "${servletclasses.dir}" />
<lib dir ="${lib.dir}" />
</war>

The above scripts works fine..My war has a WEB-INF with classes and jar folders.. wht shd i do if i want to add another folder for jsp?
I tried using <fileset ....><include ...></fileset> . But its adding Jsp foldr outside WEBINF.. Please help
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10101
    
164

Take a look at the webinf nested element of the war task http://ant.apache.org/manual/Tasks/war.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Folder inside WEB-INF