Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

no context path

 
RamP
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic