File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes config file setting in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "config file setting in JSP" Watch "config file setting in JSP" New topic

config file setting in JSP

Nagaseshagiri poola

Joined: Oct 18, 2003
Posts: 25
I have to set the config file and it read it through some method in jsp. iam using tomcat4.1 n eclipse 2.1 version.
%WWF_JAVA_HOME%\bin\java.exe -Dconfigs=ap/config/config.xml;util/config/config.xml;tia/config/config.xml;user/config/config.xml;user/config/context.xml -Dwwf.user.noAgents -Dwwf.user.login=%WWF_USER_LOGIN% -Djava.library.path=%WWF_BLACKWOOD_LIB% -Dmozilla.home=%WWF_MOZILLA_HOME% -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl -cp %JARS%;%LIB% %CLASS%
I used in Java so i need to implement same in JSP so that i can use the same old methods otherwise iam not able to read the config files.
cud u please tell me where to place the config files of a project.
thank you
Bill Wang
Ranch Hand

Joined: Jun 28, 2001
Posts: 31
the best place to put config file in web application is under WEB-INF directory. In your jsp or servlet, you can load the config file such as String file=getRealPath()+"/WEB-INF/xxxxyourfilename" ;

SCJP<br />SCWCD<br />SCEA Part I
I agree. Here's the link:
subject: config file setting in JSP
It's not a secret anymore!