Re: Best Advanced Struts2 Book

2013-06-21 Thread Muralidhar Yaragalla
The following is the best

http://struts.apache.org/release/2.3.x/docs/home.html

There is nothing better than this.

*Thanks And Regards,*
Muralidhar Yaragalla.*
(Visit My Blog http://yaragalla.blogspot.in)
*


On Fri, Jun 21, 2013 at 7:01 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:

 Can anyone suggest a best advanced Struts2 book available now (with all
 recent updates of struts2)

 And any link pointing to Best Practices and Performance tuning for latest
 struts2



Re: common validator

2013-03-26 Thread Muralidhar Yaragalla
have u tried PreparedStatement and see how it goes with SQL injection.
Long back i have done some work on this. So I dont remember exactly but i
think this can solve.


On Wed, Mar 27, 2013 at 3:45 AM, J.V. jvsr...@gmail.com wrote:

 I have to add checking each and every form field in my application for sql
 injection attacks (I need a method that will return a boolean false if any
 character that is typically used in sql injection is found).

 Each of my form classes has a validator() method.  I was thinking of
 creating my own abstract form class

 public abstract MyBaseForm() extends DynaValidatorForm {

 public boolean validateSQL(String[] fields) {
 // do checks here and return true or false
}
 }

 
 and then modify all my form classes to extend MyBaseForm (which extends
 DynaValidatorForm() and in each of my existing Form classes call
 validateSQL() as the first call of each now existing validator() method.

 This will be a lot of work because there are over 100 forms and 500+
 fields, is there an easier way?  I thought that using the Apache commons
 validator plugin would be best but was told that the validator() method in
 each form class is preferred, but it is turning out to be more work than
 expected.

 Any/all other options would be helpful.

 thanks


 J.V.

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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: How to validate multiple fields with the same name

2013-03-25 Thread Muralidhar Yaragalla
Hi Thanks for this.But i am aware of this info I mean the normal validation
methods. I repeat and the important point is that all the 4 fields i have
contains the same name so how do i do that in an xml. I know that it can be
done inside valiadtion() method. I thought so much but it looks impossible
for me to do in validation.xml file using validators.


On Mon, Mar 25, 2013 at 1:44 PM, Pranava Swaroop
stalin.pran...@gmail.comwrote:

 Murali , Apologies its not exactly interceptors, Two ways we can validate
 the input fields , one is using the configuration set for each of the
 fields and the other is programatic way.

 For example say we need to create a validation xml for user login, we
 create User-validation.xml (Format is Action-validation.xml for different
 classes). I just referred few inbuilt validators in the struts 2 site and
 below are the ones


-

  required validator.
 -

  requiredstring validator
 -

  int validator
 -

  date validator
 -

  expression validator
 -

  fieldexpression validator
 -

  email validator
 -

  url validator
 -

  visitor validator
 -

  conversion validator
 -

  stringlength validator
 -

  regex validator

And these dont require registration when you are using them in your
application. Just add the action validation xml to the classes
 directory.
It works


 !DOCTYPE validators PUBLIC
 -//OpenSymphony Group//XWork Validator 1.0.2//EN 
 http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
 validators
 field name=userName
 field-validator type=requiredstring
 messageUsername is required/message
 /field-validator
 /field
 field name=password
 field-validator type=requiredstring
 messagePassword is required/message
 /field-validator
 /field
 /validators

 This is one of the easiest solutions to isolate the most commonly used
 validations for the fields using configuration in struts2.

 Hope this helps. Thanks

 On 25 March 2013 16:25, Muralidhar Yaragalla java.yaraga...@gmail.com
 wrote:

  Hi can you explain in brief how to do with interceptor(built in)?
 
 
  On Mon, Mar 25, 2013 at 2:13 AM, Pranava Swaroop
  stalin.pran...@gmail.comwrote:
 
   It could be done with buit in interceptors using configuration files or
   using the programming
  
   On Monday, 25 March 2013, Muralidhar Yaragalla wrote:
  
Hi In my form i have 4 textfields with the same name so how do i
  validate
this using validation frame work. The validation for this 4 fields
 is,
   out
of 4 fields 2 fields are mandatory and no field should contain
 special
characters. So can this be done using validation frame work or do i
  have
   to
do custom valiation in my validate()  method inside action class.
   
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
   
  
  
   --
   Keep looking Don't Settle
  
 
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 



 --
 Warm Regards
 Pranava S Balugari

 Keep Looking Don't Settle




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: How to validate multiple fields with the same name

2013-03-25 Thread Muralidhar Yaragalla
Hi thanks for this. It is really helpful.


On Tue, Mar 26, 2013 at 12:13 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/25 Muralidhar Yaragalla java.yaraga...@gmail.com:
  Hi Thanks for this.But i am aware of this info I mean the normal
 validation
  methods. I repeat and the important point is that all the 4 fields i have
  contains the same name so how do i do that in an xml. I know that it can
 be
  done inside valiadtion() method. I thought so much but it looks
 impossible
  for me to do in validation.xml file using validators.

 But in action is just one field? eg. private ListString values? So
 the field name is values and you can use expression validator to have
 at least to fields filled:

 field name=values
 field-validator type=fieldexpression
 param name=expression(values.size  1)/param
 message![CDATA[ at least two values are
 required ]]/message
 /field-validator
 /field


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


How to validate multiple fields with the same name

2013-03-24 Thread Muralidhar Yaragalla
Hi In my form i have 4 textfields with the same name so how do i validate
this using validation frame work. The validation for this 4 fields is, out
of 4 fields 2 fields are mandatory and no field should contain special
characters. So can this be done using validation frame work or do i have to
do custom valiation in my validate()  method inside action class.

-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: How to validate multiple fields with the same name

2013-03-24 Thread Muralidhar Yaragalla
Hi can you explain in brief how to do with interceptor(built in)?


On Mon, Mar 25, 2013 at 2:13 AM, Pranava Swaroop
stalin.pran...@gmail.comwrote:

 It could be done with buit in interceptors using configuration files or
 using the programming

 On Monday, 25 March 2013, Muralidhar Yaragalla wrote:

  Hi In my form i have 4 textfields with the same name so how do i validate
  this using validation frame work. The validation for this 4 fields is,
 out
  of 4 fields 2 fields are mandatory and no field should contain special
  characters. So can this be done using validation frame work or do i have
 to
  do custom valiation in my validate()  method inside action class.
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 


 --
 Keep looking Don't Settle




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


question on results?

2013-03-23 Thread Muralidhar Yaragalla
Hi In my action class i need to get all the results mapped to that
particular action calss, how to do that?

-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


when to use Action Errors and ActionMessages

2013-03-21 Thread Muralidhar Yaragalla
Hi when should we add an action error or action message. I understood field
error. It as to be added in validate method when there is any field error
in the form( I mean validation error) but when to use other?

-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: when to use Action Errors and ActionMessages

2013-03-21 Thread Muralidhar Yaragalla
So even if it has action errors or action messages the execute method of
action class will not be called is it?


On Fri, Mar 22, 2013 at 12:50 AM, Chris Pratt thechrispr...@gmail.comwrote:

 Same time, during validation.  They are just non-field specific.  So If you
 have an error (or informational message) to deliver to the user you would
 use these methods.
   (*Chris*)


 On Thu, Mar 21, 2013 at 12:16 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Hi when should we add an action error or action message. I understood
 field
  error. It as to be added in validate method when there is any field error
  in the form( I mean validation error) but when to use other?
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: when to use Action Errors and ActionMessages

2013-03-21 Thread Muralidhar Yaragalla
Thank you so much.


On Fri, Mar 22, 2013 at 1:47 AM, Chris Pratt thechrispr...@gmail.comwrote:

 If it has action messages, everything proceeds as usual.  If it has action
 errors, the validation system exits with the return code input.
   (*Chris*)


 On Thu, Mar 21, 2013 at 1:06 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  So even if it has action errors or action messages the execute method of
  action class will not be called is it?
 
 
  On Fri, Mar 22, 2013 at 12:50 AM, Chris Pratt thechrispr...@gmail.com
  wrote:
 
   Same time, during validation.  They are just non-field specific.  So If
  you
   have an error (or informational message) to deliver to the user you
 would
   use these methods.
 (*Chris*)
  
  
   On Thu, Mar 21, 2013 at 12:16 PM, Muralidhar Yaragalla 
   java.yaraga...@gmail.com wrote:
  
Hi when should we add an action error or action message. I understood
   field
error. It as to be added in validate method when there is any field
  error
in the form( I mean validation error) but when to use other?
   
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
   
  
 
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
I tried with what you suggested. This gives different problem. I don't
think we should think about cdata and all. regex means it should be just
regex.

kindly help in resolving this issue.


On Tue, Mar 19, 2013 at 1:17 PM, Maurizio Cucchiara
mcucchi...@apache.orgwrote:

 Did you already try to put regex inside a cdata section?

 param name=expression![CDATA[^]+]/param

 Twitter :http://www.twitter.com/m_cucchiara
 G+  :https://plus.google.com/107903711540963855921
 Linkedin:http://www.linkedin.com/in/mauriziocucchiara
 VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara

 Maurizio Cucchiara


 On 19 March 2013 08:31, Muralidhar Yaragalla java.yaraga...@gmail.com
 wrote:
 
  Hi I am defining a reg which is valid in java. The regex is [^]+. But
  when i use this with regex validator it displays error. The error is It
  should consist well formed character data or markup. what i am trying to
  do is the special characters  and  should not be allowed in the
  field, that is the reason i am using that regex.
 
  What is the problem?
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *

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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Basically i want use regular expressions in validators. xml experience is
fine but why sould i learn dtd syntax to write simple regex for regex
validator? Anyways the suggested regex with cdata by another user is also
not working. so any help on writing regex for regex validator which is
equalent to [^] this , (which is also valid for most of the regex
engines including java.) will be appreciated. Thanks in advance.


On Tue, Mar 19, 2013 at 4:59 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  I tried with what you suggested. This gives different problem. I don't
  think we should think about cdata and all. regex means it should be just
  regex.

 You should think about taking some XML experience - CDATA has nothing
 to do with regex.


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
If i pass ![CDATA[[^]+]] in the xml file to the regex validator the
xml file is not generating any error but then the input is allowing the 
and  characters. That means still there is problem. Any help on this?


On Tue, Mar 19, 2013 at 4:59 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  I tried with what you suggested. This gives different problem. I don't
  think we should think about cdata and all. regex means it should be just
  regex.

 You should think about taking some XML experience - CDATA has nothing
 to do with regex.


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
I tried but it shows up the earlier problem. (formatted character data)


On Tue, Mar 19, 2013 at 5:45 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  If i pass ![CDATA[[^]+]] in the xml file to the regex validator the
  xml file is not generating any error but then the input is allowing the
 
  and  characters. That means still there is problem. Any help on this?

 Maybe the problem is with regex itself, try this one: ^[].+


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
The regex that i am trying works in java and also works with most regex
engines but that is not working with regex validator.


On Tue, Mar 19, 2013 at 5:45 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  If i pass ![CDATA[[^]+]] in the xml file to the regex validator the
  xml file is not generating any error but then the input is allowing the
 
  and  characters. That means still there is problem. Any help on this?

 Maybe the problem is with regex itself, try this one: ^[].+


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Now I tried ![CDATA[^[]+]] this. when I did this the xml file does
not show any error but the problem is validation does not happen.


On Tue, Mar 19, 2013 at 7:51 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  I tried but it shows up the earlier problem. (formatted character data)

 Did you put it inside CDATA block? You must use CDATA as  and  are
 xml specific characters.


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Do u want me to change the application log4j level to debug or is there
anything that i should do in struts?


On Tue, Mar 19, 2013 at 7:54 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  The regex that i am trying works in java and also works with most regex
  engines but that is not working with regex validator.

 RegexFieldValidator uses java.util.regex.Pattern internally, try to
 increase logging level to DEBUG for it and you should see in the log
 the regexp it tries to use:

 Defined regexp as [#0]


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Hi I am using s:fielderror/ in my jsp. The value that i entered in the
field is hjghj(without quotes).


On Tue, Mar 19, 2013 at 8:22 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  Now I tried ![CDATA[^[]+]] this. when I did this the xml file does
  not show any error but the problem is validation does not happen.

 Ok, but what value did you try to enter into the field? Do you use
 s:actionerror/ / s:fielderror/ tag? or xhtml / css_xhtml theme? As
 simple theme doesn't present validation errors without these tags.


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Then i tried jhbkkjnklj this but no validation.

when i press the submit button of the form the following log is being
generated on the server

2013-03-19 20:48:49 DEBUG cache:81 -
template/xhtml/fielderror.ftl[en_US,UTF-8,parsed]  no source found.
2013-03-19 20:48:49 DEBUG cache:81 -
template/simple/fielderror.ftl[en_US,UTF-8,parsed]  using cached since
jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ums/WEB-INF/lib/struts2-core-2.3.12.jar!/template/simple/fielderror.ftl
didn't change.


Is there any problem in this logs?


On Tue, Mar 19, 2013 at 8:39 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  Hi I am using s:fielderror/ in my jsp. The value that i entered in the
  field is hjghj(without quotes).

 So everything is ok, hjghj matches ^[]+ and there is no error.

 http://regexp.pl/main/show/182003


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
I have added the following to log4j

log4j.logger.com.opensymphony.xwork2.validator.validators=debug

But it doe not print anything on console. The logger was set for console
and for file.(both appenders)


On Tue, Mar 19, 2013 at 8:56 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  Then i tried jhbkkjnklj this but no validation.
 
  when i press the submit button of the form the following log is being
  generated on the server
 
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/xhtml/fielderror.ftl[en_US,UTF-8,parsed]  no source found.
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/simple/fielderror.ftl[en_US,UTF-8,parsed]  using cached
 since
 
 jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ums/WEB-INF/lib/struts2-core-2.3.12.jar!/template/simple/fielderror.ftl
  didn't change.
 
 
  Is there any problem in this logs?

 Could you enable DEBUG level just for the RegexFieldValidator and not
 for the whole framework?


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Hi Chris, I tried with the regex that you suggested but it did not work.
any way i am fed up understanding that validator so i have written my own
and it works fine. Thanks all of you for helping me.


On Wed, Mar 20, 2013 at 12:30 AM, Chris Pratt thechrispr...@gmail.comwrote:

 I'm pretty sure you can't use CDATA inside an attribute value.  Have you
 tried: [^lt;gt;]
   (*Chris*)


 On Tue, Mar 19, 2013 at 8:52 AM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  I have added the following to log4j
 
  log4j.logger.com.opensymphony.xwork2.validator.validators=debug
 
  But it doe not print anything on console. The logger was set for console
  and for file.(both appenders)
 
 
  On Tue, Mar 19, 2013 at 8:56 PM, Lukasz Lenart lukaszlen...@apache.org
  wrote:
 
   2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
Then i tried jhbkkjnklj this but no validation.
   
when i press the submit button of the form the following log is being
generated on the server
   
2013-03-19 20:48:49 DEBUG cache:81 -
template/xhtml/fielderror.ftl[en_US,UTF-8,parsed]  no source
 found.
2013-03-19 20:48:49 DEBUG cache:81 -
template/simple/fielderror.ftl[en_US,UTF-8,parsed]  using cached
   since
   
  
 
 jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ums/WEB-INF/lib/struts2-core-2.3.12.jar!/template/simple/fielderror.ftl
didn't change.
   
   
Is there any problem in this logs?
  
   Could you enable DEBUG level just for the RegexFieldValidator and not
   for the whole framework?
  
  
   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
  
  
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Nothing works. I am not sure why? but then I am good with my custom
validator for regex. One note is that xwork classes dont use log4j for
logging.


On Wed, Mar 20, 2013 at 2:09 AM, Paul Benedict pbened...@apache.org wrote:

 [^lt;gt;] means any character that is not the angled brackets. This is
 correct syntax for XML encoding.

 Try also using the beginning and ending meta-characters:

 ^[^lt;gt;]$

 Paul

 On Tue, Mar 19, 2013 at 3:35 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Hi Chris, I tried with the regex that you suggested but it did not work.
  any way i am fed up understanding that validator so i have written my own
  and it works fine. Thanks all of you for helping me.
 
 
  On Wed, Mar 20, 2013 at 12:30 AM, Chris Pratt thechrispr...@gmail.com
  wrote:
 
   I'm pretty sure you can't use CDATA inside an attribute value.  Have
 you
   tried: [^lt;gt;]
 (*Chris*)
  
  
   On Tue, Mar 19, 2013 at 8:52 AM, Muralidhar Yaragalla 
   java.yaraga...@gmail.com wrote:
  
I have added the following to log4j
   
log4j.logger.com.opensymphony.xwork2.validator.validators=debug
   
But it doe not print anything on console. The logger was set for
  console
and for file.(both appenders)
   
   
On Tue, Mar 19, 2013 at 8:56 PM, Lukasz Lenart 
  lukaszlen...@apache.org
wrote:
   
 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  Then i tried jhbkkjnklj this but no validation.
 
  when i press the submit button of the form the following log is
  being
  generated on the server
 
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/xhtml/fielderror.ftl[en_US,UTF-8,parsed]  no source
   found.
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/simple/fielderror.ftl[en_US,UTF-8,parsed]  using
  cached
 since
 

   
  
 
 jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ums/WEB-INF/lib/struts2-core-2.3.12.jar!/template/simple/fielderror.ftl
  didn't change.
 
 
  Is there any problem in this logs?

 Could you enable DEBUG level just for the RegexFieldValidator and
 not
 for the whole framework?


 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


   
   
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
   
  
 
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Hi, All the other validators are working fine except regex.


On Wed, Mar 20, 2013 at 2:21 AM, Paul Benedict pbened...@apache.org wrote:

 When the validator isn't working, it could signify none of your validation
 is working. Have you tried the required-string validator or anything else
 is working?

 Paul

 On Tue, Mar 19, 2013 at 3:49 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Nothing works. I am not sure why? but then I am good with my custom
  validator for regex. One note is that xwork classes dont use log4j for
  logging.
 
 
  On Wed, Mar 20, 2013 at 2:09 AM, Paul Benedict pbened...@apache.org
  wrote:
 
   [^lt;gt;] means any character that is not the angled brackets. This
 is
   correct syntax for XML encoding.
  
   Try also using the beginning and ending meta-characters:
  
   ^[^lt;gt;]$
  
   Paul
  
   On Tue, Mar 19, 2013 at 3:35 PM, Muralidhar Yaragalla 
   java.yaraga...@gmail.com wrote:
  
Hi Chris, I tried with the regex that you suggested but it did not
  work.
any way i am fed up understanding that validator so i have written my
  own
and it works fine. Thanks all of you for helping me.
   
   
On Wed, Mar 20, 2013 at 12:30 AM, Chris Pratt 
 thechrispr...@gmail.com
wrote:
   
 I'm pretty sure you can't use CDATA inside an attribute value.
  Have
   you
 tried: [^lt;gt;]
   (*Chris*)


 On Tue, Mar 19, 2013 at 8:52 AM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  I have added the following to log4j
 
  log4j.logger.com.opensymphony.xwork2.validator.validators=debug
 
  But it doe not print anything on console. The logger was set for
console
  and for file.(both appenders)
 
 
  On Tue, Mar 19, 2013 at 8:56 PM, Lukasz Lenart 
lukaszlen...@apache.org
  wrote:
 
   2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
Then i tried jhbkkjnklj this but no validation.
   
when i press the submit button of the form the following log
 is
being
generated on the server
   
2013-03-19 20:48:49 DEBUG cache:81 -
template/xhtml/fielderror.ftl[en_US,UTF-8,parsed]  no
  source
 found.
2013-03-19 20:48:49 DEBUG cache:81 -
template/simple/fielderror.ftl[en_US,UTF-8,parsed]  using
cached
   since
   
  
 

   
  
 
 jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ums/WEB-INF/lib/struts2-core-2.3.12.jar!/template/simple/fielderror.ftl
didn't change.
   
   
Is there any problem in this logs?
  
   Could you enable DEBUG level just for the RegexFieldValidator
 and
   not
   for the whole framework?
  
  
   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
  
  
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 

   
   
   
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
   
  
 
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
ok. will do.


On Wed, Mar 20, 2013 at 2:29 AM, Dave Newton davelnew...@gmail.com wrote:

 Put a SSCCE and its pom on github/etc and we'll take a look.  AFAIK regex
 validationworks fine for me.
  On Mar 19, 2013 4:57 PM, Muralidhar Yaragalla java.yaraga...@gmail.com
 
 wrote:

  Hi, All the other validators are working fine except regex.
 
 
  On Wed, Mar 20, 2013 at 2:21 AM, Paul Benedict pbened...@apache.org
  wrote:
 
   When the validator isn't working, it could signify none of your
  validation
   is working. Have you tried the required-string validator or anything
  else
   is working?
  
   Paul
  
   On Tue, Mar 19, 2013 at 3:49 PM, Muralidhar Yaragalla 
   java.yaraga...@gmail.com wrote:
  
Nothing works. I am not sure why? but then I am good with my custom
validator for regex. One note is that xwork classes dont use log4j
 for
logging.
   
   
On Wed, Mar 20, 2013 at 2:09 AM, Paul Benedict pbened...@apache.org
 
wrote:
   
 [^lt;gt;] means any character that is not the angled brackets.
 This
   is
 correct syntax for XML encoding.

 Try also using the beginning and ending meta-characters:

 ^[^lt;gt;]$

 Paul

 On Tue, Mar 19, 2013 at 3:35 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Hi Chris, I tried with the regex that you suggested but it did
 not
work.
  any way i am fed up understanding that validator so i have
 written
  my
own
  and it works fine. Thanks all of you for helping me.
 
 
  On Wed, Mar 20, 2013 at 12:30 AM, Chris Pratt 
   thechrispr...@gmail.com
  wrote:
 
   I'm pretty sure you can't use CDATA inside an attribute value.
Have
 you
   tried: [^lt;gt;]
 (*Chris*)
  
  
   On Tue, Mar 19, 2013 at 8:52 AM, Muralidhar Yaragalla 
   java.yaraga...@gmail.com wrote:
  
I have added the following to log4j
   
   
 log4j.logger.com.opensymphony.xwork2.validator.validators=debug
   
But it doe not print anything on console. The logger was set
  for
  console
and for file.(both appenders)
   
   
On Tue, Mar 19, 2013 at 8:56 PM, Lukasz Lenart 
  lukaszlen...@apache.org
wrote:
   
 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  Then i tried jhbkkjnklj this but no validation.
 
  when i press the submit button of the form the following
  log
   is
  being
  generated on the server
 
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/xhtml/fielderror.ftl[en_US,UTF-8,parsed]  no
source
   found.
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/simple/fielderror.ftl[en_US,UTF-8,parsed]
   using
  cached
 since
 

   
  
 

   
  
 
 jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ums/WEB-INF/lib/struts2-core-2.3.12.jar!/template/simple/fielderror.ftl
  didn't change.
 
 
  Is there any problem in this logs?

 Could you enable DEBUG level just for the
 RegexFieldValidator
   and
 not
 for the whole framework?


 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


   
   
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
   
  
 
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 

   
   
   
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
   
  
 
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
As far as i remember commons logging is one of the implementation of log4j.
but xworks classes does not use log4j. I am saying this because i have used
the log that comes from the super class which is a xworks class and that is
not of log4j.


On Wed, Mar 20, 2013 at 2:53 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  I have added the following to log4j
 
  log4j.logger.com.opensymphony.xwork2.validator.validators=debug
 
  But it doe not print anything on console. The logger was set for console
  and for file.(both appenders)

 Log4j is supported throughout commons-logging


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
something like apple (without quotes).


On Wed, Mar 20, 2013 at 3:02 AM, Paul Benedict pbened...@apache.org wrote:

 What input value are you testing against the regex?

 On Tue, Mar 19, 2013 at 4:28 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  As far as i remember commons logging is one of the implementation of
 log4j.
  but xworks classes does not use log4j. I am saying this because i have
 used
  the log that comes from the super class which is a xworks class and that
 is
  not of log4j.
 
 
  On Wed, Mar 20, 2013 at 2:53 AM, Lukasz Lenart lukaszlen...@apache.org
  wrote:
 
   2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
I have added the following to log4j
   
log4j.logger.com.opensymphony.xwork2.validator.validators=debug
   
But it doe not print anything on console. The logger was set for
  console
and for file.(both appenders)
  
   Log4j is supported throughout commons-logging
  
  
   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
  
  
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
sorry for my comment. what you said is right. Thank you for that info.


On Wed, Mar 20, 2013 at 3:04 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  As far as i remember commons logging is one of the implementation of
 log4j.
  but xworks classes does not use log4j. I am saying this because i have
 used
  the log that comes from the super class which is a xworks class and that
 is
  not of log4j.

 No, is not. commons-logging is wrapper around many different logging
 library. And XWork and Struts2 use internal logging layer which
 delegates to slf4j, commons-logging or jdk logging.

 Before saying anything check docs or source code.


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
I have tried this

action name=createVotingTopic
class=com.ymd.ums.lv.action.VotingTopicAction method=execute
   result name=success/jsp/lv/voteTopic.jsp/result

   result name=input type=redirect
   param name=location/jsp/lv/voteTopic.jsp/param 
  /result
  /action

But even error messages not getting printed.


On Wed, Mar 20, 2013 at 3:04 AM, Paul Benedict pbened...@apache.org wrote:

 You retain those values by doing a forward to a view (JSP, freemarker,
 etc.) whose view knows how to render the appropriate model object in the
 action.

 Paul

 On Tue, Mar 19, 2013 at 4:32 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Hi when there is validation error in the farm the same form is being
  displayed with error messages as input is configured to the same form but
  the form field values are disappearing. How can i retain those values?
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
i use struts 2.3.12


On Wed, Mar 20, 2013 at 3:15 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  something like apple (without quotes).

 Which version of Struts do you use?


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
I have used redirect as follows

action name=createVotingTopic
class=com.ymd.ums.lv.action.VotingTopicAction method=execute
   result name=success/jsp/lv/voteTopic.jsp/result

   result name=input type=redirect
   param name=location/jsp/lv/voteTopic.jsp/param 
  /result
  /action

This did not work eighter.


On Wed, Mar 20, 2013 at 3:04 AM, Paul Benedict pbened...@apache.org wrote:

 You retain those values by doing a forward to a view (JSP, freemarker,
 etc.) whose view knows how to render the appropriate model object in the
 action.

 Paul

 On Tue, Mar 19, 2013 at 4:32 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Hi when there is validation error in the farm the same form is being
  displayed with error messages as input is configured to the same form but
  the form field values are disappearing. How can i retain those values?
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
I i use just plain input error messages getting printed but the values of
the fields are not retained.


On Wed, Mar 20, 2013 at 3:43 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  I have tried this
 
  action name=createVotingTopic
  class=com.ymd.ums.lv.action.VotingTopicAction method=execute
 result name=success/jsp/lv/voteTopic.jsp/result
 
 result name=input type=redirect
 param name=location/jsp/lv/voteTopic.jsp/param 
/result
/action
 
  But even error messages not getting printed.

 You use redirect result type which drops the current request, remove
 type=redirect


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
I am not sure who is toy.


On Wed, Mar 20, 2013 at 3:44 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  i use struts 2.3.12

 Could you show how did toy define regex validator? As I said,
 expression param name was changed to regex


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
ok I understood. I will remove but how to retain values. any idea?


On Wed, Mar 20, 2013 at 3:49 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  I i use just plain input error messages getting printed but the values of
  the fields are not retained.

 You cannot use redirect and expect that the values will be retained.
 Remove type=redirect.


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
are u asking me to show how i have written custom validator for regex?


On Wed, Mar 20, 2013 at 3:50 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  I am not sure who is toy.

 *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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
The following is what i am doing

action name=createVotingTopic
class=com.ymd.ums.lv.action.VotingTopicAction method=execute
   result name=success/jsp/lv/voteTopic.jsp/result

   result name=input /jsp/lv/voteTopic.jsp/result
  /action

When there is field validation error then it is getting directed to the
same jsp but the values are not retained. am i doing something wrong?


On Wed, Mar 20, 2013 at 3:55 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  ok I understood. I will remove but how to retain values. any idea?

 They will retain automatically


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
This is how i did

!DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator 1.0.2//EN 
http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd;
validators
field name=votingTopic.votingTopic
 field-validator type=regex
  param name=expression![CDATA[[^]+]]/param
  messageThe value of bar2 must be in the format ![CDATA[]]
where x and y are between 0 and 9/message
 /field-validator
/field
/validators

Almost I have tried all the suggested combination by the members. It did
not work.


On Wed, Mar 20, 2013 at 3:59 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  are u asking me to show how i have written custom validator for regex?

 Nope, how did you configure built-in regex validator, the *-validation.xml
 file


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Yes I did. Not only this to that matter a simple reg which is shown in docs
also did not work. so i concluded that validator itself is not working. I
dont know why?


On Wed, Mar 20, 2013 at 4:23 AM, Chris Pratt thechrispr...@gmail.comwrote:

 Muralindhar,
   I just realized I forgot the + from your original regex.  Did you try my
 regex as is or did you fix it like [lt;gt;]+ ?
 (*Chris*)


 On Tue, Mar 19, 2013 at 1:35 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Hi Chris, I tried with the regex that you suggested but it did not work.
  any way i am fed up understanding that validator so i have written my own
  and it works fine. Thanks all of you for helping me.
 
 
  On Wed, Mar 20, 2013 at 12:30 AM, Chris Pratt thechrispr...@gmail.com
  wrote:
 
   I'm pretty sure you can't use CDATA inside an attribute value.  Have
 you
   tried: [^lt;gt;]
 (*Chris*)
  
  
   On Tue, Mar 19, 2013 at 8:52 AM, Muralidhar Yaragalla 
   java.yaraga...@gmail.com wrote:
  
I have added the following to log4j
   
log4j.logger.com.opensymphony.xwork2.validator.validators=debug
   
But it doe not print anything on console. The logger was set for
  console
and for file.(both appenders)
   
   
On Tue, Mar 19, 2013 at 8:56 PM, Lukasz Lenart 
  lukaszlen...@apache.org
wrote:
   
 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  Then i tried jhbkkjnklj this but no validation.
 
  when i press the submit button of the form the following log is
  being
  generated on the server
 
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/xhtml/fielderror.ftl[en_US,UTF-8,parsed]  no source
   found.
  2013-03-19 20:48:49 DEBUG cache:81 -
  template/simple/fielderror.ftl[en_US,UTF-8,parsed]  using
  cached
 since
 

   
  
 
 jar:file:/D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ums/WEB-INF/lib/struts2-core-2.3.12.jar!/template/simple/fielderror.ftl
  didn't change.
 
 
  Is there any problem in this logs?

 Could you enable DEBUG level just for the RegexFieldValidator and
 not
 for the whole framework?


 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


   
   
--
Thanks And Regards,
*Muralidhar Yaragalla.
*
   
  
 
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem with regex validator

2013-03-19 Thread Muralidhar Yaragalla
Yahoo..   This is working. when i change the param name
expression to regex as you suggested it is working. Thank you so much.
Finally got it


On Wed, Mar 20, 2013 at 4:27 AM, Chris Pratt thechrispr...@gmail.comwrote:

 Try:

   param name=regex[^lt;gt;]+/param

 (*Chris*)




 On Tue, Mar 19, 2013 at 3:50 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  This is how i did
 
  !DOCTYPE validators PUBLIC -//Apache Struts//XWork Validator
 1.0.2//EN 
  http://struts.apache.org/dtds/xwork-validator-1.0.2.dtd;
  validators
  field name=votingTopic.votingTopic
   field-validator type=regex
param name=expression![CDATA[[^]+]]/param
messageThe value of bar2 must be in the format ![CDATA[]]
  where x and y are between 0 and 9/message
   /field-validator
  /field
  /validators
 
  Almost I have tried all the suggested combination by the members. It did
  not work.
 
 
  On Wed, Mar 20, 2013 at 3:59 AM, Lukasz Lenart lukaszlen...@apache.org
  wrote:
 
   2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
are u asking me to show how i have written custom validator for
 regex?
  
   Nope, how did you configure built-in regex validator, the
  *-validation.xml
   file
  
  
   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
  
  
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
Almost sorted out all the problems only this is remaining. Any idea how to
retain the field values?


On Wed, Mar 20, 2013 at 3:55 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
  ok I understood. I will remove but how to retain values. any idea?

 They will retain automatically


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
where can i see the default interceptors configured. I mean in struts blank
war application in struts.xml file there is nothing so where to check what
are configured?


On Wed, Mar 20, 2013 at 4:49 AM, Dave Newton davelnew...@gmail.com wrote:

 As stated, there is no particular action you need to take other than not
 redirecting.

 If the action is hit and the params interceptor is working, they'll be
 there.

 Dave



 On Tue, Mar 19, 2013 at 7:11 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  Almost sorted out all the problems only this is remaining. Any idea how
 to
  retain the field values?
 
 
  On Wed, Mar 20, 2013 at 3:55 AM, Lukasz Lenart lukaszlen...@apache.org
  wrote:
 
   2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
ok I understood. I will remove but how to retain values. any idea?
  
   They will retain automatically
  
  
   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
  
  
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 



 --
 e: davelnew...@gmail.com
 m: 908-380-8699
 s: davelnewton_skype
 t: @dave_newton https://twitter.com/dave_newton
 b: Bucky Bits http://buckybits.blogspot.com/
 g: davelnewton https://github.com/davelnewton
 so: Dave Newton http://stackoverflow.com/users/438992/dave-newton




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: how can i retain the field values when there is validation error in field

2013-03-19 Thread Muralidhar Yaragalla
ok. Now i understand. I am using jstl. I am not using struts tags.


On Wed, Mar 20, 2013 at 5:03 AM, Chris Pratt thechrispr...@gmail.comwrote:

 Muralidhar,
   How are you specifying the form?  If you aren't using the s: form tags
 (or if you are using the simple theme), then you will have to handle the
 form value retrieval yourself.
   (*Chris*)


 On Tue, Mar 19, 2013 at 4:19 PM, Dave Newton davelnew...@gmail.com
 wrote:

  As stated, there is no particular action you need to take other than not
  redirecting.
 
  If the action is hit and the params interceptor is working, they'll be
  there.
 
  Dave
 
 
 
  On Tue, Mar 19, 2013 at 7:11 PM, Muralidhar Yaragalla 
  java.yaraga...@gmail.com wrote:
 
   Almost sorted out all the problems only this is remaining. Any idea how
  to
   retain the field values?
  
  
   On Wed, Mar 20, 2013 at 3:55 AM, Lukasz Lenart 
 lukaszlen...@apache.org
   wrote:
  
2013/3/19 Muralidhar Yaragalla java.yaraga...@gmail.com:
 ok I understood. I will remove but how to retain values. any idea?
   
They will retain automatically
   
   
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
   
   
  
  
   --
   Thanks And Regards,
   *Muralidhar Yaragalla.
   *
  
 
 
 
  --
  e: davelnew...@gmail.com
  m: 908-380-8699
  s: davelnewton_skype
  t: @dave_newton https://twitter.com/dave_newton
  b: Bucky Bits http://buckybits.blogspot.com/
  g: davelnewton https://github.com/davelnewton
  so: Dave Newton http://stackoverflow.com/users/438992/dave-newton
 




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem in validation with struts 2.3.1

2013-03-18 Thread Muralidhar Yaragalla
Yes. I am not sure whether server side validations are happening or not. I
feel they are not happening because i dont see error messages in the front
end(in the browser).


On Tue, Mar 19, 2013 at 1:18 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/18 Muralidhar Yaragalla java.yaraga...@gmail.com:
  //The following is my VotingTopicAction-validation.xml

 Is this file in com/ymd/ums/lv/action folder?


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: problem in validation with struts 2.3.1

2013-03-18 Thread Muralidhar Yaragalla
I think the problem is i am not using any struts tags in my jsp. when i use


s:fielderror/ this tag the messages are showing up. I thought
struts automatically displays error messages

next to the field.



On Tue, Mar 19, 2013 at 1:18 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/3/18 Muralidhar Yaragalla java.yaraga...@gmail.com:
  //The following is my VotingTopicAction-validation.xml

 Is this file in com/ymd/ums/lv/action folder?


 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




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


does struts 2.3 support mask validator?

2013-03-18 Thread Muralidhar Yaragalla
hi I have been searching on net for mask validator examples but could not
found any for 2.3.

-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*


Re: does struts 2.3 support mask validator?

2013-03-18 Thread Muralidhar Yaragalla
I don't see regex validator in validators.xml so do we have to get it from
somewhere?


On Tue, Mar 19, 2013 at 2:17 AM, Dave Newton davelnew...@gmail.com wrote:

 The regex validator?


 On Mon, Mar 18, 2013 at 4:44 PM, Muralidhar Yaragalla 
 java.yaraga...@gmail.com wrote:

  The following is the example for mask validator in struts 1
 
  field property=phoneNumber depends=required,mask
  msg name=mask key=userForm.phoneNumber.mask /
  arg key=userForm.phoneNumber/
  var
  var-namemask/var-name
  var-value^[0-9]*$/var-value
  /var
  /field
 
  Is there any equivalent validator in struts 2.3 where i can use regular
  expressions?
 
 
  On Tue, Mar 19, 2013 at 2:07 AM, Lukasz Lenart lukaszlen...@apache.org
  wrote:
 
   2013/3/18 Muralidhar Yaragalla java.yaraga...@gmail.com:
hi I have been searching on net for mask validator examples but could
  not
found any for 2.3.
  
   Mask validator? What you mean by that?
  
  
   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
  
  
 
 
  --
  Thanks And Regards,
  *Muralidhar Yaragalla.
  *
 



 --
 e: davelnew...@gmail.com
 m: 908-380-8699
 s: davelnewton_skype
 t: @dave_newton https://twitter.com/dave_newton
 b: Bucky Bits http://buckybits.blogspot.com/
 g: davelnewton https://github.com/davelnewton
 so: Dave Newton http://stackoverflow.com/users/438992/dave-newton




-- 
Thanks And Regards,
*Muralidhar Yaragalla.
*