tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john S <email2jo...@gmail.com>
Subject Re: Problem Reading Property files
Date Tue, 26 May 2009 18:07:51 GMT
Thanks for your response.

Actually, I am not sure where to place and configure the property
files (*SERVLET
ARGS*) in tomcat.

The problem is-> In the iPlanet webserver they configured the servlet
configurations in this way:

*Servlet Name: *
* Servlet Code (class name): *
*         Servlet Classpath: *
*              Servlet Args: loan=/opt/mywebapp/config,
loan.props=abc.props,  loan.log=abc.log*

CONFIG IS DIRECTORY AND IN WHICH *ABC.PROPS* AND *ABC.LOG* ARE PRESENT.


While migrating them to Tomcat 6, I need to configure the *SERVLET ARGS in
the tomcat.*

The think is all the security setting and database handlers are present in
the property files itself.


For eg : In my web application wen I click the login button in
login.html .it needs to read the configuration files (abc.props and
abc.logs) and redirects to index.html.

*Can you help me where to place these servlet arg in the web.xml or
somewhere else.,so that its going to read them.?*
**



On Tue, May 26, 2009 at 1:26 PM, Juha Laiho <Juha.Laiho@iki.fi> wrote:

>  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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message