re: problems with servlet init parameters tomcat 3.2.1

2001-02-05 Thread Karina Anderson

 Thanks for answering my question. My web.xml file is in Web-inf 
 directory or at the same level as my classes and lib directory. I 
 posted another message with more information. Do you see any problems?
 
 thanks a million.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: problems with servlet init parameters tomcat 3.2.1

2001-02-01 Thread Bill_Fellows/MO/americancentury



Shouldn't web.xml be in the WEB-INF directory and not below it?





[EMAIL PROTECTED] (Karina Anderson) on 02/01/2001 04:00:26 PM



Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED], [EMAIL PROTECTED] (Karina Anderson)
cc:(bcc: Bill Fellows/MO/americancentury)
Subject:  problems with servlet init parameters tomcat 3.2.1



 I have a servlet that is trying to get inititalization parameters. I
 have done all the doc says, but it doesn't get them. It gets null.
 I am using tomcat 3.2.1 and jdk1.3.

 My servlet is under

 jakarta/webapps/DashboardDIG/Web-inf/classes/package.servlet.class
 /web.xml
*snip*








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




problems with servlet init parameters tomcat 3.2.1

2001-02-01 Thread Karina Anderson

 I have a servlet that is trying to get inititalization parameters. I 
 have done all the doc says, but it doesn't get them. It gets null.
 I am using tomcat 3.2.1 and jdk1.3.
 
 My servlet is under
 
 jakarta/webapps/DashboardDIG/Web-inf/classes/package.servlet.class
 /web.xml
 
 my web.xml has the following in it:

myServlet  
package.myServlet 

 tcpip
 127.0.0.1


 port
 5
  
1
 
 

 


 
 myServlet
 
 
 /myServlet
 


 I have a context entry in the /conf/server.xml file:
  
 
 
 My servlet has the following code to get the parameters:
  public void init(ServletConfig config) throws ServletException
   {
super.init(config);
 
log ( "Initializing AppletToDigServlet..." );
 
 
 
dbrdAddr = config.getServletContext().getInitParameter("tcpip");
temp = config.getInitParameter("port");
if (dbrdAddr == null)
   {
   log("error tcpip :" + dbrdAddr);
   log("using default tcpip");
   dbrdAddr = new String("127.0.0.1");
   }
if (temp == null)
   {
   log("error port :" + temp);
   log("using default port");
   temp = new String("5");
   }
 
dbrdPort = new Integer(temp);
 
 
   }
 
 I don't get any of the parameters. Please anyone, what am I doing 
 wrong?
 
 I am calling the servlet from an applet with the following call:
   URL url = new
   URL(http://localhost:8080/DashboardDIG/servlet/package.myServlet);
 
   URLConnection con = url.openConnection();
   con.setUseCaches(false);
   con.setRequestProperty("CONTENT_TYPE","application/octect-stream");
   con.setDoInput(true);
 
 I have tried calling it with 
 http://localhost:8080/DashboardDIG/myServlet but I get 404, not found.
 http://localhost:8080/DashboardDIG/package.myServlet but I get 404.
 
 I don't think the mapping is working, and that's maybe the problem. 
 
 Please help,
 
 Karina
 
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]