Try removing <init-param> in 

<servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
     <init-param>
       <param-name>myParam</param-name>
       <param-value>777</param-value>
     </init-param>
 </servlet>
 
And add the following to Web.xml.

<context-param>
  <param-name>myParam</param-name>
  <param-value>7777</param-value>
</context-param>

Shing 


--- Peter Stavrinides <[EMAIL PROTECTED]>
wrote:

> In Web.xml I have defined an initialization
> parameter,
> 
> <servlet>
>     <servlet-name>IRM</servlet-name>
>    
>
<servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
>     <load-on-startup>1</load-on-startup>
>     <init-param>
>       <param-name>myParam</param-name>
>       <param-value>777</param-value>
>     </init-param>
> </servlet>
> 
> I tried to get to it with the following:
> 
>
@InjectObject("service:tapestry.globals.ServletContext")
> public abstract ServletContext getServletContext();
> 
> getServletContext().getInitParameter("myParam");
> 
> but its always null, what am I missing?
> 
> Thanks
> Peter
> 
> 
> 
> 
> 
> 
> 
> -- 
> Peter Stavrinides
> Albourne Partners (Cyprus) Ltd
> Tel: +357 22 750652 
> 
> If you are not an intended recipient of this e-mail,
> please notify the sender, delete it and do not read,
> act upon, print, disclose, copy, retain or
> redistribute it. Please visit
> http://www.albourne.com/email.html for important
> additional terms relating to this e-mail. 
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


                
___________________________________________________________ 
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy 
and free. http://uk.docs.yahoo.com/trueswitch2.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to