Re: validation checkboxlist

2018-01-09 Thread José Antonio Delgado Trujillo
Upss
unbalanced ]
the para-name was autocorrection of the email editor!!!
thanks 

Un saludo,
José A.

> On 9 Jan 2018, at 14:45, Brian Holzer  wrote:
> 
> Hey there,
>I'm not sure if this is affecting anything, but the syntax appears to be 
> wrong for your  compared to the example from the link that Lukasz provided you they are 
> different.  I'm not sure if that was just a typo or not?
> 
> From the link:name="expression">
> vs
> José : 
> [!CDATA[personBean.levels.length > 0]]>>
> 
> in José's, the < and > don't match properly. There appears to be a missing < 
> before the [!CDATA...  and an extra > after the 0]]
> in José's,   
> SGI (Corporate Head Office) • 2260 11th Avenue • Regina, SK • S4P0J9 
> • www.sgi.sk.ca <http://www.sgi.sk.ca/> • 1-844-TLK-2SGI (1-844-855-2744)
> 
> This e-mail and any files transmitted with it are confidential and intended 
> solely for the use of the individual or entity to whom they are addressed. If 
> you are not the named addressee, please notify the sender immediately by 
> e-mail if you have received this e-mail by mistake and delete this e-mail 
> from your system. If you are not the intended recipient you are notified that 
> using, disclosing, copying or distributing the contents of this information 
> is strictly prohibited.
> 
> You are receiving this message because you are a customer of SGI.  If you do 
> not wish to receive promotional messages via email, click here 
> <https://mysgi.sgi.sk.ca/afOnlineServices/onlineservices/public/customerUnsubscribe.do>
>  to unsubscribe (but you'll be missing out!) 
> 
> >>> Lukasz Lenart  January 9, 2018 12:16 AM >>>
> 2018-01-08 20:04 GMT+01:00 José Antonio Delgado Trujillo :
> > [!CDATA[personBean.levels.length > 0]]>>
> >
> > Unfortunately it still doesn't work and i don't any idea why the form 
> > display always the error message.
> 
> Can you share rendered html? What's a name of the radio buttons?
> 
> 
> Regards
> --
> Lukasz
> + 48 606 323 122 http://www.lenart.org.pl/ <http://www.lenart.org.pl/>
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org



Re: validation checkboxlist

2018-01-09 Thread José Antonio Delgado Trujillo
solved!!!

It was a problem with unbalanced ]

Un saludo,
José A.



Re: validation checkboxlist

2018-01-08 Thread José Antonio Delgado Trujillo
Thanks a lot Lukasz,

I had the same like the example except the expression of the validation.
I misunderstood the param-name=“expression” - It was the expression to 
evaluate!!! (i was thinking about the expression to fail the validation) 


>> [!CDATA[#personBean.levels.length==0]]>>

[!CDATA[personBean.levels.length > 0]]>>

Unfortunately it still doesn’t work and i don’t any idea why the form display 
always the error message.

Un saludo,
José A.



Re: Annotation validation setter level

2018-01-08 Thread José Antonio Delgado Trujillo
Thanks a lot for the link and the explanation.
Un saludo,
José A.

> On 6 Jan 2018, at 10:37, Hedju Hor  wrote:
> 
> Hi, use  @VisitorFieldValidator
> 1. in Action-Class annotad gettter Method of the model with 
> @VisitorFieldValidator
> 2. @EmailValidator on getter in Model Person.getEmail
> 
> see 
> https://depressedprogrammer.wordpress.com/2007/05/10/struts-2-validation-using-annotations/
> 
> Regards
> Hedju Hor
> 
> On 2018-01-05 19:50, José Antonio Delgado Trujillo  
> wrote: 
>> Annotations validations an alternative way of XML validation or the simplest 
>> way to implement the validate method.
>> 
>> Yo have two options:
>> At method level 
>> At setter level
>> 
>> In the second if you don’t have the setter in the Action class because it 
>> is a property of an object, where do i put the annotation. I think it would 
>> be in the model class but it doesn’t work.
>> 
>> I explain better with a example.
>> Person class have email property and the action class has a field of 
>> Person’s type. So the setter method is for Person not for email. If i want 
>> to use @EmailValidator in a setter level where does it put the annotation?
>> 
>> 
>> Un saludo,
>> José A.
>> 
>> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 



Annotation validation setter level

2018-01-05 Thread José Antonio Delgado Trujillo
Annotations validations an alternative way of XML validation or the simplest 
way to implement the validate method.

Yo have two options:
At method level 
At setter level

In the second if you don’t have the setter in the Action class because it is a 
property of an object, where do i put the annotation. I think it would be in 
the model class but it doesn’t work.

I explain better with a example.
Person class have email property and the action class has a field of Person’s 
type. So the setter method is for Person not for email. If i want to use 
@EmailValidator in a setter level where does it put the annotation?


Un saludo,
José A.



Re: validation checkboxlist

2018-01-05 Thread José Antonio Delgado Trujillo
> “personBean.levels.isEmpty”


Yes, it’s empty an in the form the first time rendered all the options are 
unchecked.


> 
> You should use "name" instead of "key"

Why not key? i have the correspondan property files
personBean.levels=Cursos

I also see the label Cursos and the options

The problem is about the XML validation.

 
  
[!CDATA[#personBean.levels.length==0]]>>
  You must select at least one option
 


It is always trigger 

Un saludo,
José A.



Re: validation checkboxlist

2018-01-04 Thread José Antonio Delgado Trujillo
OK,
Thanks for your explanation, i see clearer to use modeldriven or not.
My problem is not about the populate the options of the checkboxlist but the 
exception rule you must select at least one.

In the XML file i have


 
  
[!CDATA[#personBean.levels.length==0]]>>
  You must select at least one option
 



With that configuration i always obtain an error validation (showing the 
message in the checkboxñixt field)

In Person class
private String[] levels
private String[] levelsAvalaible={“1ESO”, “2ESO”, 3ESO”, “4ESO” }

with setters and getters


In the register-input.jsp

   …
  
…


I can see the options of the checkboxlist, but even selecting one option and 
submit the form i get error validation.

So i think It is a problem with the expression in the XML configuration.

 
Un saludo,
José A.



Re: validation checkboxlist

2018-01-04 Thread José Antonio Delgado Trujillo
In the docs about model driven
https://struts.apache.org/core-developers/model-driven.html 


It is said that you must to implement the MovelDriven interface just the method 
getModel() to give an Object in which Struts populate with the parameters 
request and placed on the top.

i din’t understand the need of that because i can populate the object if it is 
a field of the Action’s class.

So what is the difference (the use of OGNL?) i can’t accede object properties?

My object person is of type Person class and it is a field of the action 
Register. Why can’t access to levels property of the object person by 
person.levels??



validation checkboxlist

2018-01-03 Thread José Antonio Delgado Trujillo
I have a form with a checkboxlist linked to a bean with an array of string 
properties. I want the user must select at least one option.

Looking for the documentation, i think this is possible with field expression, 
but it requires ONGL expression.

I did it so:

FORM


…
   
…



BEAN 
public class Person{

private String[] levels;
…
}


XML VALIDATION

   


Selecciona al menos un curso
   
  


Re: exclude params submit

2018-01-03 Thread José Antonio Delgado Trujillo
But it must fix with exclude param
 
https://struts.apache.org/getting-started/exclude-parameters.html 
<https://struts.apache.org/getting-started/exclude-parameters.html>


> On 3 Jan 2018, at 05:48, Yasser Zamani  wrote:
> 
> 
> 
> On 1/2/2018 10:38 PM, José Antonio Delgado Trujillo wrote:
>> So  produces the next error:
>> 18:27:10,990 ERROR [stderr] (default task-9) Unexpected Exception caught 
>> setting 'submit' on 'class uoc.jdelgadot.loginstruts.action.Login: Error 
>> setting expression 'submit' with value ['Acceder', ]
> 
> When there is no setter for given parameter name, a warning message like 
> above will be logged in devMode. Thus is expected behaviour to allow 
> developer to spot missing setter or typo in either parameter name or 
> setter. You can simply ignore this one and if all such warning logs were 
> ok, set struts.devMode to false to disable this message when you deploy 
> to production.
> 
> Hope this helps.
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org



Re: Populate nested properties

2018-01-03 Thread José Antonio Delgado Trujillo
Yes it is but i had a problem with instantiate the both beans.
Now it works and i understand with the message Instancia the bean. 
Struts2/ONGL instantiate the beans but you must write the default constructor.

Thanks 

> On 3 Jan 2018, at 05:52, Yasser Zamani  wrote:
> 
> 
> 
> On 1/3/2018 1:30 AM, José Antonio Delgado Trujillo wrote:
>> Suppose that i have a nested Bean in a model class.
>> 
>> 
>> public Class Bean_B{
>>private String text;
>>private int number;
>> ...
>> }
>> 
>> public Class Bean_A{
>>  private Bean_B beanB;
>> ...
>> }
>> 
>> A form
>> 
>> 
>>
>>
>>  …
>>
>> 
>> When i submit the form the action class populate the nested properties text 
>> and number?
> 
> If your action has getBeanA() method and your Bean_A class has 
> getBeanB() method and your Bean_B class has setText() and setNumber() 
> method then yes, it should be able to populate them, isn't it?
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org


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



Re: Instancia the bean

2018-01-03 Thread José Antonio Delgado Trujillo
OK thanks Lukasz,
i hadn’t put the default constructor in the model class. Now it works!



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



Re: Instancia the bean

2018-01-02 Thread José Antonio Delgado Trujillo
I think Strus2 don’t instantiate the bean so you must instantiate perhaps in 
the prepare method or in the definition of the property class.

> On 2 Jan 2018, at 21:38, José Antonio Delgado Trujillo  
> wrote:
> 
> If you have a form linked to a bean using key attribute, then when you 
> submitted, must you instantiate the bean before the call action populate the 
> properties? Or Strust2 instantiate automatically after you call the action.
> 
> 
>   
> 
> 
> //The method execute of the A class action
> 
> public class A extends AcctionSupport{
> private Object bean;
> 
> public String void execute(){
> //Call business logic method
> control(bean);
>   return SUCCESS;
> }
> }
> 
> This throws a NullpointerException???
> 
> 
> 
> Un saludo,
> José A.
> 



Populate nested properties

2018-01-02 Thread José Antonio Delgado Trujillo
Suppose that i have a nested Bean in a model class.


public Class Bean_B{
   private String text;
   private int number;
...
}

public Class Bean_A{
private Bean_B beanB;
...
}

A form 


   
   
…
   

When i submit the form the action class populate the nested properties text and 
number?





Un saludo,
José A.



Instancia the bean

2018-01-02 Thread José Antonio Delgado Trujillo
If you have a form linked to a bean using key attribute, then when you 
submitted, must you instantiate the bean before the call action populate the 
properties? Or Strust2 instantiate automatically after you call the action.





//The method execute of the A class action

public class A extends AcctionSupport{
private Object bean;

public String void execute(){
//Call business logic method
control(bean);
return SUCCESS;
}
}

This throws a NullpointerException???



Un saludo,
José A.



exclude params submit

2018-01-02 Thread José Antonio Delgado Trujillo
I have a form with several tags using the attribute key.

As it is said in getting started / message resource file
Key is used to substitute tag’s value and label attributes.

For example: 

To put the tag label Struts2 look for property file.
To put the tag value Struts2 look for setName of a bean person instantiated by 
the action class.

So  produces the next error:
18:27:10,990 ERROR [stderr] (default task-9) Unexpected Exception caught 
setting 'submit' on 'class uoc.jdelgadot.loginstruts.action.Login: Error 
setting expression 'submit' with value ['Acceder', ]

To avoid this in getting started / elude params say to configure a new stack 
filter with exclude params.


I have the next Form
——





——


This is my properties file
—
credentialBean.user=Usuario
credentialBean.pass=Contraseña
submit=Acceder

—

This is my trusts.xml configuration
—





dojo..*,^struts..*,^session..*,^request..*,^application..*,^servlet(Request|Response)..*,parameters...*,submit






...
—

Still i’ve got submit error.
What am i doing wrong?


Un saludo,
José A.



Re: log4j problem

2017-12-30 Thread José Antonio Delgado Trujillo
Thanks Yasser,
Fix-it with debug-level

Un saludo,
José A.

> On 30 Dec 2017, at 09:10, Yasser Zamani  wrote:
> 
> 
> 
> On 12/30/2017 12:43 AM, José Antonio Delgado Trujillo wrote:
>> The log that is expected is ...
> 
> Default level is `info` [1]. Please change them to `debug` because you 
> expect debug level.
> 
> [1] 
> https://github.com/apache/struts-examples/blob/master/basic-struts/src/main/resources/log4j2.xml
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org



Re: log4j problem

2017-12-30 Thread José Antonio Delgado Trujillo
I cloned the GithHUb struts-example

https://github.com/apache/struts-examples.git 



> 
> Probably because a browser is requesting "/" to check something and as there 
> is no action named "" you see the error.
> 

??

localhost:8080/basic-strust/index.action

is a URL for the action named index, it hasn’t action class and in the 
struts.xml we have


/index.jsp



so as it’s said in the step 6 of the tutorial

This minimal Struts 2 configuration file tells the framework that if the URL 
ends in index.action to redirect the browser to index.jsp.


> but "index.action" != "/" that's why you see the error
> 
> And please be aware that in classless configuration as above, a default 
> action class is used and in this case it'll be ActionSupport [1].


That is the info that appears in the tutorial
...
2017-04-17 11:16:01,084 DEBUG [qtp1723848804-22] xwork2.DefaultActionProxy 
(DefaultActionProxy.java:89) - Creating an DefaultActionProxy for namespace [/] 
and action name [index]



> Aso please be aware that only with the Convention plugin you will get 
> automatic "index" action handling [2]
> 
> [1] 
> https://github.com/apache/struts/blob/master/core/src/main/resources/struts-default.xml#L391
>  
> 
> [2] https://struts.apache.org/plugins/convention/#introduction 
> 
> 
You don’t use the plugin convention in this example


I don’t understand 







Re: log4j problem

2017-12-29 Thread José Antonio Delgado Trujillo
> MG>before you restart did you deploy your struts-basic*.war to 
> server/default/deploy folder?

JD> mvn wildly:deploy put the war in the folder deploy



> MG>display struts.xml to determine mapping for namespace “/

JD> I clone the trust-exmple GitHub. I haven’t modify anything.


> MG>namespace might look something like e.g.
>   would be included in namespace definition)
> MG>e.g.
> MG> 
> MG>indicates BasicStrutsAction.java is either not compiled  or 
> BasicStrutsAction.class is not on $CLASSPATH?

Your action node is action class less

/index.jsp



So Struts2 because they don’t find any action class redirect to index.jsp
The log that is expected is ...







Re: log4j problem

2017-12-29 Thread José Antonio Delgado Trujillo
I don’t know how to recompile lot with runtime jdk provided by JBOSS
I rm log, data, tmp folders
restart wildfly, clean and deploy basic-struts, and when i put in the browser
localhost:8080/basic-struts/index.action
I see the Welcome to Struts 2 jsp 

But i read in the console of wildly the next ..

18:48:30,252 INFO  [stdout] (default task-3) 2017-12-29 18:48:30,228 ERROR 
[default task-3] dispatcher.Dispatcher (Dispatcher.java:609) - Could not find 
action or result: /basic-struts/
18:48:30,253 INFO  [stdout] (default task-3) 
com.opensymphony.xwork2.config.ConfigurationException: There is no Action 
mapped for namespace [/] and action name [] associated with context path 
[/basic-struts].
18:48:30,254 INFO  [stdout] (default task-3)at 
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:195) 
~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3)at 
org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:57) 
~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3)at 
org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:32)
 ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3)at 
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:60)
 ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3)at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) 
~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3)at 
org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79)
 ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3)at 
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:141)
 ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3)at 
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) 
~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,256 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
 ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,256 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) 
~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,257 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
 ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,257 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
 ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,258 INFO  [stdout] (default task-3)at 
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
 ~[?:?]
18:48:30,258 INFO  [stdout] (default task-3)at 
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
 ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
 ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3)at 
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
 ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3)at 
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
 ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
 ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3)at 
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
 ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3)at 
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
 ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3)at 
io.undertow.security.handler

Re: log4j problem

2017-12-29 Thread José Antonio Delgado Trujillo
After clone the GitHub and deploy basic-struts in Wildly:

log4j is in lib folder
It isn’t any log4j output after test in the browser 
(localhost:8080/basic-struts/index.action)
I don’t think is a level problem in WildFly because...

If i did manually the first project basic-struts i can see more info log than 
the 2 in the tutorial.
I realise that when i deploy the project (man wildly:deploy) i found a warning 
about log4j-api

14:21:11,532 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) 
WFLYSRV0003: Could not index class module-info.class at 
/content/basic.war/WEB-INF/lib/log4j-api-2.10.0.jar: 
java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 24
at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1417)
at org.jboss.jandex.Indexer.index(Indexer.java:1451)
at 
org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
at 
org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
at 
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

What is it happening?



