wood burning stoves 2.0*
The moose likes Servlets and the fly likes no context path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "no context path" Watch "no context path" New topic
Author

no context path

RamP
Greenhorn

Joined: Mar 28, 2002
Posts: 1
Hi
The following prg is giving " no context for
initReading " in weblogic server
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class InitReading extends HttpServlet{

Enumeration initParams;

public void init(ServletConfig config)
throws ServletException{
super.init(config);
initParams = config.getInitParameterNames();
}
public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
res.setContentType("text/html");
PrintWriter out= res.getWriter();
while(initParams.hasMoreElements()){out.println(initParams.nextElement());
}
}
}

The entries in web.xml are
<servlet>
<servlet-name>InitReading</servlet-name>
<servlet-class>InitReading</servlet-class>
<init-param>
<param-name>hh</param-name>
<param-value>oracle.jdbc.driver.OracleDriver</param-value>
</init-param>
<init-param>
<param-name>yy</param-name>
<param-value>yyvalue</param-value>
</init-param>

</servlet>
<servlet-mapping>
<servlet-name>InitReading</servlet-name>
<url-pattern>/InitReading/*</url-pattern>
</servlet-mapping>

Any help is appreciated
Ram


Ram
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
RamP,
Javaranch has a naming policy which is strictly enforced. Please read this policy and change your display name if you wish to continue posting here. Thanks.


Matthew Phillips
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: no context path
 
Similar Threads
Log4j
servlet mapping clarification
ServletContext InitParameter Problem
Something wrong with my application
problem with web.xml and the getinitParameter() func