Hi,
I'm using the following snippet in taglib code but it fails as config==null. (Stuts 1.1 b3)
public int doEndTag() throws JspException {
<snip>
ModuleConfig config = (ModuleConfig) pageContext.getRequest()
.getAttribute(org.apache.struts.Globals.MODULE_KEY);
if (config == null) {
System.out.println("config == null");
}
if (config.getPrefix() == null) {
System.out.println("config.getPrefix() == null");
}
try {
pageContext.forward(config.getPrefix() + page);
} catch (Exception e) {
throw new JspException(e.toString());
}
return (SKIP_PAGE);
}
The code is based on the example that comes with struts. I presume I'm missing something obvious but I'm new to Struts and can't track it down.
Could someone give me some pointers before I tear all my hair out ;-)
Regards
/James
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- RE: Obtaining valid ModuleConfig. James Nord
- RE: Obtaining valid ModuleConfig. Jörg Maurer
- RE: Obtaining valid ModuleConfig. Zheng, Gang
- Re: Obtaining valid ModuleConfig. Andrew Kuzmin