log4j problem

2017-12-29 Thread José Antonio Delgado Trujillo
I was testing the tutorial Getting Started, i cloned the GitHub strut-examples 
in Eclipse and i am using Wildly container (i only change the POM plugin to use 
wildly-maven-plugin).
I can deploy an run correctly the most of module but i can’t see any log 
information in the server console.
What can it be happen?
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Unable to load configuration

2016-06-08 Thread José Antonio Delgado Trujillo
BIZARRE :C

I changed my POM for some simple build section only:

   - maven-war-plugin
   - maven-compiler-plugin



Way 1 - FAIL
Run AS / Run on Server

Way 2 -  CORRECT
1. Run AS / Maven Install
2. Run AS / Run on Server

Way 3 - CORRECT
1. mvn install (from console batch)
2. add the war (from console server)

I thought way 1 was the same  way 2.
But It was something with Run on server when the war no was created
previousy.

The most bizarre was the problem changed (and i don't know why):
  - It could't  instantiate the filter.
  - It couldn't found Log4j class.
  - Something wrong with the struts.xml


Thanks for your time (both Martin and Lukasz)

Regards

2016-06-08 18:21 GMT+01:00 Lukasz Lenart :

> 2016-06-08 18:40 GMT+02:00 José Antonio Delgado Trujillo <
> jadt...@gmail.com>:
> >>How did you deploy your app to Wildfly? Looks like there is no such
> >>class in WAR/EAR
> > I usually choose between two things:
> >
> > run on the server -- in the Eclipse IDE Mars2
> > maven/install and then add the war in the serverRuntime -- in the IDE
>
> There was many issues with deploying WAR by Eclipse, try to do it manually
>
> > Sure the war is deployed but i think is malformed when i saw the trace
> (file
> > attached) i found Dispatcher initialization failed.
> >
> > My pom was created by cero adding the dependencies and some building
> > comparing POM's archetype struts.
> >
> > I can't see any strange so i am blocked!!!
>
> The simplest way is to unpack the WAR and see its content
>
>
> 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
>
>


-- 
Un saludo,
José A.


Re: Unable to load configuration

2016-06-08 Thread José Antonio Delgado Trujillo
Upss
if i created first the war (maven install) and then add in the server maybe
run correctly.
if i use Run on server failed.

Is it the problem the missing of wildfly-maven-plugin in the POM in the
build section?

2016-06-08 17:40 GMT+01:00 José Antonio Delgado Trujillo 
:

> >How did you deploy your app to Wildfly? Looks like there is no such
> >class in WAR/EAR
> I usually choose between two things:
>
>- run on the server -- in the Eclipse IDE Mars2
>- maven/install and then add the war in the serverRuntime -- in the
>IDE
>
> Sure the war is deployed but i think is malformed when i saw the trace
> (file attached) i found Dispatcher initialization failed.
>
> My pom was created by cero adding the dependencies and some building
> comparing POM's archetype struts.
>
> I can't see any strange so i am blocked!!!
>
> > Linea Nueve>donde verysimple.jsp?Linea Nueve>where is verysimple.jsp?
> verysimple.jso is in under folder src/main//webapp/WEB-INF/jsps
>
> Thanks Lukasz and Martin
>
> Regards
> José A.
>
> 2016-06-08 5:41 GMT+01:00 Lukasz Lenart :
>
>> 2016-06-07 23:10 GMT+02:00 José Antonio Delgado Trujillo <
>> jadt...@gmail.com>:
>> > *Stack Trace*
>> > Unable to load configuration. - action -
>> >
>> vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
>> > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)
>> >
>> > --
>> >
>> >
>> > 9:74 ---> is the line of the action name and class are correctly
>> >
>> > Why?
>>
>> How did you deploy your app to Wildfly? Looks like there is no such
>> class in WAR/EAR
>>
>>
>> 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
>>
>>
>
>
> --
> Un saludo,
> José A.
>



-- 
Un saludo,
José A.


Re: Unable to load configuration

2016-06-08 Thread José Antonio Delgado Trujillo
>How did you deploy your app to Wildfly? Looks like there is no such
>class in WAR/EAR
I usually choose between two things:

   - run on the server -- in the Eclipse IDE Mars2
   - maven/install and then add the war in the serverRuntime -- in the IDE

Sure the war is deployed but i think is malformed when i saw the trace
(file attached) i found Dispatcher initialization failed.

My pom was created by cero adding the dependencies and some building
comparing POM's archetype struts.

I can't see any strange so i am blocked!!!

> Linea Nueve>donde verysimple.jsp?Linea Nueve>where is verysimple.jsp?
verysimple.jso is in under folder src/main//webapp/WEB-INF/jsps

Thanks Lukasz and Martin

Regards
José A.

2016-06-08 5:41 GMT+01:00 Lukasz Lenart :

> 2016-06-07 23:10 GMT+02:00 José Antonio Delgado Trujillo <
> jadt...@gmail.com>:
> > *Stack Trace*
> > Unable to load configuration. - action -
> >
> vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
> > org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)
> >
> > --
> >
> >
> > 9:74 ---> is the line of the action name and class are correctly
> >
> > Why?
>
> How did you deploy your app to Wildfly? Looks like there is no such
> class in WAR/EAR
>
>
> 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
>
>


-- 
Un saludo,
José A.
http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";>
	4.0.0
	pfc.struts2
	example
	0.0.1-SNAPSHOT
	war
	Examples Struts2
	Example to test the framework Struts2
	
		
			org.apache.struts
			struts2-core
			2.5
		
		
			org.apache.struts
			struts2-config-browser-plugin
			2.5
		
		
			org.apache.logging.log4j
			log4j-core
			2.5
		
		
			javax.servlet
			javax.servlet-api
			4.0.0-b01
		
		
			javax.servlet.jsp
			jsp-api
			2.2.1-b03
		
	



	
		
			
maven-compiler-plugin
3.3

	UTF-8
	1.8
	1.8

			
			
org.mortbay.jetty
jetty-maven-plugin
8.1.16.v20140903

	CTRL+C
	8999
	
		
			xwork.loggerFactory
			com.opensymphony.xwork2.util.logging.log4j2.Log4j2LoggerFactory
		
	
	10
	${basedir}/src/main/webapp/
	
		${basedir}/src/main/webapp/WEB-INF/web.xml
	

			
		
	

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

Unable to load configuration

2016-06-07 Thread José Antonio Delgado Trujillo
I have been wasted all this afternoon with a strange error.

My app only have an action called VerySimpleAction.
I configured in the struts.xml

-



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











/WEB-INF/jsps/verysimple.jsp







-

I deployed in the wildly server and i put in the browser:

localhost:8080/example/verysimple.action


I found the strange error.


--
Context Path:
/example


Servlet Path:
/verysimple.action


Path Info:
null


Query String:
null


*Stack Trace*
Unable to load configuration. - action -
vfs:/Users/jdeltru/PFC/wildfly-10.0.0.Final/standalone/deployments/example.war/WEB-INF/classes/struts.xml:9:74
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:491)

--


9:74 ---> is the line of the action name and class are correctly

Why?

The action class exist in the package pfc.struts2.example




Un saludo,
José A.


Re: Convention plugin

2016-03-25 Thread José Antonio Delgado Trujillo

> On 25 Mar 2016, at 06:29, Lukasz Lenart  wrote:
> 
> I don't really understand what do you mean by that,


In the example annotations there are two index.jsp files (one in the /webapp 
and another in /webapp/content).

The first redirect the response to “index”
i suppose that this redirect to /webapp/content/index.jsp (but i don’t know 
why).

In hello-success.jsp and register-success.jsp they are URL action to index.
There isn’t IndexAction class so i don’t know what the framework will do by 
default.
I read the convention plugin documentation i understood the next:

action url -> hello
action class -> */actions/HelloAction.class
(result=input), response -> /webapp/content/hello-input.jsp

But what happens if the framework doesn’t find the action class.


In my case i had the action class in the package 
/pfc/struts2/annotations/actions so i had to use the 
namespace=/annotations/actions in the url and i put the jsp in 
/webapp/content/annotations/actions
The url index in jsp files doesn’t go to /webapp/index.

Un saludo,
José A



 

Re: Spring Struts problem

2016-03-24 Thread José Antonio Delgado Trujillo
> 
> You must define also scope="prototype" as Struts actions cannot be singletons
> 

There is nothing about that in the tutorial
https://cwiki.apache.org/confluence/display/WW/Spring+and+Struts+2 

> You shouldn't mix Struts versions.
> 
Sure but there is not 2.3.28 version to struts-spring-plugin.
The new time i’ll use the lasted version 2.5 of the arquetype.


> Can you share struts.xml as well?
> 
Upss!!
I found the mistake, a question of uppercase (in the struts.xml the name of the 
class action began with lowercase). I’m stupid, i realised when i saw the debug 
error. SORRY for your time !!!
Now it runs and without the scope.


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








   


/index.jsp



/edit.jsp



/thankyou.jsp
/edit.jsp






Thanks a lot and SORRY :C



Convention plugin

2016-03-24 Thread José Antonio Delgado Trujillo
I was trying with the convention plugin and the example in the gitHub.

My actions class are in the package pfc.struts2.annotations.actions so the 
namespaces of the URL is /annotations/actions.
I put the files jsp in /webapp/content/annotations/actions except the second 
index.jsp which is in/webapp/content.


All is OK, the url action go well but ...

Now i have a problem with the url to return to index.
There is no index action so i don’t know how to fix the problem without change 
the package of the actions.

">Return to home page.


I think the best is to use the annotations.



Re: Spring Struts problem

2016-03-24 Thread José Antonio Delgado Trujillo
> 
> Can you share your config?

My applicationContext.xml is…


http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd";>







The listener in the web.xml


org.springframework.web.context.ContextLoaderListener
 

The dependency in the POM …
 
org.apache.struts
struts2-spring-plugin
2.3.24


Could it be a conflict whit the version of struts2? (in this case i used 2.3.28 
that it was the default of the arquetype blank).

Re: Specific Exception Handling

2016-03-22 Thread José Antonio Delgado Trujillo
OK,
I saw in the github the URL cause actions exceptions in the index,jsp but i
dont't still understand the two result in the actionspecificexption.

2016-03-22 20:13 GMT+00:00 José Antonio Delgado Trujillo 
:

