Kumar Sameer wrote: > > Can anyone please tell me where do i assign values to the > init variables which i can access using 'ServletConfig' > object in init() method. >
Run, don't walk, to the nearest computer and download a copy of the servlet spec from: http://java.sun.com/products/servlet/download.html The spec is so well written and easy to understand that some people actually read it for fun. If you've got the spec, go to SRV.13.4.1 "A Basic Example" on page 117. Look for the <init-param> entry in the <servlet> element: <web-app> <servlet> <servlet-name>catalog</servlet-name> <servlet-class> com.mycorp.CatalogServlet </servlet-class> <init-param> <param-name>catalog</param-name> <param-value>Spring</param-value> </init-param> </servlet> </web-app> That's how you set the parameters you can retrieve using ServletConfig.getInitParameter(). Note that the parameters are specific to a particular servlet. If you want a parameter that applies to all the servlets in your webapp, check out the <context-param> element. -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com ___________________________________________________________________________ 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