Re: validation checkboxlist

2018-01-09 Thread José Antonio Delgado Trujillo
e 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!) > > >&g

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[per

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 > > s

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 annot

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 proble

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

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

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 cl

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

Re: Populate nested properties

2018-01-03 Thread José Antonio Delgado Trujillo
n 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; >> ... >> } >> >> p

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

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

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 e

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

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

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/ind

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>namespac

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 ..

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 i

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 ca

Re: Unable to load configuration

2016-06-08 Thread José Antonio Delgado Trujillo
und 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? L

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

Re: Unable to load configuration

2016-06-08 Thread José Antonio Delgado Trujillo
p?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

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 --

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 /w

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 vers

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/weba

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

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 &g

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 metho

Re: Log4j dtd

2016-03-22 Thread José Antonio Delgado Trujillo
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 T

Re: Log4j dtd

2016-03-21 Thread José Antonio Delgado Trujillo
? > 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

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
> 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" escr

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 h

Re: Annotation example

2015-11-09 Thread José Antonio Delgado Trujillo
ter/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 kno

Re: Annotation example

2015-11-09 Thread José Antonio Delgado Trujillo
hy 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

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

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:/