Thanks for the suggestion Kevin but it didn't seem to help.
After a little more digging around within the V2.1 Turbine Code, I came
across this snippet of code in the setRequest() function of
org.apache.turbine.util.parser.DefaultParameterParser.java
****************** Start DefaultParameterParser.java ************
tmp = (String)req.getHeader("Content-type");
if (TurbineUpload.getAutomatic() &&
tmp != null && tmp.startsWith("multipart/form-data"))
{
try
{
TurbineUpload.parseRequest(req, this);
}
catch(TurbineException e)
{
Log.error(new TurbineException("File upload failed", e));
}
}
****************** End DefaultParameterParser.java ************
This is where my Exception is coming from after I redirect from an Action
page directly to a SecurePage.
This would suggest that if I disable automatic File Upload, Turbine won't
try to reload the now non-existant file data.
I tried this, but Turbine then doesnt seem to recognise what were previously
valid actions. Instead it calls the requested SecurePage.
The following mail suggests it is advisable to set automatic upload to true
to get the upload to work.
http://www.mail-archive.com/[email protected]/msg00341.html
Can anyone shed some light on why this should be done or what it does?
Further more, does anyone know why setting it to false seems to break the
action functionality?
cheers for now,
Chris
> -----Original Message-----
> From: Kevin Rutherford [mailto:[EMAIL PROTECTED]]
> Sent: 28 November 2001 18:35
> To: 'Turbine Users List'
> Subject: RE: Turbine Exceptions after a Redirect in an Action
>
>
> Chris,
>
> We do the same thing in our action classes in order to avoid the page
> refresh problem. However, we use the DynamicURI class directly, instead of
> using the TemplateLink class. I did not take the time to see what the
> differences are, but take a look at the following code and see if
> it helps.
> It is similar to the redirect code in Turbine.java, but we use
> addQueryData() for the parameters instead of addPathInfo() because we seem
> to having trouble with that approach (a separate unrelated issue).
>
> Kevin
>
> ...
>
> // redirect to the same template, but without the action parameter
>
> DynamicURI duri = new DynamicURI (data, true);
>
> // pass on selected request parameters.
>
> for (Enumeration e = data.getParameters().keys();
> e.hasMoreElements(); )
> {
> String key = (String) e.nextElement();
>
> // Pass on all parameters except the action.
>
> if (!key.equalsIgnoreCase("action"))
> {
> String value = (String) data.getParameters().getString(key);
> if (value != null && value.length() > 0)
> {
> duri.addQueryData((String)key, (String)value);
> }
> }
> }
>
> data.getResponse().sendRedirect(duri.toString());
>
> ...
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>