getInitParameter null in custom tag test

davids_k <[email protected]> Thu, 16 Aug 2007 09:48:13 -0700 (PDT)
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <[email protected]>
Hi,
I try to set init parameter in custom tag test. However, in the custom tag
class, I get null from getInitParameter.

Here is the example:

In test class:
    public void setUp(){
    	tag=new HelloWorldTag();
    	config.setInitParameter("initTest", "Test Init");
    	tag.setPageContext(this.pageContext);
     }

In HelloWorldTag class:

    public int doStartTag(){
         String
initTest=this.pageContext.getServletContext().getInitParameter("initTest");
         System.out.println(initTest); //This is null.
   }

Any help is greatly appreciated.

David

-- 
View this message in context: http://www.nabble.com/getInitParameter-null-in-custom-tag-test-tf4280792.html#a12185070
Sent from the Cactus - User mailing list archive at Nabble.com.