wood burning stoves 2.0*
The moose likes JSP and the fly likes Problem for getServletConfig in JRun Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem for getServletConfig in JRun" Watch "Problem for getServletConfig in JRun" New topic
Author

Problem for getServletConfig in JRun

Donald Fung
Greenhorn

Joined: Oct 27, 2004
Posts: 18
Hi,

My company has bought JRUN4.0 and migrate some JSP from tomcat to it. However, I get problem when run the web.
I hope someone can help me.
I had some values (context parameter) in the web.xml and want to get them from the JSP. However, the JSP can't get the value.
The Jrun shows that can't find the method and the system can't retrieve the value of SESSION_N with return null. I can get the value in tomcat but not JRun. What's the problem?

Thanks.

In JSP,
<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.util.*,java.text.*,java.io.*, profile.userObject.*"%>
<%
String session_n = getServletConfig().getInitParameter("SESSION_N");
UsrLoginObject usrInfo = (UsrLoginObject)session.getAttribute(session_n);
%>

In web.xml,
<context-param>
<param-name>SESSION_N</param-name>
<param-value>LoginInfo</param-value>
</context-param>
[ February 01, 2005: Message edited by: Donald Fung ]
 
 
subject: Problem for getServletConfig in JRun
 
Similar Threads
getInitParamter(String)
JSP turning into Servlet
Unable to fetch config parameter in jsp
Servlets and ServletConfig problem
JSP Initialization Parameters