Hi All<br>I'm trying to set initial value in a servlet.<br>i'm using tomcat3.1,or jsdk2.<br>with Tomcat you have to create an xml file and set the name of the servlet and the name and the value of the parameter.<br>but there is a default web.xml file in web-inf.<br>do i have to just put a name for a file with extension xml and put it along with the default file(web.xml?<br>or i have to move that default file(web.xml) and put it somewhere and name my file web.xml and put it at that directory(web-inf).<br>really i do not know and that what i did,but i got just null.<br>that means something wrong and the that parameter doesn't exist.<br>here is the files:<br><?xml version="1.0" encoding="ISO-8859-1"?><br><br><!DOCTYPE web-app<br> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"<br> "<A HREF=" TARGET="_new"> is the servlet file:<br><br>import javax.servlet.*;<br>import javax.servlet.http.*;<br>import java.io.*;<br><br><br>public class initPara extends HttpServlet<br>{<br><br> private String initial;<br> public void init(ServletConfig config) throws ServletException<br> {<br> super.init(config);<br> initial=config.getInitParameter("initial"
;<br><br> }<br> public void doGet(HttpServletRequest req,HttpServletResponse res)<br> throws ServletException,IOException<br> {<br> res.setContentType("text/html"
;<br> PrintWriter out=res.getWriter();<br> out.println(initial);<br><br> }<br>}<br><br>here is my url:<br><A HREF=" TARGET="_new"> for your help.