> In the example of exception - handling explains how to configure an
> specific exception for an action.
>
> It is simple, only write the exception-mapping into the action node. But i
> don't know how it works and why we need two result nodes.
>
> [image: Imágenes integradas 1]
>
> I understood that if the method throwSecurityException of the Register
> class throws SecurityBreachException, the action returns the result login
> and then it redirects to login.jsp but:
>
>
>- In which part of the app use the URL action actionspecificexeption?
>- If the method throwsSecurityException always throws
>SecurityBreachException why do we need the other result?
>
>
>
> --
> Un saludo,
> José A.
>



-- 
Un saludo,
José A.


Specific Exception Handling

2016-03-22 Thread José Antonio Delgado Trujillo
In the example of exception - handling explains how to configure an
specific exception for an action.

It is simple, only write the exception-mapping into the action node. But i
don't know how it works and why we need two result nodes.

[image: Imágenes integradas 1]

I understood that if the method throwSecurityException of the Register
class throws SecurityBreachException, the action returns the result login
and then it redirects to login.jsp but:


   - In which part of the app use the URL action actionspecificexeption?
   - If the method throwsSecurityException always throws
   SecurityBreachException why do we need the other result?



-- 
Un saludo,
José A.


Re: Log4j dtd

2016-03-22 Thread José Antonio Delgado Trujillo
Thanks Lukasz for the link about log4j2 and Martin for log4j.xml in Eclipse.
I have the log4j.xml in /src/main/resource and the warning is about the
validation of the XML. Eclipse can't locate log4j.dtd and is looking for it
in /src/main/java.

It is only a warning, i can see the log message in the console.


2016-03-21 22:44 GMT+00:00 Martin Gainty :

> Eclipse cleans classes folder so perhaps put a copy of log4j.xml into \src
> ?
> For maven put a copy of log4j.xml into \src\main\resources
> http://stackoverflow.com/questions/9554805/log4j-xml-in-eclipse
> Saludos/
> Martín
> __
>
>
>
> > From: jadt...@gmail.com
> > Subject: Re: Log4j dtd
> > Date: Mon, 21 Mar 2016 22:21:28 +
> > To: user@struts.apache.org
> >
> > Well there are some difference between the online documentation tutorial
> basic-struts and the github examples.
> >
> > In the documentation
> > log4j.xml
> > and in the pom the dependency log4j as artifactId.
> >
> > In the github
> > lo4j2.xml
> > and in the pom the dependency log4j-core like artifactId
> >
> > i used the first, i find log4j.jar in my local repository but i still
> see the Eclipse warning in the xml file
> > (file cannot be validated as the XML definition) Eclipse look up in the
> workspace for log4j.dtd
> >
> > Why Eclipse doesn't find did file in the log4j.jar?
> > Is there an important difference between log4j and log4j2?
> >
> >
> >
> > > On 21 Mar 2016, at 19:44, Lukasz Lenart 
> wrote:
> > >
> > > 2016-03-21 19:00 GMT+01:00 José Antonio Delgado Trujillo <
> jadt...@gmail.com>:
> > >> Hi,
> > >>
> > >> i'm doing the getting started struts2 tutorial and i have a warning
> message with log4j.xml file.
> > >>
> > >> In the tutorial the second line in log4j.xml is
> > >>
> > >>  Configuration//EN" "log4j.dtd">
> > >>
> > >> but eclipse can't located log4j.dtd in my workspace.
> > >>
> > >> How can i fix the problem?
> > >> isn't there a external place to locate log4j.dtd?
> > >
> > > It should be inside a jar with Log4j and why Log4j and not Log4j2?
> > >
> > >
> > > 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
> > >
> >
>
>



-- 
Un saludo,
José A.


Re: Log4j dtd

2016-03-21 Thread José Antonio Delgado Trujillo
Well there are some difference between the online documentation tutorial 
basic-struts and the github examples.

In the documentation
log4j.xml
and in the pom the dependency log4j as artifactId.

In the github
lo4j2.xml
and in the pom the dependency log4j-core like artifactId

i used the first, i find log4j.jar in my local repository but i still see the 
Eclipse warning in the xml file
(file cannot be validated as the XML definition) Eclipse look up in the 
workspace for log4j.dtd

Why Eclipse doesn’t find did file in the log4j.jar?
Is there an important difference between log4j and log4j2?


 
> On 21 Mar 2016, at 19:44, Lukasz Lenart  wrote:
> 
> 2016-03-21 19:00 GMT+01:00 José Antonio Delgado Trujillo :
>> Hi,
>> 
>> i’m doing the getting started struts2 tutorial and i have a warning message 
>> with log4j.xml file.
>> 
>> In the tutorial the second line in log4j.xml is
>> 
>> > "log4j.dtd”>
>> 
>> but eclipse can’t located log4j.dtd in my workspace.
>> 
>> How can i fix the problem?
>> isn’t there a external place to locate log4j.dtd?
> 
> It should be inside a jar with Log4j and why Log4j and not Log4j2?
> 
> 
> 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
> 



Log4j dtd

2016-03-21 Thread José Antonio Delgado Trujillo
Hi,

i’m doing the getting started struts2 tutorial and i have a warning message 
with log4j.xml file.

In the tutorial the second line in log4j.xml is



but eclipse can’t located log4j.dtd in my workspace.

How can i fix the problem?
isn’t there a external place to locate log4j.dtd?

Re: Annotation example

2015-11-10 Thread José Antonio Delgado Trujillo
I did it ( put the relative path).
Now the error is another.
The web page has a redirect loop
ERR_TO_MANY_REDIRECT.

I don’t understand what’s happening.


If i delete the /webapp/index.jsp and the welcome file list in web.xml then all 
it’s OK

I put in the browser 
localhost:8080/annotations
or
localhost:8080/annotations/index
or
localhost:8080/annotations/index.action

