convention plugin struts.xml interceptors

2016-10-30 Thread ronald.a.ander...@gmail.com
My actions are working fine by following the convention rules - no struts.xml 
required; I need to configure a custom interceptor, so struts.xml is required. 
As soon as I add the struts.xml, the following exception is returned:

Oct 30, 2016 1:54:22 PM org.apache.struts2.dispatcher.Dispatcher error
SEVERE: Exception occurred during processing request: No result defined for 
action net.codejava.struts.LoginAction and result success
No result defined for action net.codejava.struts.LoginAction and result success 

How can the struts.xml be configured to ignore the action or how can the 
convention plugin override the struts.xml? Do not want to add the LoginAction 
to the struts.xml


Struts2 version->struts2-core-2.3.15.1

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



Re: convention plugin struts.xml interceptors

2016-11-01 Thread ronald.a.ander...@gmail.com


On 2016-10-30 18:53 (-0400), Martin Gainty  wrote: 
> 
> 
> 
> ____
> From: ronald.a.ander...@gmail.com 
> Sent: Sunday, October 30, 2016 1:59 PM
> To: user@struts.apache.org
> Subject: convention plugin struts.xml interceptors
> 
> My actions are working fine by following the convention rules - no struts.xml 
> required; I need to configure a custom interceptor, so struts.xml is 
> required. As soon as I add the struts.xml, the following exception is 
> returned:
> 
> Oct 30, 2016 1:54:22 PM org.apache.struts2.dispatcher.Dispatcher error
> SEVERE: Exception occurred during processing request: No result defined for 
> action net.codejava.struts.LoginAction and result success
> No result defined for action net.codejava.struts.LoginAction and result 
> success
> 
> How can the struts.xml be configured to ignore the action or how can the 
> convention plugin override the struts.xml? Do not want to add the LoginAction 
> to the struts.xml
> 
> MG>use annotations
> 
> @Action("LoginAction") // actually that is not necessary as it is added by 
> convention
> @Results(
> @Result(name="success", location="/Success.jsp")
> )
> public class LogoninAction {
> MG>
> 
> 
> Struts2 version->struts2-core-2.3.15.1
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> Hi Martin,

It threw the same exception after adding the annotations; including my 
struts.xml file:



http://struts.apache.org/dtds/struts-2.3.dtd";>





   




  




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



Re: convention plugin struts.xml interceptors

2016-11-01 Thread ronald.a.ander...@gmail.com


On 2016-10-31 15:58 (-0400), Lukasz Lenart  wrote: 
> 2016-10-30 18:59 GMT+01:00 ronald.a.ander...@gmail.com
> :
> > My actions are working fine by following the convention rules - no 
> > struts.xml required; I need to configure a custom interceptor, so 
> > struts.xml is required. As soon as I add the struts.xml, the following 
> > exception is returned:
> >
> > Oct 30, 2016 1:54:22 PM org.apache.struts2.dispatcher.Dispatcher error
> > SEVERE: Exception occurred during processing request: No result defined for 
> > action net.codejava.struts.LoginAction and result success
> > No result defined for action net.codejava.struts.LoginAction and result 
> > success
> >
> > How can the struts.xml be configured to ignore the action or how can the 
> > convention plugin override the struts.xml? Do not want to add the 
> > LoginAction to the struts.xml
> 
> Can you post content of your struts.xml? I think you have defined a
> main package and that's why such action isn't available.
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> Hi Lakasz

Below is the struts.xml and LoginAction (for reference). Using default for  
package name in struts.xml:
Just want to use the conventional plugin and struts.xml for interceptors but no 
actions defined in struts.xml via conventional plugin



http://struts.apache.org/dtds/struts-2.3.dtd";>





   




  




package net.codejava.struts;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.validator.annotations.EmailValidator;
import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;



public class LoginAction extends ActionSupport {
/**
 * 
 */
private static final long serialVersionUID = -7413249884096556212L;
private String email;
private String password;

public String execute() {
if (email != null && email.equals("ad...@codejava.net")) {
return SUCCESS; 
} else {
return INPUT;
}
}

@RequiredStringValidator(message = "Please enter your e-mail address.")
@EmailValidator(message = "Please enter a valid e-mail address.")
public void setEmail(String email) {
this.email = email;
}

@RequiredStringValidator(message = "Please enter your password.")
public void setPassword(String password) {
this.password = password;
}

public String getEmail() {
return email;
}

public String getPassword() {
return password;
}
}

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



Re: convention plugin struts.xml interceptors

2016-11-01 Thread ronald.a.ander...@gmail.com


On 2016-11-01 12:20 (-0400), Lukasz Lenart  wrote: 
> 2016-11-01 4:00 GMT+01:00 Ronald Andersen :
> > Hi Lakasz
> >
> > Below is the struts.xml and LoginAction (for reference). Using default for
> >  package name in struts.xml:
> >
> > 
> >
> >  > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
> > "http://struts.apache.org/dtds/struts-2.3.dtd";>
> > 
> > 
> > 
> > 
> > 
> >  > class="net.codejava.struts.MyCustomInterceptor" />
> > 
> > 
> > 
> > 
> > 
> >
> > 
> 
> Do you have more interceptors in your customStack? Secondly, did you
> define it as a default stack with  ?
> 
> I'm using almost the same setup and everything is working perfectly
> fine. Are you sure there is no exception when starting container?
> Here you have almost the same setup
> https://github.com/apache/struts-examples/tree/master/unknown-handler
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> Hi Lukasz,

Reviewing struts-examples/unknown-handler/ and interceptors

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



Re: convention plugin struts.xml interceptors

2016-11-02 Thread ronald.a.ander...@gmail.com


On 2016-11-01 12:20 (-0400), Lukasz Lenart  wrote: 
> 2016-11-01 4:00 GMT+01:00 Ronald Andersen :
> > Hi Lakasz
> >
> > Below is the struts.xml and LoginAction (for reference). Using default for
> >  package name in struts.xml:
> >
> > 
> >
> >  > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
> > "http://struts.apache.org/dtds/struts-2.3.dtd";>
> > 
> > 
> > 
> > 
> > 
> >  > class="net.codejava.struts.MyCustomInterceptor" />
> > 
> > 
> > 
> > 
> > 
> >
> > 
> 
> Do you have more interceptors in your customStack? Secondly, did you
> define it as a default stack with  ?
> 
> I'm using almost the same setup and everything is working perfectly
> fine. Are you sure there is no exception when starting container?
> Here you have almost the same setup
> https://github.com/apache/struts-examples/tree/master/unknown-handler
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> The struts.xml from struts-examples/tree/master/unknown-handler worked in my 
> project. Comparing that one and mine.


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



Re: convention plugin struts.xml interceptors

2016-11-02 Thread ronald.a.ander...@gmail.com


On 2016-11-01 15:17 (-0400), Ken McWilliams  wrote: 
> Am I wrong in assuming that this new package is supposed to be the default?
> If so it should extend conventions-default and there is some constant that
> should be set such that conventions uses this package by default.
> 
> Also, perhaps of greater importance: If conventions was working before then
> the results would by default be in /WEB-INF/content/ and does not  name="struts.convention.result.path" value="/"> now ask struts
> to search at the root? In which case it probably won't find the previously
> established views?
> 
> For reference see: https://struts.apache.org/docs/convention-plugin.html
> Search on that page for:
> struts.convention.result.path and
> struts.convention.default.parent.package
> 
> On Tue, Nov 1, 2016 at 1:05 PM, ronald.a.ander...@gmail.com <
> ronald.a.ander...@gmail.com> wrote:
> 
> >
> >
> > On 2016-11-01 12:20 (-0400), Lukasz Lenart 
> > wrote:
> > > 2016-11-01 4:00 GMT+01:00 Ronald Andersen :
> > > > Hi Lakasz
> > > >
> > > > Below is the struts.xml and LoginAction (for reference). Using default
> > for
> > > >  package name in struts.xml:
> > > >
> > > > 
> > > >
> > > >  > > > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
> > > > "http://struts.apache.org/dtds/struts-2.3.dtd";>
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >  > > > class="net.codejava.struts.MyCustomInterceptor" />
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > >
> > > Do you have more interceptors in your customStack? Secondly, did you
> > > define it as a default stack with  ?
> > >
> > > I'm using almost the same setup and everything is working perfectly
> > > fine. Are you sure there is no exception when starting container?
> > > Here you have almost the same setup
> > > https://github.com/apache/struts-examples/tree/master/unknown-handler
> > >
> > >
> > > Regards
> > > --
> > > Łukasz
> > > + 48 606 323 122 http://www.lenart.org.pl/
> > >
> > > -
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > > Hi Lukasz,
> >
> > Reviewing struts-examples/unknown-handler/ and interceptors
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> -- 
> Sent from my C64 using a 300 baud modem
> Hi Ken,

Reviewing the convention plugin documentation

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



Re: convention plugin struts.xml interceptors

2016-11-05 Thread ronald.a.ander...@gmail.com


On 2016-11-01 15:17 (-0400), Ken McWilliams  wrote: 
> Am I wrong in assuming that this new package is supposed to be the default?
> If so it should extend conventions-default and there is some constant that
> should be set such that conventions uses this package by default.
> 
> Also, perhaps of greater importance: If conventions was working before then
> the results would by default be in /WEB-INF/content/ and does not  name="struts.convention.result.path" value="/"> now ask struts
> to search at the root? In which case it probably won't find the previously
> established views?
> 
> For reference see: https://struts.apache.org/docs/convention-plugin.html
> Search on that page for:
> struts.convention.result.path and
> struts.convention.default.parent.package
> 
> On Tue, Nov 1, 2016 at 1:05 PM, ronald.a.ander...@gmail.com <
> ronald.a.ander...@gmail.com> wrote:
> 
> >
> >
> > On 2016-11-01 12:20 (-0400), Lukasz Lenart 
> > wrote:
> > > 2016-11-01 4:00 GMT+01:00 Ronald Andersen :
> > > > Hi Lakasz
> > > >
> > > > Below is the struts.xml and LoginAction (for reference). Using default
> > for
> > > >  package name in struts.xml:
> > > >
> > > > 
> > > >
> > > >  > > > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
> > > > "http://struts.apache.org/dtds/struts-2.3.dtd";>
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >  > > > class="net.codejava.struts.MyCustomInterceptor" />
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > 
> > >
> > > Do you have more interceptors in your customStack? Secondly, did you
> > > define it as a default stack with  ?
> > >
> > > I'm using almost the same setup and everything is working perfectly
> > > fine. Are you sure there is no exception when starting container?
> > > Here you have almost the same setup
> > > https://github.com/apache/struts-examples/tree/master/unknown-handler
> > >
> > >
> > > Regards
> > > --
> > > Łukasz
> > > + 48 606 323 122 http://www.lenart.org.pl/
> > >
> > > -
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > > Hi Lukasz,
> >
> > Reviewing struts-examples/unknown-handler/ and interceptors
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
> 
> 
> -- 
> Sent from my C64 using a 300 baud modem
> Hi Ken,

Your correct! 

The constant below was  pointing to the root path


I had two options - remove it or point to the correct path below, which seems 
to be the default; removed it:



Thanks!


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



Re: convention plugin struts.xml interceptors

2016-11-05 Thread ronald.a.ander...@gmail.com


On 2016-11-01 12:20 (-0400), Lukasz Lenart  wrote: 
> 2016-11-01 4:00 GMT+01:00 Ronald Andersen :
> > Hi Lakasz
> >
> > Below is the struts.xml and LoginAction (for reference). Using default for
> >  package name in struts.xml:
> >
> > 
> >
> >  > "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
> > "http://struts.apache.org/dtds/struts-2.3.dtd";>
> > 
> > 
> > 
> > 
> > 
> >  > class="net.codejava.struts.MyCustomInterceptor" />
> > 
> > 
> > 
> > 
> > 
> >
> > 
> 
> Do you have more interceptors in your customStack? Secondly, did you
> define it as a default stack with  ?
> 
> I'm using almost the same setup and everything is working perfectly
> fine. Are you sure there is no exception when starting container?
> Here you have almost the same setup
> https://github.com/apache/struts-examples/tree/master/unknown-handler
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> Hi Lakasz

The constant within struts.xml below was  pointing to the root path


I had two options - remove it or point to the correct path below, which seems 
to be the default; removed it:


Thanks for responding - thread closed!

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