Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jsp config.getInitParameter problem

36 views
Skip to first unread message

Graham

unread,
Dec 20, 2002, 7:04:20 AM12/20/02
to
Hi,

I am using WSAD 4 and am having irritating time trying to retrieve an
initialisation parameter within a jsp. I wonder if someone could
illiminate me.

JSP code for Jsp1

<%=config.getInitParameter("myInitial")%>

web.xml

<servlet>
<servlet-name>Jsp1</servlet-name>
<display-name>Jsp1</display-name>
<jsp-file>/Jsp1.jsp</jsp-file>
<init-param>
<param-name>myInitial</param-name>
<param-value>GM</param-value>
</init-param>
</servlet>

The jsp code always returns null

Thanks in advance Graham

hornmule

unread,
Dec 31, 2002, 5:04:57 PM12/31/02
to
You did not post the complete web.xml so I am guessing right now. You
are probably missing the servlet mapping for this jsp-mapped servlet.
Take a look at how default app has both a sevlet tag and a servlet
mapping tag. Then request the jsp using the name that you specify in
the servlet mapping.

Graha...@uk.royalsun.com (Graham) wrote in message news:<5649f99b.02122...@posting.google.com>...

0 new messages