• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with config implicit variable

Apu Shah
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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic