Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Problem for getServletConfig in JRun

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic