Murthy,
What entries did you use in the web.xml file and what code did you use in
your servlet to retrieve the parameters.
In the web.xml inside your servlet section, you should have an entry like this
<init-param>
<param-name>
yourParamName
</param-name>
<param-value>
yourParamValue
</param-value>
</init-param>
In your servlet's init() method, you should then have code like this:
String param;
public void init(ServletConfig config) {
super.init(config);
param = config.getInitParameter("yourParamName");
if (param == null) {
param = DEFAULT_PARAM_VALUE; // this needs to be defined somewhere else.
}
Regards,
Richard
At 08:58 PM 5/10/2002 -0500, you wrote:
>Hi all,
> I am new to servlet programming.I installed tomcat server version
>4.0 on my Linux box and running the servlets.
> I am trying to initialse the values to the servlets.This is how i
>did it:
> in tomcat-dir/webapps/ROOT/WEB-INF/web.xml I set all the values
>for the initialization parameters.
> In tomcat-dir/webapps/ROOT/WEB-INF/classes I created a servlet and I
>am trying to access the initialised values.
> But for some reason it is not able to access the initialised values.I
>am even re-starting the server before I am running the servlet.
>
> Can anyone please help me in this aspect.............
>Thanks.
>--
>*****************************************************************************
>Murthy Kakarlamudi Graduate Research Assistant,ITTC
>Advisor: Dr.Perry Alexander
>
>"Every morning, I get up and look through the 'Forbes' list of the
>richest people in America. If I'm not there, I go to work"
>******************************************************************************
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html