tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juha Laiho <Juha.La...@iki.fi>
Subject Re: Problem Reading Property files
Date Tue, 26 May 2009 17:26:56 GMT
john S wrote:
>           I am planning to migrate my web application from iplanet 4.1 to
> tomcat 6. In this process I need to read the properties files initially.
> 
> for eg: i got the property files in a *iPlanet*:
>                                                                *Config
> directory*---
> 
> *abc.properties.---*
> *
> 
>                    abc.log--
> *
> 
> In *tomcat* I configured them in *web.xml* saying that.
> 
> 
> <servlet>
>   <servlet-name>ABC</servlet-name>
>   <servlet-class>com.ijk.abc</servlet-class>
>   <init-param>
>    <param-name>Loan</param-name>
> *   <param-value>/WEB-INF/config</param-value>*
>   </init-param>
>   <init-param>
>    <param-name>loan.props</param-name>
>   * <param-value>/WEB-INF/config/abc.props</param-value>*
>   </init-param>
>   <init-param>
>    <param-name>loan.log</param-name>
>  *  <param-value>/WEB-INF/config/abc.log</param-value>*
>   </init-param>
>   <load-on-startup>1</load-on-startup>
>   </servlet>
>   <servlet-mapping>
>   <servlet-name>ABC</servlet-name>
>   <url-pattern>/</url-pattern>
>   </servlet-mapping>
> 
> 
> I need to read initially all the property files and then proceed.
> While configuring in this way, it am getting error saying that
> * abc.props or abc.log..............(FILE NOT FOUND EXCEPTION)*

You're missing some data form your question.

The above web.xml snipper tells me that you're set a bunch
of servlet init parameter variables to their corresponding
values.

What you're not telling is:
- how you're reading the parameter values in your applications
  (code)
- what you're doing to the values after you've read them
  (code)
- how you're attempting to access the actual files
  (code)
- where the files are located respective to your web-app
  set-up (I can guess based on the web.xml snippet, but just
  want to make sure)

Or in other words, you're missing a SSCCE (http://www.sscce.org/).
-- 
..Juha

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message