This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Init Parameter value return null.  RSS feed

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In tomcat4.1, I try to set a parameter in conf/server.xml so i can get it back from jsp page. In my jsp page, I always get a null string for the parameter i set in server.xml. I search through all document to verify my server.xml. I hit dead end. Hope someone will shine some light. This is the context in my server.xml.
*************************************
<Context path="/pw" docBase="pw" debug="0"
reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_pw_log." suffix=".txt"
timestamp="true"/>
<Environment name="maxExemptions" type="java.lang.Integer"
value="15"/>
<Parameter name="DEBUG" value="1" override="false"/>
</Context>
********************************************
THis is my jsp page under webapps/pw/check.jsp
*******************************************
<Html>
<head>
<title>Check Attribute</title>
</head>
<body>
<%@ page import="java.io.*" %>
<%@ page import="javax.servlet.*" %>
<%
ServletContext sc = getServletContext();
String creator = (String)sc.getAttribute("DEBUG");
System.out.println(creator);
%>
HH<%=creator%>YY
</body>
</html>
*******************************************
The page and log file show "null"
 
Something must be done about this. Let's start by reading this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!