At 10:36 AM -0600 3/8/06, Greg Reddin wrote:
On Mar 8, 2006, at 7:14 AM, vinicius wrote:
My forward and action:
<forward
name="institucional"
path="/Institucional.do"/>
<action
path="/Institucional"
forward=".teste"/>
....
my tiles.defs.xml
<definition name=".teste" extends="Layout">
<put name="body" value="/tiles/teste.jsp" />
</definition>
Does it work to specify a Tiles Forward that begins with a "." or
will it try to find a relative URL? That looks a bit strange to me
and I'm not sure if I'd expect it to work. I'd try using a name
like teste.tiles in your forward and tiles def.
My team uses use the ".x.y" naming convention for Tiles universally
so that they are easily visually distinguished -- they are definitely
legal.
What happens is that the Tiles RequestProcessor tries to look up the
tiles def name (a pure literal string match) and if it finds it, it
changes the operative ActionForward to one whose path is the base
path of the tiles definition. Then, control resumes as if Tiles were
not being used and processForward tries to use
RequestDispatcher.forward(req,resp) using the path in the
ActionForward. (or in Struts 1.3, the PerformForward command
executes.)
Which is a long way of saying that a tiles definition can be any
string, but if you get an IllegalArgumentException "Path XXX does not
start with a "/" character", the reason is that Tiles was not able to
replace the ActionForward whose path was a tiles definition with one
whose path is acceptable to ServletContext.getRequestDispatcher()
Joe
--
Joe Germuska
[EMAIL PROTECTED] * http://blog.germuska.com
"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed. Try something new."
-- Robert Moog
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]