• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

J2EE Web Application Questions  RSS feed

Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All!
Let me first explain what is a structure of our J2EE Web Application:
We have WAR file with following structure:
/web/jsp - All JSP files
/EU - End User JSP pages
/SA - System Administrator JSP pages
web.xml - Deployment descriptor
/classes - servlet + additional classes
/lib - all third-party libraries
/taglib - TLD files
Configuration files located outside of WAR file.
Application server is Tomcat 4.0.4.
Here are questions:
Question #1: How to point servlet to read configuration files from a relative path. As I mentioned we have configuration files outside of WAR file, so in our web.xml we have section for servlet which contains:
It's not a problem to read config file if you have an absolute path, however when I try to put relative path (such as ../../conf/config_name), it doesn't behave properly. From my search I found that the user directory is C:\WinNT\System32.
Is anyone had this kind of problem and how you solve it.

Question #2: Rigth now we're running our application from open (non WAR) mode. We've created in server.xml (Tomcat configuration file) 3 entries:
1st - points to core servlet;
2nd - points to System Administrator's entry page (JSP file);
3rd - points to End User's entry page (JSP file).
If we pack everything in WAR file, the is no problem to create 1st entry since we have web.xml which tells to application service what is name and class for servlet. Problems arise with 2nd and 3rd entry. How can we point to EU and SA JSP pages that located in WAR file?
Any comments/ideas will be appreciated.
Thank you in advance.
Alex Givant.
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for question 1,
the user directory is depends on from where the tomcat starts, if your tomcat starts from
d:\tomcat...\bin then the user directory is d:\tomcat..\bin or if this is started as a part of windows services then user directory is
you can try the following
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!