File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WEB.Xml

 
Lucky Chawla
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I have a small doubt, If I make a new "myapp" folder in tomcat,s eebapps directory ,And the all the necessary directories are in the myapp directory according to my container,s directory structure.
Now if built a simple html and placed it in myapp directory , My question is that to run this simple html page do i have to modify my web.xml or is ti necessary that web .sml should be there with following form

web.xml:-
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

</web-app>

Thanks
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you don't need a WEB-INF directory nor a web.xml at all to run purely static content.

Having an eebapps directory isn't going to help though, unless you modify Tomcat's own configuration to look for content there.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeroen T Wenting:
you don't need a WEB-INF directory nor a web.xml at all to run purely static content.


Not true.
Tomcat won't consider your directory to be a webapp unless it sees a WEB-INF directory.

It is true that you can deploy a webapp without a web.xml file though.
It is also true that you will want one if you're writing anything more than a few trivial JSPs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic