Thanks guys for helping me out. All I was missing was to add the
defaultInterceptor in the interceptor stack. It works now as expected.
Thanks,
Nikul
2011/6/7 Jeff Black
> Hey Nikul.
>
> Double-check your interceptor stack. It is only composed of your session
> interceptor.
>
> Jb
>
> Nikul S
Hey Nikul.
Double-check your interceptor stack. It is only composed of your session
interceptor.
Jb
Nikul Suthar wrote:
>Hi There,
>
>I'm pretty new to using Struts 2 for developing a web application. So I
>would be very thankful if someone can clear out this roadblock for me.
>
>I'm trying
8, 2011 10:03 AM
To: user@struts.apache.org
Subject: Validate method not working in Action after using Interceptor
Hi There,
I'm pretty new to using Struts 2 for developing a web application. So I
would be very thankful if someone can clear out this roadblock for me.
I'm trying
In your interceptor, you're replacing the logic from the
DefaultWorkflowInterceptor with your own. What you really want to do is
perform your work, then allow it to do it's job. So, instead of return
invocation.invoke();, try return super.intercept(invocation); and see if
that does more what you
Hi There,
I'm pretty new to using Struts 2 for developing a web application. So I
would be very thankful if someone can clear out this roadblock for me.
I'm trying to write some custom validation code in method *public void
validate()* in the Action class. I also created an interceptor extending
Hi,
How come you posted the same (except for slightly different subject)
message twice?
Anyway, I answered your question while replying to the other mail. May
be we should continue any further discussion in that email.
Cheers,
Sonny
On Tue, Feb 10, 2009 at 9:02 PM, taj uddin wrote:
> Hi,
>
> I
Hi,
In my application I have used the validate() method but to my surprise i found
that validate method was not being called at all.
What ever the code i have placed in the validate method was not being executed.
I doubt there was some problem with the interceptors which i have included in
the
If
* the class extends one of the ActionForm base classes, and
* the class overrides the base validate method, and
* the class is registered as the form bean for the action, and
* the validate methods returns a non-null and non-empty ActionErrors
collection,
then the input location should be sele
all i am trying to do is perform basic form validation. but that itself doesnt
seem to work. i have other actions which work fine except this one. what
happens is that it finds errors and indicates the errors in the forward
"success" page instead of the "input" page. sorry for repeating mysel
Thanks for the replies guys, I am validating the form in the form-bean's
validate method. The form-bean code is given below:-
public class ImageForm extends ActionFormBase
{
// getter and setter methods
public ActionErrors validate( ActionMapping mapping,
HttpServletRequest request )
Gary Feidt wrote:
> Where is your Validation? I don't see any protected ActionMessages
> validate(iForm theform) {}
>
Also, what class does your form sub-class?
> error = validate(theform);
>
He has validate="true" which, if the form has a proper superclass,
should do validation automagic
Where is your Validation? I don't see any protected ActionMessages
validate(iForm theform) {}
Nor do I see anything being added to the ActionErrors.
You need to add errors to you ActionErrors collection. You can do
something like:
error = validate(theform);
if (!errors.isEmpty()) {
saveErro
Here is the action class
public class RequestViewDetailAction extends ActionBase
{
public ActionForward execute( ActionMapping mapping, ActionForm frm,
HttpServletRequest request, HttpServletResponse response )
{
ActionMessages messages = new ActionMessages();
RequestManager m
Still not enough to analyze - I think your Struts-Config file looks ok.
We will probably need some snippets of your
co.ui.action.RequestViewDetailAction before we can determine what is
wrong.
Gary
>>> [EMAIL PROTECTED] 4/5/2006 10:17:12 AM >>>
Thanks Krishna,
Thats the chunk from the struts-con
Thanks Krishna,
Thats the chunk from the struts-config file.
i'm afraid it still doesnt work. when errors are present it displays the errors
on the RequestList.jsp page instead of the RequestDetail.jsp.
As i said I tried to think, but in vain. any ideas folks?
Cheers
And I think Dave's point is without seeing your action in your
struts-config.xml and you Action code we don't know if your code is
correct or not. Can show us some of the code?
Gary
[EMAIL PROTECTED] 4/5/2006 9:47:27 AM >>>
>Hi Dave,
>
>thanks for the reply. The problem is that errors were
Hi Dave,
thanks for the reply. The problem is that errors were detected and they were
being displayed in the "success" page instead of on the same ("input" page").
The Log messages also indicate that an error has occured. Very strange.
Gokul
On Wed, 05 Apr 2006 Dave Newton wrote :
>gokul bal
gokul balasubramanian wrote:
> Instead of remaining on the input page control passes to the success page.
> thats what baffles me. Any help/ suggestions will really help.
>
Sounds like there weren't any errors then, or your configuration is
broken, or your validation code is broken, or...
Wit
Exactly Ted,
Instead of remaining on the input page control passes to the success page.
thats what baffles me. Any help/ suggestions will really help.
Thanks
Gokul
On Wed, 05 Apr 2006 Ted Husted wrote :
>If validation fails, control returns to "input", not to "success".
>
>HTH, Ted.
>
>On 5
If validation fails, control returns to "input", not to "success".
HTH, Ted.
On 5 Apr 2006 14:18:10 -, gokul balasubramanian
<[EMAIL PROTECTED]> wrote:
>
> I have a very weird problem here. I have a form-bean where i validate the
> user input and add them to the errors. When i click the sub
I have a very weird problem here. I have a form-bean where i validate the user
input and add them to the errors. When i click the submit button, the errors
are displayed not on the same page but on the page as indicated in the page. very strange. i have done the following:-
added
included t
21 matches
Mail list logo