• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

problem with config implicit variable

Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple jsp file which is supposed to print the servlet name and a parameter name when accessed form the config variable. I am using tomcat4.1.

My Jsp file is as follows :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ page info="a hello world example" %>
<%@ page language="java" %>
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<%@ page pageEncoding="ISO-8859-1" %>
<%@ page session="true" %>
<%@ page errorPage="null" %>
<%@ page isErrorPage="false" %>
<%@ page isThreadSafe="false" %>
<%@ page buffer="32kb" autoFlush="true" %>
<%@ page import="java.io.*" %>

<head><title> *** Hello, World ***</title></head>

<td><%=config.getServletName()%> </td>


and my web.xml is as follows:
<jsp-file>/test.jsp </jsp-file>

<param-value>Learning JSP</param-value>


- I am expecting the result to be
config Example1 Learning JSP

- but the actual response I get is :
config jsp null

does any one know why this is happening?

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!