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
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:
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
, 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
.
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
=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
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
%{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
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
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
--- 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.
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
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
, 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
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
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
--- 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
. 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
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
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
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
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());
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
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
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
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
: 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
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
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
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
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
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
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
48 matches
Mail list logo