The action parameter can handle a runtime expression, so you should be able
to build a custom value in there that includes the context path...
From: eri...@msoft.com [mailto:eri...@msoft.com]
Sent: December 6, 2000 2:48 PM
Subject: Rewriting the URL in a form:form action
I've got a system with a large number of JSPs that I'm developing
using Tomcat 3.2 and Struts 1.0 (12/4 nightly build). Because of the
large number of files, I've started organizing the them in
subdirectories. This has caused me to run into a problem, however.
There doesn't appear to be any way to cause the URL in a <form:form>
tag's "action" parameter to be rewritten using the webapp's context
path. As a result, if I use an action="x", it directs the action to
x in the current directory, which in my case isn't what I want. If I
use an action="/x", it directs the action to the x in the web server's
root directory - not the root of my webapp context, which is what I
I tried embedding <form:rewrite page="x"> inside the action= of the
<form:form>, but predictably that does not make jasper happy at all:
"Attribute has no value" - note the empty attribute name in the
Does anyone have ideas on how to make this fly, or do I simply have to
go back to a flat directory structure?