Re: How to forward....

2009-12-16 Thread Paweł Wielgus
Hi Rafael, instead forward name=success path=/MainMenu.class write forward name=success path=/MainMenu.do. Best greetingsgus. , Paweł Wiel 2009/12/16 Rafael Muneton rafael_mune...@hotmail.com: Hello: I am trying to develop a small application that contains a Login.jsp, in case of

How to forward....

2009-12-15 Thread Rafael Muneton
Hello: I am trying to develop a small application that contains a Login.jsp, in case of failure the controller must redirect to Login.jsp again; in case of success the controller must redirect to a Java application ,MainMenu.class. I think this is done in struts-config.xml file:

Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
thanks for your reply. the result types cannot do my jobs in struts2+rest environment. in this environment, the success,error,... did not work, only index,show ,... are the default result types. I can manage this. my situation is, I need to forward request to action conditionally,ie,depend on

Re: Re: How to forward request in struts 2.1.6?

2009-04-30 Thread Nils-Helge Garli Hegvik
I'm not sure I understand your problem. Maybe you can give an example? I would be surprised if you couldn't handle this with regular Struts 2 results. http://struts.apache.org/2.1.6/docs/result-types.html http://struts.apache.org/2.1.6/docs/result-configuration.html

Re:Re: Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
so many thanks. forgive my poor english. there are some words in this document: http://struts.apache.org/2.1.6/docs/rest-plugin.html Also, notice we aren't returning the usual success result code in either method. This allows us to use the special features of the Codebehind Plugin to

Re: How to forward request in struts 2.1.6?

