Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Folder inside WEB-INF

 
karthik manick
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2985
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
karthik manick
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the relevant task from your Ant build script, where you are trying to do this.
 
karthik manick
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the webinf nested element of the war task http://ant.apache.org/manual/Tasks/war.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic