struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Neu <peter....@gmx.net>
Subject Re: Deployment Problem -
Date Wed, 29 Dec 2004 17:04:48 GMT
Allright. Now I get it!

The only problem is in Struts 1.1 (which I wrote the application in) the 
parameter "action" does not exist in the <logic:redirect> tag.
What can I do in this case?

Peter

Jim Barrows schrieb:
> 
>>-----Original Message-----
>>From: Peter Neu [mailto:peter.neu@gmx.net]
>>Sent: Wednesday, December 29, 2004 9:43 AM
>>To: Struts Users Mailing List
>>Subject: Re: Deployment Problem -
>>
>>
>>Hello Jim,
>>
>>well, I got a logical name mapped to it:
>>
>>  <action path="/postHv"
>>             input="/WEB-INF/JSP/struts.jsp"
>>             name="postHvForm"
>>             scope="session"
>>             validate="true"
>>             type="de.ktbl.servlets.PostHv">
>>         <forward name="struts" path="/WEB-INF/JSP/struts.jsp" 
>>redirect="false"
>>        contextRelative="true"/>
>>            </action>
>>
>>When I simply invoke it with "postHv.html" ( html refers to .do )
>>in the browser I get to the right page. The think with 
>>"/hv/postHv.html" 
>>was simply just a workaround. I think I don't understand
> 
> 
> Problem is your tag won't work.  It's looking for a global forward named "/hv/postHv.html"
to give a url to, according to the documentation.  The forward in the above example is a local
forward and only visible to the action, not a JSP page.
> If you want <logic:redirect forward="/hv/postHv.html" /> to redirect to the above
action the you need:
> <logic:redirect action="/postHv.do"/>  which is exactly what I use, only the action
is differnt :)
> 
> 
> 
> 
>>the problem.
>>
>>Regards,
>>
>>Peter
>>
>>
>>Jim Barrows schrieb:
>>
>>>>-----Original Message-----
>>>>From: Peter Neu [mailto:peter.neu@gmx.net]
>>>>Sent: Wednesday, December 29, 2004 6:32 AM
>>>>To: Struts Users Mailing List
>>>>Subject: Deployment Problem - 
>>>>
>>>>
>>>>Hello ,
>>>>
>>>>I developed my application in an IDE which simulated
>>>>that the application was in the top folder. When I deploy
>>>>my application now it is an subfolder.
>>>>The problem is: The redirects don't work anymore!
>>>>
>>>>If do it in simple HTML :
>>>>
>>>><meta http-equiv="refresh" content="0; URL=/hv/postHv.html">
>>>>
>>>>I can get an clean forward. The same with redirect tag:
>>>>
>>>><logic:redirect forward="/hv/postHv.html" />
>>>
>>>
>>>Sounds like what you're doing is not getting the context 
>>
>>into the URL.  This is supposed to happen automtically.
>>
>>>In the case above, this shouul not work.  The javadocs say 
>>
>>this about the forward:
>>
>>>forward
>>>
>>>protected java.lang.String forward
>>>
>>>    The logical forward name from which to retrieve the 
>>
>>redirect URI.
>>
>>>So you need to have a forward name, not a url here.  The 
>>
>>url the forward referes to should not have the context in it.
>>
>>>
>>>>just returns an exception: java.net.MalformedURLException
>>>>
>>>>Do I have to change all the URL's in the application from
>>>><logic:redirect> to <html refresh> or is there an easier
>>>>way to do this?
>>>>
>>>>
>>>>Best Regards,
>>>>
>>>>Peter
>>>>
>>>>------------------------------------------------------------
>>
>>---------
>>
>>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>
>>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message