and i can see the /WEB-INF/content/index.jsp

I suppose that is because the convention plugin knows the name action index 
like an actionless result so lookup into content folder to render index.jsp

So the convention plugin works but something strange happen with sendRedirect.

Regards,
José A.

> On 10 Nov 2015, at 13:18, Lukasz Lenart  wrote:
> 
> Issue fixed, do as Chris said! Just pushed fix to Git with relative
> path (<% response.sendRedirect("index"); %>) instead of absolute (<%
> response.sendRedirect("/index"); %>) - thanks Chris!
> 
> 2015-11-10 9:04 GMT+01:00 José Antonio Delgado Trujillo :
>> I use mvn package and then put the war in the deployment folder of wildfly
>> 9.
>> El 10/11/2015 6:42, "Lukasz Lenart"  escribió:
>> 
>>> 2015-11-09 21:13 GMT+01:00 José Antonio Delgado Trujillo <
>>> jadt...@gmail.com>:
>>>> i have the same in the /webapp/index
>>>> But i have modified the POM
>>>> i compile with maven but i use wildly as server.
>>> 
>>> Which Wildfly version do you use? And I assume that it works with "mvn
>>> jetty:run" for you?
>>> 
>>> 
>>> 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
>>> 
>>> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 


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



Re: Annotation example

2015-11-10 Thread José Antonio Delgado Trujillo
I use mvn package and then put the war in the deployment folder of wildfly
9.
El 10/11/2015 6:42, "Lukasz Lenart"  escribió:

> 2015-11-09 21:13 GMT+01:00 José Antonio Delgado Trujillo <
> jadt...@gmail.com>:
> > i have the same in the /webapp/index
> > But i have modified the POM
> > i compile with maven but i use wildly as server.
>
> Which Wildfly version do you use? And I assume that it works with "mvn
> jetty:run" for you?
>
>
> 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
>
>


Re: Annotation example

2015-11-09 Thread José Antonio Delgado Trujillo
i have the same in the /webapp/index
But i have modified the POM
i compile with maven but i use wildly as server.



> On 09 Nov 2015, at 19:30, Lukasz Lenart  wrote:
> 
> Are you sure that you use the latest version from Git? Because 
> webapp/index.jsp looks like this
> 
> <% response.sendRedirect("/index"); %>
> 
> see and I have no problems on Jetty (mvn jetty:run)
> 
> [1] 
> https://github.com/apache/struts-examples/blob/master/annotations/src/main/webapp/index.jsp
>  
> <https://github.com/apache/struts-examples/blob/master/annotations/src/main/webapp/index.jsp>
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122  http://www.lenart.org.pl/ 
> <http://www.lenart.org.pl/>
> 
> 2015-11-09 20:00 GMT+01:00 José Antonio Delgado Trujillo  <mailto:jadt...@gmail.com>>:
> I don`t know what is the problem.
> It’s the example annotations of Getting Started Tutorial.
> 
> https://github.com/apache/struts-examples/tree/master/annotations 
> <https://github.com/apache/struts-examples/tree/master/annotations>
> 
> 
> Convention plugin is set enable with maven dependency.
> all jsp are into /WEB-INF/content folder
> The action class are into package structure that ends in action.
> The action class use the name of the action ending in Action.
> 
> The example use the url 
> http:localhost:8080/annotations
> 
> There is a welcome file index.jsp into /webapp folder but these file only 
> resend the request to /index.jsp
> 
> 
> 
> And into the /WEB-INF/content is another index.jsp which has the index of the 
> application (in this case two link associated with two actions.
> 
> 
> 
> I put in the browser http://localhost/annotations 
> <http://localhost/annotations> but the response is
> 404 - NOT FOUND
> and i saw in the browser the URL
> 
> Why it does´t find index.jsp
> 
> I thought reading the convention plugin documentation that…
> the action index is an actionless result (has neither action class nor 
> result) so by default the convention plugin look into 
> /WEB-INF/content/index.jsp
> 
> What is happening?
> Why the error message NOT FOUND?
> 
> 
>> On 09 Nov 2015, at 07:02, Lukasz Lenart > <mailto:lukaszlen...@apache.org>> wrote:
>> 
>> 2015-11-08 22:03 GMT+01:00 José Antonio Delgado Trujillo > <mailto:jadt...@gmail.com>>:
>>> I’ve problem with the annotation example.
>>> 
>>> I’ve added the convention-plugin dependency in my POM.
>>> But when i put localhost:8080/annotations/index tsp the result is NOT FOUND 
>>> PAGE
>>> 
>>> However when i copy the index.jsp in /src/main/webapp all is correct.
>>> 
>>> What is happening?
>> 
>> but it works now, right? Not sure what was your problem, all JSP files
>> should be located in /WEB-INF/content and they will be used based on
>> requested action and returned result
>> 
>> http://struts.apache.org/docs/convention-plugin.html#ConventionPlugin-Resultsandresultcodes
>>  
>> <http://struts.apache.org/docs/convention-plugin.html#ConventionPlugin-Resultsandresultcodes>
>> 
>> 
>> Regards
>> -- 
>> Łukasz
>> + 48 606 323 122  http://www.lenart.org.pl/ 
>> <http://www.lenart.org.pl/>
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org 
>> <mailto:user-unsubscr...@struts.apache.org>
>> For additional commands, e-mail: user-h...@struts.apache.org 
>> <mailto:user-h...@struts.apache.org>
>> 
> 
> 
> 



Re: Annotation example

2015-11-09 Thread José Antonio Delgado Trujillo
I don`t know what is the problem.
It’s the example annotations of Getting Started Tutorial.