2009-04-30 Thread Dave Newton
xnpeng wrote: public class PublishController extends PublishAction implements Preparable { private static String message_url = /post/message/; private static String affair_url = /post/affair/; private static String business_url = /post/business/; private static String

Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
by the idea of Convention-plugin(CodeBehind-plugin)--Zero Config,it provides: Action location by package naming conventions Result (JSP, FreeMarker, etc) location by naming conventions Class name to URL naming convention Package name to namespace convention SEO compliant URLs (i.e. my-action

How to forward request in struts 2.1.6?

2009-04-29 Thread xnpeng
from: ServletActionContext.getServletContext().getRequestDispatcher(/post/message/+id).forward(ServletActionContext.getRequest(),ServletActionContext.getResponse()); I want to forward request to http://localhost:8080/post/message/3166, but it always throws out exception says requested resource

Re: How to forward request in struts 2.1.6?

2009-04-29 Thread Nils-Helge Garli Hegvik
Why do you need to do it manually with the request dispatcher? Can't you use any of the available result types? http://struts.apache.org/2.1.6/docs/result-types.html Nils-H 2009/4/29 xnpeng xnp...@163.com: from:

Re: [S2] How to forward to another struts mapping

2007-11-21 Thread Omkar Patil
ActionErrors from Action-A to be present in the view of URL-B. How do I do this? It used to be simple in Struts-1, but I can't figure it out for Struts2. Thanks, Alex -- View this message in context: http://www.nabble.com/-S2--How-to-forward-to-another-struts-mapping-tf4846285.html

[S2] How to forward to another struts mapping

2007-11-20 Thread alexworden
to be simple in Struts-1, but I can't figure it out for Struts2. Thanks, Alex -- View this message in context: http://www.nabble.com/-S2--How-to-forward-to-another-struts-mapping-tf4846285.html#a13865418 Sent from the Struts - User mailing list archive at Nabble.com

Re: Login implementation, how to forward user to original destination?

2007-10-01 Thread Anton Pussep
First of all thanks a lot for the fast reply. The problem with storing something in the session is it that if the user tried to access two different pages at once in separate windows and had to login in both, he will be forwarded in both to the last page he tried to access. I think this is a

Re: Login implementation, how to forward user to original destination?

2007-10-01 Thread Paul Benedict
There's no perfect solution. You should choose a first-win or last-win strategy. Paul On 10/1/07, Anton Pussep [EMAIL PROTECTED] wrote: First of all thanks a lot for the fast reply. The problem with storing something in the session is it that if the user tried to access two different pages

Login implementation, how to forward user to original destination?

2007-09-30 Thread Anton Pussep
I spent quite a few hours today trying to forward the user to his original destination when he has to login in between. I have an interceptor (Authentication) that is called before an action and it forwards to Login.action if the user is not logged in. The problem is that if Login.action returns

Re: Login implementation, how to forward user to original destination?

2007-09-30 Thread Paul Benedict
Anton, Acegi Security does something similar. The original requests (yes -- the actual request object) is stored in the session when the user's credentials are challenged. If they then succeed at the login page, the original request is taken from the session and forwarded along. Paul On

Re: How to forward to a page out of .war file

2007-09-11 Thread Jorge Martín Cuervo
can't you use a redirect? i think you can't forward outside the same context (but i'm not sure, maybe some servlet containers can do it). El lun, 10-09-2007 a las 17:45 -0700, [EMAIL PROTECTED] escribió: Hi, The present application structure has multiple .war files in a .ear file. Now my

Re: How to forward to a page out of .war file

2007-09-11 Thread Aram Mkhitaryan
If you configure your web applications so that the context is shared then you will be able to get resources from the other web applications. See for more details the documentation for the web application context configuration (context.xml). As Struts uses standard RequestDispatcher, then you

How to forward to a page out of .war file

2007-09-10 Thread sriharsha . chevuru
Hi, The present application structure has multiple .war files in a .ear file. Now my login module is part of 1.war and on a successful validation i want to forward in struts-config.xml to a page in 2.war file. How do i achieve this? Thank you

RE: how to forward some action from javascritp

2007-08-08 Thread Rajam T .
, August 08, 2007 8:47 AM To: user@struts.apache.org Subject: how to forward some action from javascritp hi i have to forward to controller with javascritp my script is as below. html head function fwd(field){ var val=field.value; if(val == 1){ [b]mypage.do[/b] //--- this is how

RE: how to forward some action from javascritp

2007-08-08 Thread msg2ajay
. document.forms[0].action='myAction.do'; document.forms[0].submit(); Thanks Regards Rajam Thirunavukkarasu -Original Message- From: msg2ajay [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 8:47 AM To: user@struts.apache.org Subject: how to forward some action from

how to forward some action from javascritp

2007-08-07 Thread msg2ajay
=1one/html:option html:option value=2one/html:option html:option value=3one/html:option /body /html thx in Adv Ajay -- View this message in context: http://www.nabble.com/how-to-forward-some-action-from-javascritp-tf4234069.html#a12046424 Sent from the Struts - User mailing list archive

Re: How to forward to an unknown view in Struts 2?

2007-05-23 Thread Caine Lai
Sorry for taking so long to get back to everyone on this. This is a side project of mine and things have been hectic with the day job keeping me from this. After doing some experimentation, I've found that your solution below does work Musachy. It just won't access a property in the request

Re: How to forward to an unknown view in Struts 2?

2007-05-10 Thread Musachy Barroso
%{expr} won't work (yet). I modified EditPersonAction on showcase to this: @Result(name=list, value=${next}, type=ServletRedirectResult.class) public class EditPersonAction extends ActionSupport { ... public String getNext() { return listPeople.action; } public String execute() throws

How to forward to an unknown view in Struts 2?

2007-05-09 Thread Caine Lai
Does anyone know how I can forward to a .jsp file based on a dynamic attribute (request parameter)? I want to write a Struts 2 action that will forward the user to a .jsp dynamically. The flow works like so: 1. A request is made for 'resourceLocator.action?resource=common'. 2

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Musachy Barroso
You can use OGNL expressions in the result path, just make sure that you use ${expression}, instead of %{expression}, like action ... result${forwardTo}/result /action musachy On 5/9/07, Caine Lai [EMAIL PROTECTED] wrote: Does anyone know how I can forward to a .jsp file based

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Dave Newton
--- Musachy Barroso [EMAIL PROTECTED] wrote: just make sure that you use ${expression}, instead of %{expression} (Was someone going to make a change for that so the config EL is the same as the normal OGNL? I think it'd be nice and less confusing if they were unified :) d.

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Musachy Barroso
I was just leaving a message to Rainer on: https://issues.apache.org/struts/browse/WW-1879 I submitted the patch just a few minutes before the xwork build, and he wasn't sure if it was going to break something else (coming from me I can understand that :) ) musachy On 5/9/07, Dave Newton

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Dave Newton
Very good; I thought there had been discussion about that :) --- Musachy Barroso [EMAIL PROTECTED] wrote: I was just leaving a message to Rainer on: https://issues.apache.org/struts/browse/WW-1879 I submitted the patch just a few minutes before the xwork build, and he wasn't sure if it

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Caine Lai
, just make sure that you use ${expression}, instead of %{expression}, like action ... result${forwardTo}/result /action musachy On 5/9/07, Caine Lai [EMAIL PROTECTED] wrote: Does anyone know how I can forward to a .jsp file based on a dynamic attribute (request parameter)? I want

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Musachy Barroso
musachy On 5/9/07, Caine Lai [EMAIL PROTECTED] wrote: Does anyone know how I can forward to a .jsp file based on a dynamic attribute (request parameter)? I want to write a Struts 2 action that will forward the user to a .jsp dynamically. The flow works like so: 1. A request

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Caine Lai
PROTECTED] wrote: You can use OGNL expressions in the result path, just make sure that you use ${expression}, instead of %{expression}, like action ... result${forwardTo}/result /action musachy On 5/9/07, Caine Lai [EMAIL PROTECTED] wrote: Does anyone know how I can

Re: How to forward to an unknown view in Struts 2?

2007-05-09 Thread Dave Newton
--- Caine Lai [EMAIL PROTECTED] wrote: @Result(name=Action.SUCCESS, value=/resources/${resource}.ftl, type=FreemarkerResult.class) Am I missing something? Did you try using OGNL syntax, like %{resource}.ftl? d. __ Do You

How to Forward Request Parmeters in Struts

2006-09-05 Thread Help My PC!
. On page Page1A there is a button whose action is the same as in the previous flow, Act2, but the request parameters from Page1 and Page1a I'd like to forward to Act 2. What is the best way to handle this? My action, Act1a returns null, but when I'm losing the request parameters from page 1. How

Re: How to forward from one action to another, with modified parameters?

2006-01-09 Thread Rick Reumann
Dakota Jack wrote the following on 1/7/2006 10:09 AM: In my opinion, Eric, this is a bad solution. There are lots of reasons this is bad. Rather than go through them, I would suggest you just add the logic in /search.do?query=42 at the point you get the failure form /retrieve.do?id=42. I

How to forward from one action to another, with modified parameters?

2006-01-07 Thread Eric Jain
If a request for /retrieve.do?id=42 fails (e.g. couldn't find item in database), I'd like to say request.setStatus(HttpServletResponse.SC_NOT_FOUND); request.setAttribute(warning, Not your lucky day.); and forward (not redirect) the request to /search.do?query=42 Can this behavior

Re: How to forward from one action to another, with modified parameters?

2006-01-07 Thread Dakota Jack
In my opinion, Eric, this is a bad solution. There are lots of reasons this is bad. Rather than go through them, I would suggest you just add the logic in /search.do?query=42 at the point you get the failure form /retrieve.do?id=42. On 1/7/06, Eric Jain [EMAIL PROTECTED] wrote: If a request

Re: How to Forward out of struts to a URL from an Action

2005-01-28 Thread Keshav Shetty
In struts you can redirect(not forward) to other page or site. In your action instead of mapping.findforward use following code ActionForward toAction= new ActionForward (); ActionForward fromAction = mapping.findForward(targetURL); toAction.setPath(fromAction.getPath());

RE: How to Forward out of struts to a URL from an Action

2005-01-27 Thread Benedict, Paul C
Your action should choose a forward with its redirect attribute set to true: forward name=success redirect=true / Thanks, Paul -Original Message- From: Michael Oliver [mailto:[EMAIL PROTECTED] Sent: Thursday, January 27, 2005 2:54 PM To: struts-user@jakarta.apache.org Subject: How

Re: How to Forward out of struts to a URL from an Action

2005-01-27 Thread listed
Hi Michael, have a look in your struts-config.xml. forward name = Success path = /ViewSettings.do redirect = true/ Greets Mark Michael Oliver wrote: I would like to forward the user out of struts to a URL after an action executes

RE: How to Forward out of struts to a URL from an Action

2005-01-27 Thread Michael Oliver
To: Struts Users Mailing List Subject: Re: How to Forward out of struts to a URL from an Action Hi Michael, have a look in your struts-config.xml. forward name = Success path = /ViewSettings.do redirect = true/ Greets Mark Michael

Re: How to Forward out of struts to a URL from an Action

2005-01-27 Thread fzlists
Configure an Action Mapping like so: action path=/test type=com.mycompany.myapp.actions.TestAction forward name=externalForward path=http://www.omnytex.com; redirect=true / /action That's all. If you need it to be a little more dynamic, like I notice you said it was on the same server, if

RE: How to forward to an Action in one web app, from the Action ofa different web app

2004-05-06 Thread Frank L. Bowar
: How to forward to an Action in one web app, from the Action ofa different web app Frank L. Bowar wrote: I have 3 different Struts (1.1) web applications all running in the same Tomcat (4.1) server. When the user presses a button on a form of one of the applications, tied to a Struts Action, I

Re: How to forward to an Action in one web app, from the Action of a different web app

2004-05-05 Thread Craig McClanahan
Frank L. Bowar wrote: I have 3 different Struts (1.1) web applications all running in the same Tomcat (4.1) server. When the user presses a button on a form of one of the applications, tied to a Struts Action, I would like that Action to be able to forward control to an Action within a different

How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread Riyad Kalla
Hello, I have a situation where my LookupDispatchAction (LDA) has all my functionality for a particular entity defined in it (lets say Product). So that includes adding, removing, listing, editing and changing their order (moving them visually up/down in the table they are listed in). So far

Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread Riyad Kalla
UPDATE: Upgraded my Struts install to nightly build and now the code snippet below works. I'm still curious if anyone knows how one LDA can forward to another (or the same) LDA, even if it takes manually setting the parameter value (how?) Thanks! Riyad Riyad Kalla wrote: UPDATE: I just tried

Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread bOOyah
Riyad Kalla wrote: UPDATE: Upgraded my Struts install to nightly build and now the code snippet below works. I'm still curious if anyone knows how one LDA can forward to another (or the same) LDA, even if it takes manually setting the parameter value (how?) snip / protected ActionForward

Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread Riyad Kalla
booya I really appreciate the code snippets and explination! I hadn't gotten involved in ActionForwards and appreciate you shedding light on the situation for me. Best, Riyad On Friday 23 April 2004 09:34 am, bOOyah wrote: Riyad Kalla wrote: snip / Does anyone know how I would be able to

Re: How to forward from one LookupDispatchAction to another LDA

2004-04-23 Thread bOOyah
Riyad Kalla wrote: booya I really appreciate the code snippets and explination! I hadn't gotten involved in ActionForwards and appreciate you shedding light on the situation for me. No problems Riyad! I'm glad to give back to this list after sucking it dry for three months ;-) -- bOOyah