You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by "DeHamer, Brian" <br...@hp.com> on 2005/06/01 00:04:56 UTC

TagUtils.computeURL() and dynamic module registration

As part of my application I have a number of custom tags that make use
of the org.apache.struts.taglib.TagUtils.computeURL() method to assist
in the rendering of URLs that are generated by my tags.  Among the
parameters that can be specified for the computeURL() method are an
action name and module name -- the resulting URI will be the
context-relative path to the specified action in the specified module.

This was working fine for me under vanilla Struts, however it doesn't
appear to work under JPF.  It appears that the problem is related to the
dynamic module registration that is used by the PageFlowActionServlet.
When the TagUtils.computeURL() method attempts to generate the URL it
checks to make sure that the named ModuleConfig object can be found in
application scope -- however, under JPF, if no request has yet been made
against that module the ModuleConfig won't exist and computeURL() fails.

Does JPF provide something similar to the TagUtils.computeURL() method
that will work for me?  If not, is there some way to force all the
modules to be loaded at start time?  Any suggestions/work-arounds are
welcome.  Thanks.

Brian DeHamer
Hewlett-Packard Co.

Re: TagUtils.computeURL() and dynamic module registration

Posted by Carlin Rogers <cr...@bea.com>.
Hi Brian,

Yes, The org.apache.beehive.netui.pageflow.PageFlowUtils class has
a method that I think you're looking for.

     getRewrittenActionURI()

http://incubator.apache.org/beehive/apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/PageFlowUtils.html

Hope this helps,
Carlin

DeHamer, Brian wrote:

> As part of my application I have a number of custom tags that make use
> of the org.apache.struts.taglib.TagUtils.computeURL() method to assist
> in the rendering of URLs that are generated by my tags.  Among the
> parameters that can be specified for the computeURL() method are an
> action name and module name -- the resulting URI will be the
> context-relative path to the specified action in the specified module.
> 
> This was working fine for me under vanilla Struts, however it doesn't
> appear to work under JPF.  It appears that the problem is related to the
> dynamic module registration that is used by the PageFlowActionServlet.
> When the TagUtils.computeURL() method attempts to generate the URL it
> checks to make sure that the named ModuleConfig object can be found in
> application scope -- however, under JPF, if no request has yet been made
> against that module the ModuleConfig won't exist and computeURL() fails.
> 
> Does JPF provide something similar to the TagUtils.computeURL() method
> that will work for me?  If not, is there some way to force all the
> modules to be loaded at start time?  Any suggestions/work-arounds are
> welcome.  Thanks.
> 
> Brian DeHamer
> Hewlett-Packard Co.
>