ActionRedirect with POST parameters
Hi, Is there a way to use ActionRedirect(Struts 1.2.7 & later) with POST parameters and not GET. /S
Re: ActionRedirect with POST parameters
Yep, Is there a workaround? On 1/5/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote: Information Guzzler ha scritto: > Hi, > > Is there a way to use ActionRedirect(Struts 1.2.7 & later) with POST > parameters and not GET. Errr... no, it is an HTTP limitation. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: session time out
Have the sessionListener track the session duration and on timeout remove attributes from session. Also, On each struts view, before displaying check for a session attribute, if not present redirect to session timeout page using logic:forward /S On 1/5/07, fea jabi <[EMAIL PROTECTED]> wrote: When the session times out want to redirect to a session time out page. Is there an easier way to do this in struts? How can this be done? Thanks. _ Find sales, coupons, and free shipping, all in one place! MSN Shopping Sales & Deals http://shopping.msn.com/content/shp/?ctid=198,ptnrid=176,ptnrdata=200639 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect with Struts 2
How about passing parameters along with the redirect? On 1/8/07, Tom Schneider <[EMAIL PROTECTED]> wrote: Interesting question. I had the same question when I started looking at webwork. Here's what I do when I need to redirect to a different domain. If it's a static url, you can just hard code the full url in your struts.xml with a result type of redirect. If it's dynamic, there's a little more work involved. First you have a property on your action that is the url you want to go to. Second, in your sturts.xml you have a result type of redirect, but the value is pulled from the OGNL stack. For example: ${nextURL} nextURL is the property in your action that is populated dynamically. It's not trivial to figure out, but it works pretty slick. Tom Kamal C. Mettananda wrote: > Hi, > > I have seen that there has been an ActionForward class under Struts 1.xwhich could be used for a redirect to a completely different domain URL. But how can we achieve the same with Struts 2. > > Thanks. > > Kamal > > > > Send instant messages to your online friends http://uk.messenger.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Design issue
Definitely (1) if you are strictly following MVC. Is there any specific scenario wherein (2) seems good to you? If there is then explore ways to force it thro' controller On 2/2/07, Zhang, Larry (L.) <[EMAIL PROTECTED]> wrote: Think about a typical struts app, and on the jsp there are text field and drop downs. There are two approaches: (1) the action populates all the text fields and drop downs from the Database, and then set the value into the actionform, then the JSP will get the values from the actionform (2) the action populates some fields (text field for example), and leave other fields (drop down for example) to JSP to populate, on which a jsp tag can go to the datasource to get the values. I personally prefer (1) since in (2) the jsp tag actually by pass the controller to get the data from Datasource. What do you think? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbie alert: forward to a php script
Hi Chris, HttpClient would be an alternative to generate HTTP POST request. For info. refer http://jakarta.apache.org/commons/httpclient/ /I On 4/17/07, Chris Pat <[EMAIL PROTECTED]> wrote: Hello Sorry for the persistence/naivete of this, however can someone tell me if this is possible and how? It will be a learning experience for me and I appreciate any insight. Chris Pat <[EMAIL PROTECTED]> wrote: Hi Laurie Thanks. All I need is to send a HTTP Post request to the php script with the parameters that the Action received, but having done some processing in the Action. At this point I dont care if the client sees the results of the php output. I dont see how to generate something like a RequestDisptacher from within an Action even if I just send the client to a success page at the end. My design problem is that I am trying to talk to a cc processor using struts code. Right now the only way I can send the post to the cc processor and receive the response on the same port is with a php script. So I thought of splitting it up and using curl to send to the cc processor after processing it in an Action, receiving it in the php scrip and forwarding it to another Action for post processing. I have to get around the fact that the cc processor will only send back a response on the same port that the port as the request, obviously without a nicely formatted context/servlet syntax. I believe this will work, if I can only get a post sent to the php script which will be a url outside of the Struts framework. I am sure this massively violative MVC and probably not scalable, but I just have to get it done. Thanks for even the slightest insight, even if saying it is utterly stupid, grin. Laurie Harper wrote: Chris Pat wrote: > Hello > Is it possible to have an Action that processes some data and then posts to a url completely out of control of the framework? I want to process and write to a db first and then using the same parameters and any added session variables post to a php script, initially running on localhost but eventually on a completely different url. Can someone help me understand how or why not. I really need to do it even if it is not to the spec. Thank you. Post to? Sure, you can create an HTTP POST request to any URL. But I suspect that's not quite what you mean. If you mean /forward/ to, as in dispatch to, a PHP script, it's not so straight forward. I seem to recall seeing mention on this list in the past of some sort of Java-PHP bridge, which may be what you're looking for. Search the archives (or Google) for 'Java PHP bridge' and see if that turns anything useful up. Alternatively, re-post with clarification of exactly what you want to achieve; maybe someone will be able to give a more specific solution. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]