https://github.com/apache/struts-examples/tree/master/annotations 
<https://github.com/apache/struts-examples/tree/master/annotations>


Convention plugin is set enable with maven dependency.
all jsp are into /WEB-INF/content folder
The action class are into package structure that ends in action.
The action class use the name of the action ending in Action.

The example use the url 
http:localhost:8080/annotations

There is a welcome file index.jsp into /webapp folder but these file only 
resend the request to /index.jsp



And into the /WEB-INF/content is another index.jsp which has the index of the 
application (in this case two link associated with two actions.



I put in the browser http://localhost/annotations 
<http://localhost/annotations> but the response is
404 - NOT FOUND
and i saw in the browser the URL

Why it does´t find index.jsp

I thought reading the convention plugin documentation that…
the action index is an actionless result (has neither action class nor result) 
so by default the convention plugin look into /WEB-INF/content/index.jsp

What is happening?
Why the error message NOT FOUND?


> On 09 Nov 2015, at 07:02, Lukasz Lenart  wrote:
> 
> 2015-11-08 22:03 GMT+01:00 José Antonio Delgado Trujillo :
>> I’ve problem with the annotation example.
>> 
>> I’ve added the convention-plugin dependency in my POM.
>> But when i put localhost:8080/annotations/index tsp the result is NOT FOUND 
>> PAGE
>> 
>> However when i copy the index.jsp in /src/main/webapp all is correct.
>> 
>> What is happening?
> 
> but it works now, right? Not sure what was your problem, all JSP files
> should be located in /WEB-INF/content and they will be used based on
> requested action and returned result
> 
> http://struts.apache.org/docs/convention-plugin.html#ConventionPlugin-Resultsandresultcodes
> 
> 
> 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
> 



Re: Annotation example

2015-11-09 Thread José Antonio Delgado Trujillo
OK,
In the example annotations of Getting started tutorial the POM set the default

All the jsp are into /WEB-INF/content



> On 08 Nov 2015, at 23:47, Martin Gainty  wrote:
> 
>  – By default, this is set to 
> ${basedir}/src/main/webapp. If your static sources are in a different 
> location, set this parameter 
> accordingly.https://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin#Multiple_webapp_root_directories
> 
> ?
> Saludos
> Martín
>  
> 
> 
> 
>> From: jadt...@gmail.com
>> Subject: Annotation example
>> Date: Sun, 8 Nov 2015 21:03:13 +
>> To: user@struts.apache.org
>> 
>> I’ve problem with the annotation example.
>> 
>> I’ve added the convention-plugin dependency in my POM.
>> But when i put localhost:8080/annotations/index tsp the result is NOT FOUND 
>> PAGE
>> 
>> However when i copy the index.jsp in /src/main/webapp all is correct.
>> 
>> I’m using wildly 9 as server.
>> My POM is:
>> 
>> http://maven.apache.org/POM/4.0.0"; 
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
>> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>>4.0.0
>>pfc.struts2
>>annotations
>>0.0.1-SNAPSHOT
>>war
>> 
>>
>>2.5-BETA2
>>2.3
>>UTF-8
>>
>> 
>>
>> 
>> 
>> 
>> 
>>
>>  org.apache.struts
>>  struts2-convention-plugin
>>  2.5-BETA2
>>
>>
>>  javax.servlet
>>  javax.servlet-api
>>  3.1.0
>>
>>
>>  org.apache.struts
>>  struts2-core
>>  2.5-BETA2
>>
>>
>>  org.apache.logging.log4j
>>  log4j-core
>>  2.3
>>
>>
>> 
>>
>>
>>
>>maven-compiler-plugin
>>3.3
>>
>>UTF-8
>>1.8
>>1.8
>>
>>
>>
>>org.mortbay.jetty
>>jetty-maven-plugin
>>8.1.16.v20140903
>>
>>CTRL+C
>>8999
>>
>>
>>xwork.loggerFactory
>>
>> com.opensymphony.xwork2.util.logging.log4j2.Log4j2LoggerFactory
>>
>>
>>10
>>
>> ${basedir}/src/main/webapp/
>>
>>
>> ${basedir}/src/main/webapp/WEB-INF/web.xml
>>
>>
>>
>>
>>
>>Annotations
>>Example Struts2 Application using annotationsand convention 
>> plugin.
>> 
>> 
>> What is happening?
> 



Annotation example

2015-11-08 Thread José Antonio Delgado Trujillo
I’ve problem with the annotation example.

I’ve added the convention-plugin dependency in my POM.
But when i put localhost:8080/annotations/index tsp the result is NOT FOUND PAGE

However when i copy the index.jsp in /src/main/webapp all is correct.

I’m using wildly 9 as server.
My POM is:

http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
4.0.0
pfc.struts2
annotations
0.0.1-SNAPSHOT
war


2.5-BETA2
2.3
UTF-8








org.apache.struts
struts2-convention-plugin
2.5-BETA2


javax.servlet
javax.servlet-api
3.1.0


org.apache.struts
struts2-core
2.5-BETA2


org.apache.logging.log4j
log4j-core
2.3






maven-compiler-plugin
3.3

UTF-8
1.8
1.8



org.mortbay.jetty
jetty-maven-plugin
8.1.16.v20140903

CTRL+C
8999


xwork.loggerFactory

com.opensymphony.xwork2.util.logging.log4j2.Log4j2LoggerFactory


10

${basedir}/src/main/webapp/


${basedir}/src/main/webapp/WEB-INF/web.xml





Annotations
Example Struts2 Application using annotationsand convention 
plugin.


What is happening?