Hi Steve

I registered an enhancement in bugzilla months ago... to get around
this the easiest way is to subclass the tags and add some extensions.
here is an example from the form tag. the function called lookup, first
block of code deals with determining appConfig. replace it with:

if ( action.substring(0,2).equals("//") ) {
        int actionSlash = action.indexOf('/',2);
        if (actionSlash==-1)
           throw new JspException("multi-app action name is in incorrect
format");
        String app=action.substring(1,actionSlash);
        action=action.substring( action.length()-actionSlash );

        if (app.equals("/"))
           app="";

        appConfig = (ApplicationConfig)
pageContext.getServletContext().getAttribute(Action.APPLICATION_KEY+app);
        if (appConfig==null)
           throw new JspException("could not find the sub
application");
}
else
        appConfig = (ApplicationConfig)
pageContext.getRequest().getAttribute(Action.APPLICATION_KEY);


then in your form tag you can use //subapp/action.do   or even
///defaultappaction.do

this (or something like it) really needs to be applied to every tag
that uses uris in a sub-app aware way

Regards
Ian


>>> [EMAIL PROTECTED] 05/13/02 06:42pm >>>
In reading the somewhat as-yet scanty documentation about what
subapplications are, and how to use them, I was unable to find any
description of how to express in a forward that I wanted to leave one
subapplication and transition to another one (or possibly "up" to the
default one).  

Of course I could use an absolute URL, but that means that I have to
embed hard knowledge of the URL that I'm deployed at into the
struts-config.xml file.  Or, I could some up with some scriptlet that
computes this value at runtime, and use that value as the target for
the
HTML form action attribute -- again, somewhat suboptimal.

What is the correct way to express using struts a transition out of
one
subapplication and into another?

Steve

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


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

Reply via email to