Re: DelegatingValidatorContext.getText and Jetty

2013-10-29 Thread Umesh Awasthi
Hi Lukasz,

i used everything same as we have
https://github.com/lukaszlenart/struts2-jsr303-example

All I added few examples and tried t0 run those using jetty.

On running those, i was getting no messages, but message keys as output and
on debugging it , i found that  validatorContext.getText(key); was not able
to find any message associated with key.

Same was working fine on Tomcat.

You can run those sample example on Jetty to see issue.

Thanks
Umesh


On Tue, Oct 29, 2013 at 4:29 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/10/25 Umesh Awasthi umeshawas...@gmail.com:
  Do i need to add anything extra in Jetty configuration?
  I am using org.mortbay.jetty plugin for Maven

 Can you share how do you setup the plugin?


 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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Skip evaluation of ${...} and %{...} in TextParseUtil

2013-10-29 Thread Umesh Awasthi
Can try with that.
But that means putting extra data in value-stack as constranitsViolation
map provided by bean validation contains other information as well.

I will look in to way to provide your custom text-provider .


On Tue, Oct 29, 2013 at 3:57 PM, Christoph Nenning 
christoph.nenn...@lex-com.net wrote:

  In order to fetch values for ${min} and ${max} from underlying bean
  validation API, i need these placeholder names (min,max) as
 BeanValidator
  hold these values in a Map with {min} and {max} as keys.
 

 As far as I understand it, it should work when you push that map on
 ValueStack before resolving the text key.


 Regards,
 Christoph

 This Email was scanned by Sophos Anti Virus




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-29 Thread Umesh Awasthi
Thanks for the post and everything seems to be in-place :)
One point which even i missed on plugin page is about using XML file for
validation.

Will update plugin page soon with this information.

Thanks
Umesh


On Tue, Oct 29, 2013 at 7:13 PM, bphill...@ku.edu bphill...@ku.edu wrote:

 Umesh:

Here is the link to the blog entry I wrote:



 http://www.brucephillips.name/blog/index.cfm/2013/10/29/New-Struts-2-Plugin-For-JSR-303-Bean-Validation

Please let me know if I need to make any changes.

Thanks again for all the work you put into creating this plugin.

 Bruce



 --
 View this message in context:
 http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714498.html
 Sent from the Struts - User mailing list archive at Nabble.com.

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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Skip evaluation of ${...} and %{...} in TextParseUtil

2013-10-28 Thread Umesh Awasthi
Hi Chris,

I have not tried this but it seems not that feasible to me.
This is going to be used in plugin and that means forcing plugin user to
follow these instructions which IMHO is not good way to go..

Any other idea ??  :(

Thanks
Umesh




On Mon, Oct 28, 2013 at 9:34 AM, Chris Pratt thechrispr...@gmail.comwrote:

 Have you tried escaping the string?  You might try \${min} or possibly
 \\\${min} (since the Properties object may unescape once).
   (*Chris*)


 On Sun, Oct 27, 2013 at 9:55 AM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Oh, that was my typo and yes message indeed contain $.
  Issue here is how bean Validation is working.
 
  My problem is, when TextParseUtil is on to action, i do not have values
 for
  ${min} and ${max}, so i can not pass these values as parameter to
  TextParseUtil.
 
  And when message being passed back to plugin, these placeholders are
  already parsed and i have no control over it.
 
  In order to fetch values for ${min} and ${max} from underlying bean
  validation API, i need these placeholder names (min,max) as BeanValidator
  hold these values in a Map with {min} and {max} as keys.
 
  I am not sure if custom TextParseUtil will work for me as it might create
  issue with application which actually need to parse those messages.
 
  I do not want to reinvent everything from start as Struts2  is doing all
  work as expected except this part ;)
 
 
 
 
  On Sun, Oct 27, 2013 at 10:15 PM, Lukasz Lenart lukaszlen...@apache.org
  wrote:
 
   2013/10/27 Umesh Awasthi umeshawas...@gmail.com:
Are you sure? There is no opening chars (either $ or %)...
   
Not sure what does this mean?
  
   it supposed to be like this: Please provide a valid mobile number
   between ${min} and ${max}
  
   And then TextParseUtil will parse the placeholders.
  
You can implement your own TextParser.
   
Seems like this is only way to go :(
  
   I'm not sure if it's the right way anyway - as you want to have a
   parser that doesn't parse ;-) Maybe something else has to be changed,
   on some other level.
  
  
   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
  
  
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Skip evaluation of ${...} and %{...} in TextParseUtil

2013-10-27 Thread Umesh Awasthi
Hi All,

Is there a way to skip evaluation of ${} and %{} in TextParseUtil.
Here is the reason i need this

I need to display validation errors and need to pass parameters to messages
defined in resource bundles.

this is how i have defined message in property file

mobile.number=Please provide a valid mobile number between {min} and {max}

and this is how validation is defined
 @Size(min=10, max=12, message=mobile.number)
private String mobileNumber;

So ultimately, I need to display following message to user

Please provide a valid mobile number between 10 and 12.

Here {min} and {max} values are being picked from the defined annotation.
I can get values of annotations as well values of {min} and {max} from
Underlying bean validator and can replace those values.

I am using Struts2 DelegatingValidatorContext to find values with respect
to the key defined in validation constraints and while doing this, Struts2
is trying to parse those place holders ({min} and {max}) defined in message
resource bundle.

My idea is to not parse these place holders and let Struts2's TextParseUtil
return message with respect to key as it is.

Is there any way to do this or i need to customize this ?

Thanks in advance.

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Skip evaluation of ${...} and %{...} in TextParseUtil

2013-10-27 Thread Umesh Awasthi
Hi Lukasz,


On Sun, Oct 27, 2013 at 9:42 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/10/27 Umesh Awasthi umeshawas...@gmail.com:
  Hi All,
 
  Is there a way to skip evaluation of ${} and %{} in TextParseUtil.
  Here is the reason i need this
 
  I need to display validation errors and need to pass parameters to
 messages
  defined in resource bundles.
 
  this is how i have defined message in property file
 
  mobile.number=Please provide a valid mobile number between {min} and
 {max}
 
  and this is how validation is defined
   @Size(min=10, max=12, message=mobile.number)
  private String mobileNumber;
 
  So ultimately, I need to display following message to user
 
  Please provide a valid mobile number between 10 and 12.
 
  Here {min} and {max} values are being picked from the defined annotation.
  I can get values of annotations as well values of {min} and {max} from
  Underlying bean validator and can replace those values.
 
  I am using Struts2 DelegatingValidatorContext to find values with respect
  to the key defined in validation constraints and while doing this,
 Struts2
  is trying to parse those place holders ({min} and {max}) defined in
 message
  resource bundle.

 Are you sure? There is no opening chars (either $ or %)...

Not sure what does this mean?


  My idea is to not parse these place holders and let Struts2's
 TextParseUtil
  return message with respect to key as it is.
 
  Is there any way to do this or i need to customize this ?

 You can implement your own TextParser.

Seems like this is only way to go :(

Thanks
Umesh



 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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Skip evaluation of ${...} and %{...} in TextParseUtil

2013-10-27 Thread Umesh Awasthi
Oh, that was my typo and yes message indeed contain $.
Issue here is how bean Validation is working.

My problem is, when TextParseUtil is on to action, i do not have values for
${min} and ${max}, so i can not pass these values as parameter to
TextParseUtil.

And when message being passed back to plugin, these placeholders are
already parsed and i have no control over it.

In order to fetch values for ${min} and ${max} from underlying bean
validation API, i need these placeholder names (min,max) as BeanValidator
hold these values in a Map with {min} and {max} as keys.

I am not sure if custom TextParseUtil will work for me as it might create
issue with application which actually need to parse those messages.

I do not want to reinvent everything from start as Struts2  is doing all
work as expected except this part ;)




On Sun, Oct 27, 2013 at 10:15 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/10/27 Umesh Awasthi umeshawas...@gmail.com:
  Are you sure? There is no opening chars (either $ or %)...
 
  Not sure what does this mean?

 it supposed to be like this: Please provide a valid mobile number
 between ${min} and ${max}

 And then TextParseUtil will parse the placeholders.

  You can implement your own TextParser.
 
  Seems like this is only way to go :(

 I'm not sure if it's the right way anyway - as you want to have a
 parser that doesn't parse ;-) Maybe something else has to be changed,
 on some other level.


 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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


DelegatingValidatorContext.getText and Jetty

2013-10-25 Thread Umesh Awasthi
Hi All,

I have not worked much with jetty so not sure if my approach is correct or
not.
I am testing my application and few validation use cases on Jetty, though
validation is working correctly but when it come to resolve those error
messages with underlying Resource bundle its not working correctly

I have following property in my action class

 @NotBlank(message=not.blank)
   private String name;

I have one property file with same name as my action class and in same
directory with following entry

not.blank=Field can not be empty

This is how i am trying to get value against key in my code

 ValidatorContext validatorContext = new DelegatingValidatorContext( action
);
  message = validatorContext.getText(key);

here key being passed is not.blank, but it is unable to get any value for
given key.
I tested same example with tomcat and everything is working fine

Do i need to add anything extra in Jetty configuration?
I am using org.mortbay.jetty plugin for Maven


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-25 Thread Umesh Awasthi
Hi Bruce,

Only thing you were missing is to tell Underlying bean Validator to
validate your bean.
You placed constraints on your Person bean , but you need to indicate that
you want to validate this bean

In you EditAction.java you need to add @Valid annotation like

@Valid
 private Person personBean;

Thanks
Umesh




On Fri, Oct 25, 2013 at 7:05 PM, bphill...@ku.edu bphill...@ku.edu wrote:

 I've modified one of my form processing example applications to include
 this
 plugin.  It is not working as it allows you to not enter a value for first
 name even though I've annotated it with @Size(min=5).

 I double-checked that I'm following all the steps you listed in your
 ReadMe.md file at GitHub but it very possible I missed something.

 Could you look over this project:
 http://www.stfm.org/test/jsr303_validation.zip (unzip it - it's Maven
 project) and let me know what I've not done correctly.

 Thank you,

 Bruce Phillips




 --
 View this message in context:
 http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714434.html
 Sent from the Struts - User mailing list archive at Nabble.com.

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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-25 Thread Umesh Awasthi
Hi Bruce,

I will be more than happy , let me know if i can contribute in any form?
I also need to update Github information as still XML based validation
information is missing from there.

Thanks
Umesh


On Sat, Oct 26, 2013 at 3:48 AM, Paul Benedict pbened...@apache.org wrote:

 JSR-303 validation should be the norm for Struts 3.


 On Fri, Oct 25, 2013 at 1:53 PM, bphill...@ku.edu bphill...@ku.edu
 wrote:

  Works now - thank you for the help and for creating a very useful plugin.
 
  Would you mind if I wrote an article about how to use this plugin for my
  blog (http://www.brucephillips.name/blog)?
 
  Bruce
 
 
 
  --
  View this message in context:
 
 http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.html
  Sent from the Struts - User mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 


 --
 Cheers,
 Paul




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-24 Thread Umesh Awasthi
Thanks Johannes!!
Looking forward for your inputs to improve it :)

Thanks
Umesh


On Thu, Oct 24, 2013 at 2:30 PM, Johannes Geppert jo...@apache.org wrote:

 Thanks Umesh, looks like a great benefit for all Struts users!
 I will give it a try in my next project.

 Johannes

 #
 web: http://www.jgeppert.com
 twitter: http://twitter.com/jogep



 2013/10/24 Lukasz Lenart lukaszlen...@apache.org

  Great! Congratz!
 
  2013/10/23 Umesh Awasthi umeshawas...@gmail.com:
   Hi All,
  
   I am pleased to announce that  Struts2-Jsr303-Validation-Plugin is
   available.
   This Plugin works as a bridge between Struts2  and JSR-303 Compliant
 bean
   Validator.
   Some of reference implementation for JSR303 are
  
  
  - Hibernate bean validator
  - Apacche Bval
  
   You can either download it through maven central repository or can
  manually
   download and configure it in your application.
  
  
   In case you find any bugs, please them report them at Github Issue
   Tracker
 
 https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open
   .
  
   For more details, please refer to the plugin's home page
   struts2-JSR303-validator-plugin
  https://github.com/umeshawasthi/jsr303-validator-plugin
  
   Looking for your feedback / suggestions / inputs
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-24 Thread Umesh Awasthi
Hi Martin,

I am not able to understand your question properly.
Can you be a more descriptive for this?

Any example or references can help me ;)

Thanks
Umesh


On Thu, Oct 24, 2013 at 5:26 PM, Martin Gainty mgai...@hotmail.com wrote:

 If the implementor has predefined Validators and implementor wishes to
 engage that specific validator at runtime
 (leaving default struts.jsr303.beanValidator.providerClass for other
 validators)

 @Constraint(validatedBy = CommentValidator.class)


 How would that work?



 thanks umesh!
 Martin



 http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Fcdat_beanval.html





  Date: Thu, 24 Oct 2013 11:00:58 +0200
  Subject: Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available
  From: jo...@apache.org
  To: user@struts.apache.org
 
  Thanks Umesh, looks like a great benefit for all Struts users!
  I will give it a try in my next project.
 
  Johannes
 
  #
  web: http://www.jgeppert.com
  twitter: http://twitter.com/jogep
 
 
 
  2013/10/24 Lukasz Lenart lukaszlen...@apache.org
 
   Great! Congratz!
  
   2013/10/23 Umesh Awasthi umeshawas...@gmail.com:
Hi All,
   
I am pleased to announce that Struts2-Jsr303-Validation-Plugin is
available.
This Plugin works as a bridge between Struts2 and JSR-303 Compliant
 bean
Validator.
Some of reference implementation for JSR303 are
   
   
- Hibernate bean validator
- Apacche Bval
   
You can either download it through maven central repository or can
   manually
download and configure it in your application.
   
   
In case you find any bugs, please them report them at Github Issue
Tracker
  
 https://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open
.
   
For more details, please refer to the plugin's home page
struts2-JSR303-validator-plugin
   https://github.com/umeshawasthi/jsr303-validator-plugin
   
Looking for your feedback / suggestions / inputs
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  





-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


[ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available

2013-10-23 Thread Umesh Awasthi
Hi All,

I am pleased to announce that  Struts2-Jsr303-Validation-Plugin is
available.
This Plugin works as a bridge between Struts2  and JSR-303 Compliant bean
Validator.
Some of reference implementation for JSR303 are


   - Hibernate bean validator
   - Apacche Bval

You can either download it through maven central repository or can manually
download and configure it in your application.


In case you find any bugs, please them report them at Github Issue
Trackerhttps://github.com/umeshawasthi/jsr303-validator-plugin/issues?state=open
.

For more details, please refer to the plugin's home page
struts2-JSR303-validator-pluginhttps://github.com/umeshawasthi/jsr303-validator-plugin

Looking for your feedback / suggestions / inputs

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Struts2 Sample App for Validation

2013-10-17 Thread Umesh Awasthi
Hi All,

I am working on plugin to integrate Struts2 with JSR303 bean validation,
Plugin is almost finish and currently i am testing it.

Though i am trying to cover as many cases as possible but looking out for
some help.
Do anyone have a sample application with good amount of validation (Struts2
Validator ) use cases covered?.
I want to test plugin with those possible cases to see how it behave.

If possible, please share that so as i can test plugin thoroughly.

though i am asking too much, but i see no harm in asking some favor ;)

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Using multiple @Inject in constructor giving run time error

2013-10-16 Thread Umesh Awasthi
I am trying to inject few values to my bean like

@Inject
public
DefaultJSR303ValidationManager(@Inject(value=ValidatorConstants.PROVIDER_CLASS,required=false)
String providerClassName,

@Inject(value=ValidatorConstants.IGNORE_XMLCONFIGURAITION,required=false)
boolean ignoreXMLConfiguration
 )
{
// some code
  }


Entries from struts-plugin.xml

constant name=providerClass value=/
constant name=ignoreXMLConfiguration value=false/

but i am getting following exception

Caused by:
com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No
mapping found for dependency [type=boolean, name='ignoreXMLConfiguration']

how ever if i change it to
@Inject
public
DefaultJSR303ValidationManager(@Inject(value=ValidatorConstants.PROVIDER_CLASS,required=false)
String providerClassName
 )
{
}

@Inject(value=ValidatorConstants.IGNORE_XMLCONFIGURAITION,required=false)
public void setIgnoreXMLConfiguration( boolean ignoreXMLConfiguration )
{
this.ignoreXMLConfiguration = ignoreXMLConfiguration;
}

everything is working fine and dependencies are being injected correctly.
I am not sure if where i am doing wrong ?
can't i have multiple @inject inside constructor?



-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Using multiple @Inject in constructor giving run time error

2013-10-16 Thread Umesh Awasthi
Thanks!!
I am wondering why it is working fine for other case?
I was expecting that Struts2 will convert it for me ;)

Thanks
Umesh


On Wed, Oct 16, 2013 at 12:54 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/10/16 Umesh Awasthi umeshawas...@gmail.com:
  I am trying to inject few values to my bean like
 
  @Inject
  public
 
 DefaultJSR303ValidationManager(@Inject(value=ValidatorConstants.PROVIDER_CLASS,required=false)
  String providerClassName,
 
  @Inject(value=ValidatorConstants.IGNORE_XMLCONFIGURAITION,required=false)
  boolean ignoreXMLConfiguration
   )
  {
  // some code
}
 
 
  Entries from struts-plugin.xml
 
  constant name=providerClass value=/
  constant name=ignoreXMLConfiguration value=false/
 
  but i am getting following exception
 
  Caused by:
  com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException:
 No
  mapping found for dependency [type=boolean,
 name='ignoreXMLConfiguration']
 
  how ever if i change it to
  @Inject
  public
 
 DefaultJSR303ValidationManager(@Inject(value=ValidatorConstants.PROVIDER_CLASS,required=false)
  String providerClassName
   )
  {
  }
 
  @Inject(value=ValidatorConstants.IGNORE_XMLCONFIGURAITION,required=false)
  public void setIgnoreXMLConfiguration( boolean
 ignoreXMLConfiguration )
  {
  this.ignoreXMLConfiguration = ignoreXMLConfiguration;
  }
 
  everything is working fine and dependencies are being injected correctly.
  I am not sure if where i am doing wrong ?
  can't i have multiple @inject inside constructor?

 constant/ defines String not boolean, try something like this:

 @Inject
 public
 DefaultJSR303ValidationManager(@Inject(value=ValidatorConstants.PROVIDER_CLASS,required=false)
 String providerClassName,

 @Inject(value=ValidatorConstants.IGNORE_XMLCONFIGURAITION,required=false)
 String ignoreXMLConfiguration) {

 this. ignoreXMLConfiguration =
 true.equalsIgnoreCase(ignoreXMLConfiguration);

 }


 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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Steps Involved in counter measurement for security issues

2013-10-16 Thread Umesh Awasthi
I do not think that is possible.
You have 2 options

1. Upgrade you struts2 version.
2. Go through security vulnerability and see what was there and create test
cases to see what exactly is happening and fix them by checking patches.

But IMO, upgrading to latest version is much more flexible and less time
consuming than going through each and every vulnerability and applying
fixes for them.


On Wed, Oct 16, 2013 at 4:17 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:

 Test Case to test the security vulnerability (major ones) in
 struts2-core-2.1.2.

 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 


 On Wed, Oct 16, 2013 at 4:15 PM, Lukasz Lenart lukaszlen...@apache.org
 wrote:

  2013/10/16 Sreekanth S. Nair sreekanth.n...@egovernments.org:
   One more doubt, does this security vulnerability is able to bring down
  the
   server :-) ? If we authorize ourselves to apache, is it possible for
  struts
   team to give us test case to check the vulnerability?
 
  What you mean by that? What test case you refer to?
 
 
  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
 
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Strange issue with Model driven and Bean validation

2013-10-15 Thread Umesh Awasthi
Hi All,

I am facing a strange issue while trying to validate a bean using bean
validation.I am using model driven interface to pass form field values to
Action and here is the  action code

public class ModelDriven extends ActionSupport implements
com.opensymphony.xwork2.ModelDrivenProfileDTO{


 @Valid
public ProfileDTOgetModel()
{
 return new ProfileDTO();
}
}

Though bean validator is validating fields but skipping few of them an di
am clueless why it is dong this, when i am using simple process without
Model driven every validation is working as expected.

There is no difference in code and only line of code different is in action
for model driven.

Not sure how relevant question is , but do we need to take care any
specific issue while using model driven approach?

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Strange issue with Model driven and Bean validation

2013-10-15 Thread Umesh Awasthi
No, my issue is something different..
some how underlying Valitor API is not validating all fields and its
happening only when i am using Model driven, for rest cased everything is
working fine for same bean object and for same validations.


On Tue, Oct 15, 2013 at 3:15 PM, Christoph Nenning 
christoph.nenn...@lex-com.net wrote:

  Hi All,
 
  I am facing a strange issue while trying to validate a bean using bean
  validation.I am using model driven interface to pass form field values
 to
  Action and here is the  action code
 
  public class ModelDriven extends ActionSupport implements
  com.opensymphony.xwork2.ModelDrivenProfileDTO{
 
 
   @Valid
  public ProfileDTOgetModel()
  {
   return new ProfileDTO();
  }
  }
 
  Though bean validator is validating fields but skipping few of them an
 di
  am clueless why it is dong this, when i am using simple process without
  Model driven every validation is working as expected.
 
  There is no difference in code and only line of code different is in
 action
  for model driven.
 
  Not sure how relevant question is , but do we need to take care any
  specific issue while using model driven approach?
 

 Do you use a custom TextProvider?
 There is an open Jira issue with ModelDriven, Validation and custom
 TextProviders:

 https://issues.apache.org/jira/browse/WW-4202


 Regards,
 Christoph

 This Email was scanned by Sophos Anti Virus




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Question about Model Driven Interface

2013-10-15 Thread Umesh Awasthi
Hi All,

Have rarely used model driven interface and not sure about how exactly it
work.
Can any one point me what will be difference between

ProfileDTOModel md = new ProfileDTOModel();


publicProfileDTOModel getModel()
{

   return  md;
}

and

  public ProfileDTOModel getModel()
{

   return  new ProfileDTOModel();;
}


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Strange issue with Model driven and Bean validation

2013-10-15 Thread Umesh Awasthi
Just to add more information by changing code to

ProfileDTOgetModel md=new ProfileDTOgetModel();
@Valid
public ProfileDTOgetModel()
{
 return md;
}
}

Bean Validation is working fine, so i am confused which is right way to use
Model driven.
I took reference from

http://struts.apache.org/release/2.3.x/docs/model-driven.html


On Tue, Oct 15, 2013 at 3:30 PM, Umesh Awasthi umeshawas...@gmail.comwrote:

 No, my issue is something different..
 some how underlying Valitor API is not validating all fields and its
 happening only when i am using Model driven, for rest cased everything is
 working fine for same bean object and for same validations.


 On Tue, Oct 15, 2013 at 3:15 PM, Christoph Nenning 
 christoph.nenn...@lex-com.net wrote:

  Hi All,
 
  I am facing a strange issue while trying to validate a bean using bean
  validation.I am using model driven interface to pass form field values
 to
  Action and here is the  action code
 
  public class ModelDriven extends ActionSupport implements
  com.opensymphony.xwork2.ModelDrivenProfileDTO{
 
 
   @Valid
  public ProfileDTOgetModel()
  {
   return new ProfileDTO();
  }
  }
 
  Though bean validator is validating fields but skipping few of them an
 di
  am clueless why it is dong this, when i am using simple process without
  Model driven every validation is working as expected.
 
  There is no difference in code and only line of code different is in
 action
  for model driven.
 
  Not sure how relevant question is , but do we need to take care any
  specific issue while using model driven approach?
 

 Do you use a custom TextProvider?
 There is an open Jira issue with ModelDriven, Validation and custom
 TextProviders:

 https://issues.apache.org/jira/browse/WW-4202


 Regards,
 Christoph

 This Email was scanned by Sophos Anti Virus




 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/






-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Strange issue with Model driven and Bean validation

2013-10-15 Thread Umesh Awasthi
Dave,

i am agree with you, i just followed doc and than it started giving me some
strange issues in validations.
I tried to debug underlying API but with no success.

On doing some more Googling i came across create new instance outside
getModel() and it started working as expected.

Thanks
Umesh


On Tue, Oct 15, 2013 at 7:01 PM, Dave Newton davelnew...@gmail.com wrote:

 Wouldn't this return a new ProfileDTO every single time getModel() is
 called?

 This, in turn, would mean that if you were validating model.foo and
 model.bar that it'd be called twice.

 I have not verified this, perhaps there's some magic (e.g., spooky) caching
 happening somewhere, but to my mind, without some very clear documentation,
 instantiating the model object in the getter would probably be wrong.

 Dave



 On Tue, Oct 15, 2013 at 5:38 AM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Hi All,
 
  I am facing a strange issue while trying to validate a bean using bean
  validation.I am using model driven interface to pass form field values to
  Action and here is the  action code
 
  public class ModelDriven extends ActionSupport implements
  com.opensymphony.xwork2.ModelDrivenProfileDTO{
 
 
   @Valid
  public ProfileDTOgetModel()
  {
   return new ProfileDTO();
  }
  }
 
  Though bean validator is validating fields but skipping few of them an di
  am clueless why it is dong this, when i am using simple process without
  Model driven every validation is working as expected.
 
  There is no difference in code and only line of code different is in
 action
  for model driven.
 
  Not sure how relevant question is , but do we need to take care any
  specific issue while using model driven approach?
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 



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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: how jsp form text field values are copied to action class instance fields

2013-10-11 Thread Umesh Awasthi
This is being done with help of interceptors, struts2 provides a set of
interceptors to do some work for you and transferring form values to
actions properties is one of them.

Have a look at
http://struts.apache.org/release/2.3.x/docs/parameters-interceptor.html and
see how this interceptor will work.

This is responsible for transferring data, also there will be type
convertors in place which will convert String values being sent form form
to desired data types.

Have a look at
http://struts.apache.org/release/2.3.x/docs/struts-defaultxml.html
to see what all interceptors are configured.

See also http://struts.apache.org/release/2.3.x/docs/interceptors.html to
get more understanding about them.


On Fri, Oct 11, 2013 at 12:53 PM, Srimuralidharan S 
srimuralidhara...@dhyanit.com wrote:

 Hi,
 I have a form with two text fields  rollnumber and name and also a
 submit button. My action class also contain two private instance fields
 rollnumber and name. I wondered how text field values are copied to the
 instance fields of action class. Please help me in understanding the
 process and the mechanism of passing values in struts2

 --
 Regards,
 Srimuralidharan.S


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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-08 Thread Umesh Awasthi
Hi Lukasz,

thanks for demo application.
I am working on it and hope to complete it soon.

Thanks for the correction as i have not tested it yet (My plugin code ;))

Thanks
Umesh





On Tue, Oct 8, 2013 at 11:42 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 My demo app

 https://github.com/lukaszlenart/struts2-jsr303-example

 Anyway, first the plugin must be fully operational, right now it
 performs validation but it lacks of validation messages ;-)


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/10/8 Lukasz Lenart lukaszlen...@apache.org:
  After installing the plugin locally (mvn clean source:jar install) I
  have added it as follow:
 
  dependency
  groupIdstruts2-jsr303-validator-plugin/groupId
  artifactIdjsr303-validator/artifactId
  version1.0-SNAPSHOT/version
  /dependency
 
  dependency
  groupIdorg.hibernate/groupId
  artifactIdhibernate-validator/artifactId
  version4.3.1.Final/version
  /dependency
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/10/8 Umesh Awasthi umeshawas...@gmail.com:
  Thanks Everyone, issue was with my Eclipse as it was not updating
 project
  dependencies.
 
 
  On Mon, Oct 7, 2013 at 10:50 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:
 
  I have got root cause of my issue. I was not checking it thoroughly and
  thinking that my plugin is not being loaded properly.
 
  Not sure about root cause yet. I have declared plugin dependency in my
  Struts2 sample application's pom.xml as
 
  dependency
 groupIdbean-validator-plugin/groupId
  artifactIdbean-validator/artifactId
  version1.0-SNAPSHOT/version
/dependency
 
  but some how this is not being included in my Application, i used
 Eclipse
  export to export war file in standalone tomcat server and on cross
 checking
  lib folder,my plugin jar file was not there.
 
  Thanks
  Umesh
 
 
  On Mon, Oct 7, 2013 at 10:28 PM, Dave Newton davelnew...@gmail.com
 wrote:
 
  On Mon, Oct 7, 2013 at 12:53 PM, Umesh Awasthi 
 umeshawas...@gmail.com
  wrote:
 
   Not sure why its showing this structure, i tried git for first time
 so
   might be i have done some wrong steps.
  
 
  No, it's fine; that's part of the github directory structure.
 
 
   On Mon, Oct 7, 2013 at 10:06 PM, Martin Gainty mgai...@hotmail.com
 
   wrote:
  
struts-plugin.xml should be always be located in
   
   
   
  
 
 https://github.com/umeshawasthi/jsr303-validator-plugin/src/main/resources/struts-plugin.xml
 
 
  It is.
 
  Dave
 
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 
 
 
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/

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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-08 Thread Umesh Awasthi
Thanks for suggestion
They were same as suggested by you.
I messed up with them lately  :)

Will correct them.


On Tue, Oct 8, 2013 at 12:25 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 2013/10/8 Umesh Awasthi umeshawas...@gmail.com:
  Hi Lukasz,
 
  thanks for demo application.
  I am working on it and hope to complete it soon.
 
  Thanks for the correction as i have not tested it yet (My plugin code ;))

 You're welcome :-)

 And I suggest changing groupId and artifcatId, e.g.

 groupIdorg.apache.struts/groupId
 artifactIdstruts2-jsr303-validation-plugin/artifactId

 or you can use any other groupId, but basically it must be valid URI
 as guys from Sonatype OSS don't want to accept such invalid
 groupId's


 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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
Hi Lukaz,

Its name is struts-plugin.xml, moreover i have used maven to generate
plugin structure for me.
Not sure why it is happening like this.

I even cross checked it with other plugin provided with Struts distribution
and everything is same not sure why this is happening.


On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 How did you name your xml file? It must be struts-plugin.xml and then
 framework will automatically load it.


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
  Hi All,
 
  Facing Parent package is not defined exception and not sure where
 things
  are worng.
 
  I have created a new plugin and want to use this plugin in my web-app,
 this
  is how i have defined my plugin package
 
  package name=myPlugin extends=struts-default
 
  For testing purpose i created a blank application by using
  struts2-archetype-blank and this is how i am using plugin package
 
   package name=example namespace=/example extends=myPlugin
 
  but i am getting following exception on server startup
 
  Caused by: Unable to load configuration.
  Caused by: Parent package is not defined: myPlugin - [unknown location]
 
  It seems that plugin is not getting included.
  Initially i was serving plugin by Maven but in order to check i placed
 jar
  inside lib folder and included it in class-path.
 
  Any idea where or what i am doing wrong ?
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/

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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
Yes, its there
Still i will cross check it.

Thanks
Umesh


On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 Are you sure that the struts-plugin.xml exists in the jar?


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
  Hi Lukaz,
 
  Its name is struts-plugin.xml, moreover i have used maven to generate
  plugin structure for me.
  Not sure why it is happening like this.
 
  I even cross checked it with other plugin provided with Struts
 distribution
  and everything is same not sure why this is happening.
 
 
  On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart lukaszlen...@apache.org
 wrote:
 
  How did you name your xml file? It must be struts-plugin.xml and then
  framework will automatically load it.
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
   Hi All,
  
   Facing Parent package is not defined exception and not sure where
  things
   are worng.
  
   I have created a new plugin and want to use this plugin in my web-app,
  this
   is how i have defined my plugin package
  
   package name=myPlugin extends=struts-default
  
   For testing purpose i created a blank application by using
   struts2-archetype-blank and this is how i am using plugin package
  
package name=example namespace=/example extends=myPlugin
  
   but i am getting following exception on server startup
  
   Caused by: Unable to load configuration.
   Caused by: Parent package is not defined: myPlugin - [unknown
 location]
  
   It seems that plugin is not getting included.
   Initially i was serving plugin by Maven but in order to check i placed
  jar
   inside lib folder and included it in class-path.
  
   Any idea where or what i am doing wrong ?
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/

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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
Hi Chris,

Not sure what you mean by root directory?

Hi Lukasz,

I cross checked and struts-plugin.xml is there.




On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt thechrispr...@gmail.comwrote:

 And in the root directory of the jar file, correct?
   (*Chris*)


 On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Yes, its there
  Still i will cross check it.
 
  Thanks
  Umesh
 
 
  On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart lukaszlen...@apache.org
  wrote:
 
   Are you sure that the struts-plugin.xml exists in the jar?
  
  
   Regards
   --
   Łukasz
   + 48 606 323 122 http://www.lenart.org.pl/
  
   2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
Hi Lukaz,
   
Its name is struts-plugin.xml, moreover i have used maven to generate
plugin structure for me.
Not sure why it is happening like this.
   
I even cross checked it with other plugin provided with Struts
   distribution
and everything is same not sure why this is happening.
   
   
On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart 
  lukaszlen...@apache.org
   wrote:
   
How did you name your xml file? It must be struts-plugin.xml and
 then
framework will automatically load it.
   
   
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
   
2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
 Hi All,

 Facing Parent package is not defined exception and not sure
 where
things
 are worng.

 I have created a new plugin and want to use this plugin in my
  web-app,
this
 is how i have defined my plugin package

 package name=myPlugin extends=struts-default

 For testing purpose i created a blank application by using
 struts2-archetype-blank and this is how i am using plugin
 package

  package name=example namespace=/example extends=myPlugin

 but i am getting following exception on server startup

 Caused by: Unable to load configuration.
 Caused by: Parent package is not defined: myPlugin - [unknown
   location]

 It seems that plugin is not getting included.
 Initially i was serving plugin by Maven but in order to check i
  placed
jar
 inside lib folder and included it in class-path.

 Any idea where or what i am doing wrong ?

 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/
   
   
 -
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
   
   
   
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
  
   -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
No, its not in sub-directory
I can share gitHub link if want to have look at structure or files?


On Mon, Oct 7, 2013 at 12:08 PM, Chris Pratt thechrispr...@gmail.comwrote:

 In the top directory (not a sub directory) of the jar file.  It should NOT
 be in a subdirectory like META-INF or WEB-INF.
   (*Chris*)


 On Sun, Oct 6, 2013 at 11:37 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Hi Chris,
 
  Not sure what you mean by root directory?
 
  Hi Lukasz,
 
  I cross checked and struts-plugin.xml is there.
 
 
 
 
  On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt thechrispr...@gmail.com
  wrote:
 
   And in the root directory of the jar file, correct?
 (*Chris*)
  
  
   On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi umeshawas...@gmail.com
   wrote:
  
Yes, its there
Still i will cross check it.
   
Thanks
Umesh
   
   
On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart 
  lukaszlen...@apache.org
wrote:
   
 Are you sure that the struts-plugin.xml exists in the jar?


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
  Hi Lukaz,
 
  Its name is struts-plugin.xml, moreover i have used maven to
  generate
  plugin structure for me.
  Not sure why it is happening like this.
 
  I even cross checked it with other plugin provided with Struts
 distribution
  and everything is same not sure why this is happening.
 
 
  On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart 
lukaszlen...@apache.org
 wrote:
 
  How did you name your xml file? It must be struts-plugin.xml and
   then
  framework will automatically load it.
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
   Hi All,
  
   Facing Parent package is not defined exception and not sure
   where
  things
   are worng.
  
   I have created a new plugin and want to use this plugin in my
web-app,
  this
   is how i have defined my plugin package
  
   package name=myPlugin extends=struts-default
  
   For testing purpose i created a blank application by using
   struts2-archetype-blank and this is how i am using plugin
   package
  
package name=example namespace=/example
  extends=myPlugin
  
   but i am getting following exception on server startup
  
   Caused by: Unable to load configuration.
   Caused by: Parent package is not defined: myPlugin - [unknown
 location]
  
   It seems that plugin is not getting included.
   Initially i was serving plugin by Maven but in order to check
 i
placed
  jar
   inside lib folder and included it in class-path.
  
   Any idea where or what i am doing wrong ?
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
 
 
   -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/


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


   
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
   
  
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
Hi Lukasz,

here is the repo link

https://github.com/umeshawasthi/jsr303-validator-plugin

Thanks
Umesh


On Mon, Oct 7, 2013 at 12:13 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 Yes, please do :-)

 2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
  No, its not in sub-directory
  I can share gitHub link if want to have look at structure or files?
 
 
  On Mon, Oct 7, 2013 at 12:08 PM, Chris Pratt thechrispr...@gmail.com
 wrote:
 
  In the top directory (not a sub directory) of the jar file.  It should
 NOT
  be in a subdirectory like META-INF or WEB-INF.
(*Chris*)
 
 
  On Sun, Oct 6, 2013 at 11:37 PM, Umesh Awasthi umeshawas...@gmail.com
  wrote:
 
   Hi Chris,
  
   Not sure what you mean by root directory?
  
   Hi Lukasz,
  
   I cross checked and struts-plugin.xml is there.
  
  
  
  
   On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt thechrispr...@gmail.com
   wrote:
  
And in the root directory of the jar file, correct?
  (*Chris*)
   
   
On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi 
 umeshawas...@gmail.com
wrote:
   
 Yes, its there
 Still i will cross check it.

 Thanks
 Umesh


 On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart 
   lukaszlen...@apache.org
 wrote:

  Are you sure that the struts-plugin.xml exists in the jar?
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
   Hi Lukaz,
  
   Its name is struts-plugin.xml, moreover i have used maven to
   generate
   plugin structure for me.
   Not sure why it is happening like this.
  
   I even cross checked it with other plugin provided with Struts
  distribution
   and everything is same not sure why this is happening.
  
  
   On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart 
 lukaszlen...@apache.org
  wrote:
  
   How did you name your xml file? It must be struts-plugin.xml
 and
then
   framework will automatically load it.
  
  
   Regards
   --
   Łukasz
   + 48 606 323 122 http://www.lenart.org.pl/
  
   2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
Hi All,
   
Facing Parent package is not defined exception and not
 sure
where
   things
are worng.
   
I have created a new plugin and want to use this plugin in
 my
 web-app,
   this
is how i have defined my plugin package
   
package name=myPlugin extends=struts-default
   
For testing purpose i created a blank application by using
struts2-archetype-blank and this is how i am using plugin
package
   
 package name=example namespace=/example
   extends=myPlugin
   
but i am getting following exception on server startup
   
Caused by: Unable to load configuration.
Caused by: Parent package is not defined: myPlugin -
 [unknown
  location]
   
It seems that plugin is not getting included.
Initially i was serving plugin by Maven but in order to
 check
  i
 placed
   jar
inside lib folder and included it in class-path.
   
Any idea where or what i am doing wrong ?
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
  
  
   
 -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail: user-h...@struts.apache.org
  
  
  
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 


 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/

   
  
  
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
  
 
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/

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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
any hint ? :)


On Mon, Oct 7, 2013 at 2:19 PM, Umesh Awasthi umeshawas...@gmail.comwrote:

 Hi Lukasz,

 here is the repo link

 https://github.com/umeshawasthi/jsr303-validator-plugin

 Thanks
 Umesh


 On Mon, Oct 7, 2013 at 12:13 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 Yes, please do :-)

 2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
  No, its not in sub-directory
  I can share gitHub link if want to have look at structure or files?
 
 
  On Mon, Oct 7, 2013 at 12:08 PM, Chris Pratt thechrispr...@gmail.com
 wrote:
 
  In the top directory (not a sub directory) of the jar file.  It should
 NOT
  be in a subdirectory like META-INF or WEB-INF.
(*Chris*)
 
 
  On Sun, Oct 6, 2013 at 11:37 PM, Umesh Awasthi umeshawas...@gmail.com
  wrote:
 
   Hi Chris,
  
   Not sure what you mean by root directory?
  
   Hi Lukasz,
  
   I cross checked and struts-plugin.xml is there.
  
  
  
  
   On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt 
 thechrispr...@gmail.com
   wrote:
  
And in the root directory of the jar file, correct?
  (*Chris*)
   
   
On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi 
 umeshawas...@gmail.com
wrote:
   
 Yes, its there
 Still i will cross check it.

 Thanks
 Umesh


 On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart 
   lukaszlen...@apache.org
 wrote:

  Are you sure that the struts-plugin.xml exists in the jar?
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
   Hi Lukaz,
  
   Its name is struts-plugin.xml, moreover i have used maven to
   generate
   plugin structure for me.
   Not sure why it is happening like this.
  
   I even cross checked it with other plugin provided with
 Struts
  distribution
   and everything is same not sure why this is happening.
  
  
   On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart 
 lukaszlen...@apache.org
  wrote:
  
   How did you name your xml file? It must be
 struts-plugin.xml and
then
   framework will automatically load it.
  
  
   Regards
   --
   Łukasz
   + 48 606 323 122 http://www.lenart.org.pl/
  
   2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
Hi All,
   
Facing Parent package is not defined exception and not
 sure
where
   things
are worng.
   
I have created a new plugin and want to use this plugin
 in my
 web-app,
   this
is how i have defined my plugin package
   
package name=myPlugin extends=struts-default
   
For testing purpose i created a blank application by using
struts2-archetype-blank and this is how i am using
 plugin
package
   
 package name=example namespace=/example
   extends=myPlugin
   
but i am getting following exception on server startup
   
Caused by: Unable to load configuration.
Caused by: Parent package is not defined: myPlugin -
 [unknown
  location]
   
It seems that plugin is not getting included.
Initially i was serving plugin by Maven but in order to
 check
  i
 placed
   jar
inside lib folder and included it in class-path.
   
Any idea where or what i am doing wrong ?
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
  
  
   
 -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail:
 user-h...@struts.apache.org
  
  
  
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 


 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/

   
  
  
  
   --
   With Regards
   Umesh Awasthi
   http://www.travellingrants.com/
  
 
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/

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




 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/






-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
that is really strange..
i used maven to create my sample Struts2 application.

used mvn-install to place plugin jar to local repo and than used maven to
update my struts2 app dependencies.

Seems like issue in Struts2 sample application build.


On Mon, Oct 7, 2013 at 9:05 PM, Lukasz Lenart lukaszlen...@apache.orgwrote:

 It works for me ;-) Right now preparing small demo.


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
  any hint ? :)
 
 
  On Mon, Oct 7, 2013 at 2:19 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:
 
  Hi Lukasz,
 
  here is the repo link
 
  https://github.com/umeshawasthi/jsr303-validator-plugin
 
  Thanks
  Umesh
 
 
  On Mon, Oct 7, 2013 at 12:13 PM, Lukasz Lenart lukaszlen...@apache.org
 wrote:
 
  Yes, please do :-)
 
  2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
   No, its not in sub-directory
   I can share gitHub link if want to have look at structure or files?
  
  
   On Mon, Oct 7, 2013 at 12:08 PM, Chris Pratt 
 thechrispr...@gmail.com
  wrote:
  
   In the top directory (not a sub directory) of the jar file.  It
 should
  NOT
   be in a subdirectory like META-INF or WEB-INF.
 (*Chris*)
  
  
   On Sun, Oct 6, 2013 at 11:37 PM, Umesh Awasthi 
 umeshawas...@gmail.com
   wrote:
  
Hi Chris,
   
Not sure what you mean by root directory?
   
Hi Lukasz,
   
I cross checked and struts-plugin.xml is there.
   
   
   
   
On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt 
  thechrispr...@gmail.com
wrote:
   
 And in the root directory of the jar file, correct?
   (*Chris*)


 On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi 
  umeshawas...@gmail.com
 wrote:

  Yes, its there
  Still i will cross check it.
 
  Thanks
  Umesh
 
 
  On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart 
lukaszlen...@apache.org
  wrote:
 
   Are you sure that the struts-plugin.xml exists in the jar?
  
  
   Regards
   --
   Łukasz
   + 48 606 323 122 http://www.lenart.org.pl/
  
   2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
Hi Lukaz,
   
Its name is struts-plugin.xml, moreover i have used maven
 to
generate
plugin structure for me.
Not sure why it is happening like this.
   
I even cross checked it with other plugin provided with
  Struts
   distribution
and everything is same not sure why this is happening.
   
   
On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart 
  lukaszlen...@apache.org
   wrote:
   
How did you name your xml file? It must be
  struts-plugin.xml and
 then
framework will automatically load it.
   
   
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
   
2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
 Hi All,

 Facing Parent package is not defined exception and
 not
  sure
 where
things
 are worng.

 I have created a new plugin and want to use this plugin
  in my
  web-app,
this
 is how i have defined my plugin package

 package name=myPlugin extends=struts-default

 For testing purpose i created a blank application by
 using
 struts2-archetype-blank and this is how i am using
  plugin
 package

  package name=example namespace=/example
extends=myPlugin

 but i am getting following exception on server startup

 Caused by: Unable to load configuration.
 Caused by: Parent package is not defined: myPlugin -
  [unknown
   location]

 It seems that plugin is not getting included.
 Initially i was serving plugin by Maven but in order to
  check
   i
  placed
jar
 inside lib folder and included it in class-path.

 Any idea where or what i am doing wrong ?

 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/
   
   

  -
To unsubscribe, e-mail:
 user-unsubscr...@struts.apache.org
For additional commands, e-mail:
  user-h...@struts.apache.org
   
   
   
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
  
  
  
 -
   To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
   For additional commands, e-mail:
 user-h...@struts.apache.org
  
  
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 

   
   
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
   
  
  
  
  
   --
   With Regards

Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
Hi Martin,

Not sure why its showing this structure, i tried git for first time so
might be i have done some wrong steps.

But in my local repo struts-plugin.xml in inside resource folder and even
in the jar file it is in root folder.




On Mon, Oct 7, 2013 at 10:06 PM, Martin Gainty mgai...@hotmail.com wrote:

 you have created a link to 'src' which redirects struts-plugin.xml located
 in 'src' link

 Here is the result of the redirect


 https://github.com/umeshawasthi/jsr303-validator-plugin/tree/master/src/main/resources/struts-plugin.xml



 struts-plugin.xml should be always be located in


 https://github.com/umeshawasthi/jsr303-validator-plugin/src/main/resources/struts-plugin.xml


 unlink src



 ..should do it..
 Martin
 __






  From: lukaszlen...@apache.org
  Date: Mon, 7 Oct 2013 17:35:07 +0200
  Subject: Re: Parent package is not defined
  To: user@struts.apache.org
 
  It works for me ;-) Right now preparing small demo.
 
 
  Regards
  --
  Łukasz
  + 48 606 323 122 http://www.lenart.org.pl/
 
  2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
   any hint ? :)
  
  
   On Mon, Oct 7, 2013 at 2:19 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:
  
   Hi Lukasz,
  
   here is the repo link
  
   https://github.com/umeshawasthi/jsr303-validator-plugin
  
   Thanks
   Umesh
  
  
   On Mon, Oct 7, 2013 at 12:13 PM, Lukasz Lenart 
 lukaszlen...@apache.orgwrote:
  
   Yes, please do :-)
  
   2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
No, its not in sub-directory
I can share gitHub link if want to have look at structure or files?
   
   
On Mon, Oct 7, 2013 at 12:08 PM, Chris Pratt 
 thechrispr...@gmail.com
   wrote:
   
In the top directory (not a sub directory) of the jar file. It
 should
   NOT
be in a subdirectory like META-INF or WEB-INF.
(*Chris*)
   
   
On Sun, Oct 6, 2013 at 11:37 PM, Umesh Awasthi 
 umeshawas...@gmail.com
wrote:
   
 Hi Chris,

 Not sure what you mean by root directory?

 Hi Lukasz,

 I cross checked and struts-plugin.xml is there.




 On Mon, Oct 7, 2013 at 12:05 PM, Chris Pratt 
   thechrispr...@gmail.com
 wrote:

  And in the root directory of the jar file, correct?
  (*Chris*)
 
 
  On Sun, Oct 6, 2013 at 11:33 PM, Umesh Awasthi 
   umeshawas...@gmail.com
  wrote:
 
   Yes, its there
   Still i will cross check it.
  
   Thanks
   Umesh
  
  
   On Mon, Oct 7, 2013 at 11:47 AM, Lukasz Lenart 
 lukaszlen...@apache.org
   wrote:
  
Are you sure that the struts-plugin.xml exists in the jar?
   
   
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
   
2013/10/7 Umesh Awasthi umeshawas...@gmail.com:
 Hi Lukaz,

 Its name is struts-plugin.xml, moreover i have used
 maven to
 generate
 plugin structure for me.
 Not sure why it is happening like this.

 I even cross checked it with other plugin provided with
   Struts
distribution
 and everything is same not sure why this is happening.


 On Mon, Oct 7, 2013 at 10:20 AM, Lukasz Lenart 
   lukaszlen...@apache.org
wrote:

 How did you name your xml file? It must be
   struts-plugin.xml and
  then
 framework will automatically load it.


 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/

 2013/10/5 Umesh Awasthi umeshawas...@gmail.com:
  Hi All,
 
  Facing Parent package is not defined exception and
 not
   sure
  where
 things
  are worng.
 
  I have created a new plugin and want to use this
 plugin
   in my
   web-app,
 this
  is how i have defined my plugin package
 
  package name=myPlugin extends=struts-default
 
  For testing purpose i created a blank application by
 using
  struts2-archetype-blank and this is how i am using
   plugin
  package
 
  package name=example namespace=/example
 extends=myPlugin
 
  but i am getting following exception on server
 startup
 
  Caused by: Unable to load configuration.
  Caused by: Parent package is not defined: myPlugin -
   [unknown
location]
 
  It seems that plugin is not getting included.
  Initially i was serving plugin by Maven but in order
 to
   check
i
   placed
 jar
  inside lib folder and included it in class-path.
 
  Any idea where or what i am doing wrong ?
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com

Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
I have got root cause of my issue. I was not checking it thoroughly and
thinking that my plugin is not being loaded properly.

Not sure about root cause yet. I have declared plugin dependency in my
Struts2 sample application's pom.xml as

dependency
   groupIdbean-validator-plugin/groupId
artifactIdbean-validator/artifactId
version1.0-SNAPSHOT/version
  /dependency

but some how this is not being included in my Application, i used Eclipse
export to export war file in standalone tomcat server and on cross checking
lib folder,my plugin jar file was not there.

Thanks
Umesh


On Mon, Oct 7, 2013 at 10:28 PM, Dave Newton davelnew...@gmail.com wrote:

 On Mon, Oct 7, 2013 at 12:53 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Not sure why its showing this structure, i tried git for first time so
  might be i have done some wrong steps.
 

 No, it's fine; that's part of the github directory structure.


  On Mon, Oct 7, 2013 at 10:06 PM, Martin Gainty mgai...@hotmail.com
  wrote:
 
   struts-plugin.xml should be always be located in
  
  
  
 
 https://github.com/umeshawasthi/jsr303-validator-plugin/src/main/resources/struts-plugin.xml


 It is.

 Dave




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-07 Thread Umesh Awasthi
Thanks Everyone, issue was with my Eclipse as it was not updating project
dependencies.


On Mon, Oct 7, 2013 at 10:50 PM, Umesh Awasthi umeshawas...@gmail.comwrote:

 I have got root cause of my issue. I was not checking it thoroughly and
 thinking that my plugin is not being loaded properly.

 Not sure about root cause yet. I have declared plugin dependency in my
 Struts2 sample application's pom.xml as

 dependency
groupIdbean-validator-plugin/groupId
 artifactIdbean-validator/artifactId
 version1.0-SNAPSHOT/version
   /dependency

 but some how this is not being included in my Application, i used Eclipse
 export to export war file in standalone tomcat server and on cross checking
 lib folder,my plugin jar file was not there.

 Thanks
 Umesh


 On Mon, Oct 7, 2013 at 10:28 PM, Dave Newton davelnew...@gmail.comwrote:

 On Mon, Oct 7, 2013 at 12:53 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Not sure why its showing this structure, i tried git for first time so
  might be i have done some wrong steps.
 

 No, it's fine; that's part of the github directory structure.


  On Mon, Oct 7, 2013 at 10:06 PM, Martin Gainty mgai...@hotmail.com
  wrote:
 
   struts-plugin.xml should be always be located in
  
  
  
 
 https://github.com/umeshawasthi/jsr303-validator-plugin/src/main/resources/struts-plugin.xml


 It is.

 Dave




 --
 With Regards
 Umesh Awasthi
 http://www.travellingrants.com/






-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Parent package is not defined

2013-10-05 Thread Umesh Awasthi
Hi All,

Facing Parent package is not defined exception and not sure where things
are worng.

I have created a new plugin and want to use this plugin in my web-app, this
is how i have defined my plugin package

package name=myPlugin extends=struts-default

For testing purpose i created a blank application by using
struts2-archetype-blank and this is how i am using plugin package

 package name=example namespace=/example extends=myPlugin

but i am getting following exception on server startup

Caused by: Unable to load configuration.
Caused by: Parent package is not defined: myPlugin - [unknown location]

It seems that plugin is not getting included.
Initially i was serving plugin by Maven but in order to check i placed jar
inside lib folder and included it in class-path.

Any idea where or what i am doing wrong ?

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-05 Thread Umesh Awasthi
what you mean by registered plugin with struts.xml?


On Sat, Oct 5, 2013 at 8:31 PM, Yaragalla Muralidhar 
yaragallamur...@gmail.com wrote:

 have you registered your myPlugin in struts,xml file.

 *Thanks and Regards,*
 Muralidhar Yaragalla.
 *
 *


 On Sat, Oct 5, 2013 at 8:11 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Hi All,
 
  Facing Parent package is not defined exception and not sure where
 things
  are worng.
 
  I have created a new plugin and want to use this plugin in my web-app,
 this
  is how i have defined my plugin package
 
  package name=myPlugin extends=struts-default
 
  For testing purpose i created a blank application by using
  struts2-archetype-blank and this is how i am using plugin package
 
   package name=example namespace=/example extends=myPlugin
 
  but i am getting following exception on server startup
 
  Caused by: Unable to load configuration.
  Caused by: Parent package is not defined: myPlugin - [unknown location]
 
  It seems that plugin is not getting included.
  Initially i was serving plugin by Maven but in order to check i placed
 jar
  inside lib folder and included it in class-path.
 
  Any idea where or what i am doing wrong ?
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Parent package is not defined

2013-10-05 Thread Umesh Awasthi
Any one have any other inputs?
There was some differences in the DTD defined under plugin xml file and
struts.xml file but even after changing them, i am getting same exception
on server startup


On Sat, Oct 5, 2013 at 8:41 PM, Yaragalla Muralidhar 
yaragallamur...@gmail.com wrote:

 You have written your plugin (your own module) and for that you might have
 written an xml file which contains definitions of actions and all other
 things for your module. for example plugin.xml. I believe this
 statement package
 name=myPlugin extends=struts-default you posted is from that xml
 file. If you have written your own modules. The config xml file of your
 module (Ex:-plugin.xml) should be declared in struts.xml file as shown
 below

 include file=full path to your modules xml file/

 for example:-

 include file=xxx/plugin.xml/

 *Thanks and Regards,*
 Muralidhar Yaragalla.
 *
 *


 On Sat, Oct 5, 2013 at 8:33 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  what you mean by registered plugin with struts.xml?
 
 
  On Sat, Oct 5, 2013 at 8:31 PM, Yaragalla Muralidhar 
  yaragallamur...@gmail.com wrote:
 
   have you registered your myPlugin in struts,xml file.
  
   *Thanks and Regards,*
   Muralidhar Yaragalla.
   *
   *
  
  
   On Sat, Oct 5, 2013 at 8:11 PM, Umesh Awasthi umeshawas...@gmail.com
   wrote:
  
Hi All,
   
Facing Parent package is not defined exception and not sure where
   things
are worng.
   
I have created a new plugin and want to use this plugin in my
 web-app,
   this
is how i have defined my plugin package
   
package name=myPlugin extends=struts-default
   
For testing purpose i created a blank application by using
struts2-archetype-blank and this is how i am using plugin package
   
 package name=example namespace=/example extends=myPlugin
   
but i am getting following exception on server startup
   
Caused by: Unable to load configuration.
Caused by: Parent package is not defined: myPlugin - [unknown
 location]
   
It seems that plugin is not getting included.
Initially i was serving plugin by Maven but in order to check i
 placed
   jar
inside lib folder and included it in class-path.
   
Any idea where or what i am doing wrong ?
   
--
With Regards
Umesh Awasthi
http://www.travellingrants.com/
   
  
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: action class

2013-09-25 Thread Umesh Awasthi
Short answer is Yes, for every new request , a new instance will be created
reason for this is simple, your action classes also work as Model in MVC
and in order to take care of thread safety, its better to create a new
instance.



On Wed, Sep 25, 2013 at 4:39 PM, Yaragalla Muralidhar 
yaragallamur...@gmail.com wrote:

 will action class gets created for every new request even when new request
 is also to the previous actionclass?

 *Thanks and Regards,*
 Muralidhar Yaragalla.
 *
 *




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Struts 2.3.15.1 How to read external properties files or conf files

2013-09-06 Thread Umesh Awasthi
Have you tried http://commons.apache.org/proper/commons-configuration/
it can read various type of property files


On Fri, Sep 6, 2013 at 5:10 PM, Chris christal...@yahoo.fr wrote:

 In fact the problem is how to declare and use external files to work with
 external properties.

 host=xxx.xxx.xxx.xxx
 port=
 ...etc

 Should I understand that only few people use  external configuration files
 with struts web applications ?



 
  De : Dave Newton davelnew...@gmail.com
 À : Struts Users Mailing List user@struts.apache.org
 Envoyé le : Vendredi 6 septembre 2013 13h17
 Objet : Re: Struts 2.3.15.1 How to read external properties files or conf
 files


 How are you trying to load them? As a resource on the classpath?

 Dave
 On Sep 6, 2013 5:51 AM, Chris christal...@yahoo.fr wrote:

  Where : server side , in action , like ActionSupport
 
  First  example : Login.java ( like in struts-2.3.15.1-blank )
  class Login extends com.opensymphony.xwork2.ActionSupport
  to check and validate user/password ( I need access to LDAP or database )
 
  Second Example: A User Request
  After success login, a web user need to access data ( from LDAP or
  Database )
 
 
  java.io.FileNotFoundException : jdbc.properties
  or
 
  java.io.FileNotFoundException : ldapconfiguration.conf
 
 
  Regards
 
 
  
   De : umeshawas...@gmail.com umeshawas...@gmail.com
  À : Struts Users Mailing List user@struts.apache.org; Chris 
  christal...@yahoo.fr
  Envoyé le : Vendredi 6 septembre 2013 10h50
  Objet : Re: Struts 2.3.15.1 How to read external properties files or conf
  files
 
 
  Log4j file will be ready by Log4j framework and not exactly by struts2
 
  Can you define where and how you want to read your property files?
  Sent from BlackBerry® on Airtel
 
  -Original Message-
  From: Chris christal...@yahoo.fr
  Date: Fri, 6 Sep 2013 09:40:03
  To: Struts Users Mailing Listuser@struts.apache.org
  Reply-To: Struts Users Mailing List user@struts.apache.org
  Subject: Struts 2.3.15.1 How to read external properties files or conf
  files
 
  Using log4j.properties instead of log4j.xml is not a problem with Struts
  2.3.15.1 ( or should it be ? )
  But with my own properties files ( jdbc.properties ) or configuration
  files ( ldap.conf ) it doesn't work.
 
 
  Is there any example with external files .
  Not an upload  file by input forms. .
 
  Or do we have to use another java classes ?




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: How to make interceptor to be invoked only for HTTP Request not for Response

2013-07-09 Thread Umesh Awasthi
Interceptor are designed to work in this way..
They work in 2 steps pre-processing and post-processing.The time
Interceptor is called in reverse order, response will already be with your
client  (Browser)

Other option (not good) is to create a custom convertor where you can trim
spaces.

On Tue, Jul 9, 2013 at 8:41 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:

 No, I dont want a filter i want to make it done with strust2 interceptor
 only, my question is how do we achieve this using an interceptor.

 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 


 On Tue, Jul 9, 2013 at 8:39 PM, Paul Benedict pbened...@apache.org
 wrote:

  Agreed. What you want is a Servlet filter, not a Struts interceptor.
 
 
  On Tue, Jul 9, 2013 at 9:54 AM, Sreekanth S. Nair 
  sreekanth.n...@egovernments.org wrote:
 
   I doubt struts2 interceptor work like a filter, just like in ur pseudo
   code. In filter we can specify
   what to do with request and response by adding code before and
   after chain.doFilter(request, response). In Interceptor intercept
 method
   will always get executed before and after req  resp.
  
  
  
  
   --
   Thanks  Regards
   Srikanth
   Software Developer
   
   eGovernments Foundations
   www.egovernments.org
   Mob : 9980078913
   
  
  
   On Tue, Jul 9, 2013 at 6:37 PM, Felipe Lorenz 
   felipe.lor...@idealogic.com.br wrote:
  
I dont think it is possible. But I believe you can just ignore the
response and do nothing with that.
   
I am not sure if I understand your question. But an interceptor has
  only
one call per request/response. So your code could like this:
   
   
public class Interceptor {
   
 method {
 removeSpaceFromRequest();
 String resp = invoke();
 //here, you do nothing with the response.
 return resp;
 }
   
}
   
Felipe Lorenz
Gerente de Projetos
Idealogic Software
Fone: (51) 3715 5523 - (51) 3715 5548
www.idealogic.com.br
   
Em 09/07/2013, às 09:13, Sreekanth S. Nair escreveu:
   
 Yes, i have an Interceptor basically to Trimming of input values, i
   don't
 want to do this to be happened while request coming back with
  response.

 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 


 On Tue, Jul 9, 2013 at 5:41 PM, umeshawas...@gmail.com wrote:

 Any specific reason to do that?
 --Original Message--
 From: Sreekanth S. Nair
 To: Struts Users Mailing List
 ReplyTo: Struts Users Mailing List
 Subject: How to make interceptor to be invoked only for HTTP
 Request
   not
 for Response
 Sent: Jul 9, 2013 5:33 PM

 How to make interceptor to be invoked only for HTTP Request not
 for
 Response



 Sent from BlackBerry® on Airtel
   
   
  
 
 
 
  --
  Cheers,
  Paul
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Umesh Awasthi
Though in most of the cases people use some kind of dependency management
system like
Maven, Ivy etc

which take care of all these aspects.
Though this is clearly mentioned in the Project dependencies page what all
is required
for details refer
http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html

On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:

 Hi,
  Now the struts2 distribution is a single zip file which includes all
 optional and required jars together which is making life very difficult to
 understand, which are the jars required for struts2 to make up and running
 and what are the other optional and dependency jar for plugin and other
 framework support.

 It would be better if the distribution can modular in such a way that
 required
 optional---
plugin---
 convenstional jars and its dependency
 json   jars and its dependency
spring---  jars and its dependency
xyz--- jars and its dependency


 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Difficulty in understanding Struts 2 distribution

2013-06-26 Thread Umesh Awasthi
There is a colum with header Optional which indicate what all is optional
and what is not optional

On Wed, Jun 26, 2013 at 2:32 PM, Sreekanth S. Nair 
sreekanth.n...@egovernments.org wrote:

 I dont think this is correct, we are not using velocity then how come
 struts2 depends on velocity, same for junit. These all are not required
 dependency for strust2 to up and running.

 --
 Thanks  Regards
 Srikanth
 Software Developer
 
 eGovernments Foundations
 www.egovernments.org
 Mob : 9980078913
 


 On Wed, Jun 26, 2013 at 2:18 PM, Umesh Awasthi umeshawas...@gmail.com
 wrote:

  Though in most of the cases people use some kind of dependency management
  system like
  Maven, Ivy etc
 
  which take care of all these aspects.
  Though this is clearly mentioned in the Project dependencies page what
 all
  is required
  for details refer
  http://struts.apache.org/release/2.3.x/struts2-core/dependencies.html
 
  On Wed, Jun 26, 2013 at 2:00 PM, Sreekanth S. Nair 
  sreekanth.n...@egovernments.org wrote:
 
   Hi,
Now the struts2 distribution is a single zip file which includes
 all
   optional and required jars together which is making life very difficult
  to
   understand, which are the jars required for struts2 to make up and
  running
   and what are the other optional and dependency jar for plugin and other
   framework support.
  
   It would be better if the distribution can modular in such a way that
   required
   optional---
  plugin---
   convenstional jars and its dependency
   json   jars and its dependency
  spring---  jars and its dependency
  xyz--- jars and its dependency
  
  
   --
   Thanks  Regards
   Srikanth
   Software Developer
   
   eGovernments Foundations
   www.egovernments.org
   Mob : 9980078913
   
  
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: intercepter parameters in actions

2013-06-26 Thread Umesh Awasthi
You first assumptions is wrong interceptor was
created for each action

Interceptors are not created per action/request but only once and any such
action level data changes are not the best place to do that

On Wed, Jun 26, 2013 at 8:22 PM, Cameron Morris cmor...@part.net wrote:

 Hello Strut-ers,

 When I override an interceptor's parameter in several actions, only the
 last action's parameters are applied.  (Note I'm not referencing a stack,
 but just one interceptor.) I was expecting that a separate interceptor was
 created for each action or that the param would be set before the action
 was called.  Here is an example:

 action name=action1 class=example.myAction1
  intercepter-ref name=myInterceptor
param name=paramA/param
  /intercepter-ref
 /action
 action name=action2 class=example.myAction2
  intercepter-ref name=myInterceptor
param name=paramB/param
  /intercepter-ref
 /action
 action name=action3 class=example.myAction3
  intercepter-ref name=myInterceptor
param name=paramC/param
  /intercepter-ref
 /action

 When calling action1, action2, and action3 the param of myInterceptor
 is always C.  Is this expected behavior or is this bug?

 - Cam Morris




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Struts application

2013-02-20 Thread Umesh Awasthi
download sample application from S2 official download section and you will
be able to see how things are being configured and how things are working.

This is a good place to start and get overview of the structure

On Wed, Feb 20, 2013 at 10:27 PM, Brajesh Patel brajeshpate...@gmail.comwrote:

 Hi all,

 I am looking for an application that provide detail about struts 2 app
 directory structure and detail about action, and other thing.

 that will help lot to me.

 --
 Thanks
 Brajesh Patel

 skype: brajesh.patel11
 Cell:- +91 8750709907




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: iterable tag

2013-01-12 Thread Umesh Awasthi
 scritto:

 Can you cut and paste your s:iterator code into the email so we can see?
(*Chris*)


 On Fri, Jan 11, 2013 at 11:12 AM, fusillator fusilla...@gmail.com
 wrote:

  Hi all, I'm new to struts2/java matters, so be sympathetic please.

 I've a question about s:iterator tag

 I recently used it to loop on a Iterable collection of type
 java.util.TreeMap$Values retrieved by the method
 java.util.TreeMap.values()

 getting the following cast exception:

 2013-01-11 18:45:00,520 DEBUG org.apache.struts.tutorial.**
 wildcard.service.PersonService.getPeople:33 [Person [1: Paolino
 Paperino], Person [2: Paperon De Paperoni], Person [3: Archimede
 Pitagorica]]
 2013-01-11 18:45:00,523 DEBUG org.apache.struts.tutorial.**
 wildcard.service.PersonService.getPeople:34 class
 java.util.TreeMap$Values
 2013-01-11 18:45:00,523 DEBUG org.apache.struts.tutorial.**
 wildcard.service.PersonService.getPeople:34 class
 java.util.TreeMap$Values
 gen 11, 2013 6:45:01 PM org.apache.jasper.compiler.TldLocationsCache
 tldScanJar
 WARNING: Caught an exception while evaluating expression 'people.isEmpty'
 against value stack
 java.lang.ClassCastException: java.util.TreeMap$Values cannot be cast to
 java.util.Set
  at ognl.SetPropertyAccessor.getProperty(**
 SetPropertyAccessor.java:47)
  at com.opensymphony.xwork2.ognl.accessor.**
 XWorkCollectionPropertyAccessor.getProperty(**
 XWorkCollectionPropertyAccessor.java:93)
  at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2300)

 The used variable is reported by log4j.
 Is there any restriction on the iterator tags?
 Could someone suggest me a tutorial/howto about ognl/value stack?

 Best regards



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




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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: How to make three text boxes appear in one row using struts2 tags?

2013-01-03 Thread Umesh Awasthi
Simple theme will not generate any markup from S2 side and will give all
control to you to handle display using CSS
You can use CSS and markup to display it as per your requirement

S2 has already done its work by handing over simple HTML

On Thu, Jan 3, 2013 at 2:31 PM, mahalakshmi.jayaku...@wipro.com wrote:

 Hai,

 I have three select  strut tags which are Date, Month and Year which I
 need to display in a single row. So as per your suggestion I have written
 theme=simple. Then the select boxes were aligned in the same row but the
 complete row is shown in the 1st row of the form instead of being displayed
 in the 3rd row.

 Can you please help me in this issue.

 Regards,
 Mahalakshmi.

 The information contained in this electronic message and any attachments
 to this message are intended for the exclusive use of the addressee(s) and
 may contain proprietary, confidential or privileged information. If you are
 not the intended recipient, you should not disseminate, distribute or copy
 this e-mail. Please notify the sender immediately and destroy all copies of
 this message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient
 should check this email and any attachments for the presence of viruses.
 The company accepts no liability for any damage caused by any virus
 transmitted by this email.

 www.wipro.com




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Prototype beans

2012-12-03 Thread Umesh Awasthi
Not sure if i am able to understand your question
Can you clarify what you mean by
*How can we achieve edit with prototype beans*

In particular *edit*
On Mon, Dec 3, 2012 at 2:49 PM, Puneet Babbar 2 pbabb...@sapient.comwrote:

 Are you using annotations or xml approach to work with struts? And have
 you checked what happens when you don't define your struts actions as
 prototype?

 -Puneet

 -Original Message-
 From: rohit [mailto:ro...@in-rev.com]
 Sent: Monday, December 03, 2012 2:13 PM
 To: user@struts.apache.org
 Subject: Prototype beans


 We are defining struts action classes in spring as prototype bean, in this
 while editing a particular bean a new object is being inserted, I can
 imagine this would be because of prototype nature of beans.

 How can we achieve edit with prototype beans?

 Regards,
 Rohit




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Struts2 String ThreadSafe?

2012-11-29 Thread Umesh Awasthi
First and foremost for using spring with Struts2 make your action bean
scope prototype
and is not be ready for the weird issues

Struts2 itself create a new request instance as well other objects
associated with itself to make it thread safe.



On Thu, Nov 29, 2012 at 8:59 PM, rohit ro...@in-rev.com wrote:

  Hi,
We are using Struts2-Spring integration and all my action classes
 implement SessionAware, sample code to action class and their spring
 definition is given below,
  public class IRXxxxAction extends ActionSupport implements SessionAware {
 private Map session; public String execute() {//} public void
 setSession(Maplt;String, Objectgt; session) { this.session = session; } }
  Spring Configuration
  lt;bean name=userAction class=com.IRXxxxAction gt; lt;property
 name=adminDAO ref=adminDAO /gt; lt;/beangt; If I understand
 correctly, each auto-wired property will be a singleton, so if the above is
 true, is there anyway that the session map get shared between two
 simultaneous requests?
  Regards,








-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Struts2 String ThreadSafe?

2012-11-29 Thread Umesh Awasthi
I believe you should look more in to more spring doc to see how spring
provide instance based on the scope provided for the bean.

Struts2-Spring integration is only providing bridge where in place of
struts internal DI, Spring is handling DI for you but rest of the flow and
concepts will be same

Thanks
Umesh

On Fri, Nov 30, 2012 at 12:25 PM, Chris Pratt thechrispr...@gmail.comwrote:

 It's not a chance, the same instance is being used for all requests to that
 action.
   (*Chris*)


 On Thu, Nov 29, 2012 at 7:42 AM, Rohit Gupta ro...@simplify360.com
 wrote:

  So given the fact that my beans are not prototype, there is a chance that
  the same action class may be used for two consecutive requests.
 
  Regards,
 
 
  On 29/11/12 9:02 PM, Umesh Awasthi umeshawas...@gmail.com wrote:
 
  First and foremost for using spring with Struts2 make your action bean
  scope prototype
  and is not be ready for the weird issues
  
  Struts2 itself create a new request instance as well other objects
  associated with itself to make it thread safe.
  
  
  
  On Thu, Nov 29, 2012 at 8:59 PM, rohit ro...@in-rev.com wrote:
  
Hi,
  We are using Struts2-Spring integration and all my action classes
   implement SessionAware, sample code to action class and their spring
   definition is given below,
public class IRXxxxAction extends ActionSupport implements
  SessionAware {
   private Map session; public String execute() {//} public void
   setSession(Maplt;String, Objectgt; session) { this.session =
 session;
  } }
Spring Configuration
lt;bean name=userAction class=com.IRXxxxAction gt; lt;property
   name=adminDAO ref=adminDAO /gt; lt;/beangt; If I understand
   correctly, each auto-wired property will be a singleton, so if the
  above is
   true, is there anyway that the session map get shared between two
   simultaneous requests?
Regards,
  
  
  
  
  
  
  
  
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 
 
 
 
  -
  To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
  For additional commands, e-mail: user-h...@struts.apache.org
 
 




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: release date for new version?

2012-11-19 Thread Umesh Awasthi
Its under process, currently voting is under process for 2.3.7 release



On Mon, Nov 19, 2012 at 4:04 PM, J. Garcia jogaco...@gmail.com wrote:

 Will version 2.3.7 be released any time soon?

 https://issues.apache.org/jira/browse/WW/fixforversion/12323448

 Cheers,
 J.




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: Best place to define properties for plugin

2012-09-05 Thread Umesh Awasthi
Thanks Gabriel  for the valuable inputs

On Wed, Sep 5, 2012 at 7:48 PM, Gabriel Belingueres
belingue...@gmail.comwrote:

 2012/9/4 Umesh Awasthi umeshawas...@gmail.com:
  I am in process to create a plugin and i need to pass provider class as
  well some other properties to the plugin bean class.
  though i can define them in side the plugin's  xml file but want these
  properties to be configurable.

 I know of several ways of doing this:

 1) Defining the property as usual with its own setter/getter in the
 plugin class. This will let you configure it with the param tag when
 you define your interceptor stack. You should provide a sensitive
 default value in case no param tag is present.

 2) Declaring a bean for injecting an instance of some class using
 the IoC container provided with Struts. In your plugin you need to
 annotate with @Inject the setter method that will be called to inject
 the instance.

 3) Declare a constant that will specify the *name* of a bean to
 inject. This is what is annotated with @Inject.
 Also you need to inject an instance of the Container class.
 In the init() method of the plugin, just call:
 container.getInstance(MyClass.class, myInjectedString);
 to get the proper instantiation of a given type. This is most useful
 when you have different strategies of accomplish some functionality
 and you can choose one by declaring a constant.

 4) Idem 3), but instead of declaring a global constant you use a
 property as in 1), then you can have different interceptor stacks with
 different values assigned to this particular functionality.

  Since struts.xml loads after the plugin loading so i can not define the
  properties there, any suggestion how to accomplish this ?

 The only constraint I know of is that a plugin must not depend on (nor
 interfere with) definitions done in other plugin.

 HTH,
 Gabriel

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




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: struts2.3.1.2 does not come with jquery-plugin jar

2012-08-15 Thread Umesh Awasthi
I believe there should not be any issue while using this combination.
Have you tried this or facing any issue?

On Wed, Aug 15, 2012 at 6:33 PM, Omar Ngarigari ngarigar...@yahoo.comwrote:

 Hello,

 I just want to know if it is okay to use struts2-jquery-plugin.3.3.1.jar
 with struts2-core-.3.1.2.jar.

 Thanks,




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Re: struts2.3.1.2 does not come with jquery-plugin jar

2012-08-15 Thread Umesh Awasthi
I believe  some kind of Debugging tool like firebug at client side will
give you much more information to find out the reason.
are you testing it on IE and object expected is very much famous with IE.

Use Mozilla with firebug to see what actually causing it and it seems more
like client side issue than S2

On Wed, Aug 15, 2012 at 9:43 PM, Omar Ngarigari ngarigar...@yahoo.comwrote:

 Thanks Dave for responding. I am expecting to see the spinning wheel
 which is an indicator image (images/indicator.gif) to display when I click
 on the submit button. I am getting javascript error, but it does not say
 much other than object expected:. I am using normal struts2 tags on the
 form and jquery tags on submut button.
 This is my jar files:

 struts2-core-2.3.1.2
 struts2-jquery-plugin-3.3.1.jar


 Thanks,


 
  From: Dave Newton davelnew...@gmail.com
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Wednesday, August 15, 2012 10:57 AM
 Subject: Re: struts2.3.1.2 does not come with jquery-plugin jar

 Without knowing anything about what is or isn't working, what's supposed to
 happen vs. what does, it's really difficult to provide assistance. I don't
 see a taglib for the normal S2 tags, though.

 Dave

 On Wed, Aug 15, 2012 at 9:27 AM, Omar Ngarigari ngarigar...@yahoo.com
 wrote:

  Yes, I have tried it before, I did not get the expected results, but It
  could be due to some other related issues I am not aware of it. I am
 trying
  to show the indicator image when the request is made. I don't want to use
  the action name on the form because I have several submit buttons that
  shares the same form.
 
  This is how I did it.
  %@ taglib prefix=sj uri=/struts-jquery-tags%
  head
  sj:head jqueryui=true/
  /head
  s:form
  s:url id=agencyBills value=/generateAgencyBills.action/s:url
 
  sj:submit href=%{billsAction} value=Generate
  Bills indicator=indicator
  button=true style=width:20em;/
  /s:form
  img id=indicator style=display:none src=./images/indicator.gif
  alt=Loading.../
 
 
  
   From: Umesh Awasthi umeshawas...@gmail.com
  To: Struts Users Mailing List user@struts.apache.org; Omar Ngarigari 
  ngarigar...@yahoo.com
  Sent: Wednesday, August 15, 2012 9:10 AM
  Subject: Re: struts2.3.1.2 does not come with jquery-plugin jar
 
  I believe there should not be any issue while using this combination.
  Have you tried this or facing any issue?
 
  On Wed, Aug 15, 2012 at 6:33 PM, Omar Ngarigari ngarigar...@yahoo.com
  wrote:
 
   Hello,
  
   I just want to know if it is okay to use
 struts2-jquery-plugin.3.3.1.jar
   with struts2-core-.3.1.2.jar.
  
   Thanks,
 
 
 
 
  --
  With Regards
  Umesh Awasthi
  http://www.travellingrants.com/
 



 --
 e: davelnew...@gmail.com
 m: 908-380-8699
 s: davelnewton_skype
 t: @dave_newton https://twitter.com/dave_newton
 b: Bucky Bits Blog http://buckybits.blogspot.com/




-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/


Test mail

2009-01-23 Thread umesh awasthi
Test Mail


Re: Problem in sending mail to mailing list

2009-01-23 Thread umesh awasthi
its not a big one
just a small fragment but when ever iam trying to post it i am getting the
same message

thats why i am clueless

i even tried to send same message from my other id but faced same problem,
then i even removed the XML
part from my post but  problem remains same

can you suggest any thing else to look in to??


On 1/23/09, Dave Newton newton.d...@yahoo.com wrote:

 shekher awasthi wrote:

 when i am trying to paste content of my xml file [...]


 How big is your XML snippet? People post fairly large XML fragments all the
 time with no issues, AFAIK.

 Dave

 == sanity check ==

 ?xml version=1.0 encoding=UTF-8 ?

 !DOCTYPE struts PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 2.0//EN
http://struts.apache.org/dtds/struts-2.0.dtd;

 !-- START SNIPPET: xworkSample --
 struts

!-- Some or all of these can be flipped to true for debugging --
constant name=struts.i18n.reload value=false /
constant name=struts.devMode value=true /
constant name=struts.configuration.xml.reload value=false /
constant name=struts.custom.i18n.resources value=globalMessages /
constant name=struts.action.extension value=action,, /

constant name=struts.codebehind.defaultPackage value=person /
constant name=struts.freemarker.manager.classname
 value=customFreemarkerManager /
constant name=struts.serve.static value=true /
constant name=struts.serve.static.browserCache value=false /

include file=struts-chat.xml /

include file=struts-interactive.xml /

include file=struts-hangman.xml /

include file=struts-tags.xml/

include file=struts-validation.xml /

include file=struts-actionchaining.xml /

include file=struts-ajax.xml /

include file=struts-fileupload.xml /

include file=struts-person.xml /

include file=struts-wait.xml /

include file=struts-jsf.xml /

include file=struts-token.xml /

include file=struts-model-driven.xml /

include file=struts-integration.xml /

include file=struts-filedownload.xml /

include file=struts-conversion.xml /

include file=struts-freemarker.xml /

include file=struts-tiles.xml /

include file=struts-xslt.xml /

package name=default extends=struts-default
interceptors
interceptor-stack name=crudStack
  interceptor-ref name=checkbox /
interceptor-ref name=params /
interceptor-ref name=staticParams /
interceptor-ref name=defaultStack /
/interceptor-stack
/interceptors

default-action-ref name=showcase /

action name=showcase
resultshowcase.jsp/result
/action

action name=viewSource
 class=org.apache.struts2.showcase.source.ViewSourceAction
resultviewSource.jsp/result
/action

action name=date class=org.apache.struts2.showcase.DateAction
 method=browse
result name=success/date.jsp/result
/action

/package

package name=skill extends=default namespace=/skill
default-interceptor-ref name=crudStack/

action name=list
 class=org.apache.struts2.showcase.action.SkillAction method=list
result/empmanager/listSkills.jsp/result
interceptor-ref name=basicStack/
/action
action name=edit
 class=org.apache.struts2.showcase.action.SkillAction
result/empmanager/editSkill.jsp/result
interceptor-ref name=params /
interceptor-ref name=basicStack/
/action
action name=save
 class=org.apache.struts2.showcase.action.SkillAction method=save
result name=input/empmanager/editSkill.jsp/result
result
 type=redirectedit.action?skillName=${currentSkill.name}/result
/action
action name=delete
 class=org.apache.struts2.showcase.action.SkillAction method=delete
result name=error/empmanager/editSkill.jsp/result
result
 type=redirectedit.action?skillName=${currentSkill.name}/result
/action
/package

package name=employee extends=default namespace=/employee
default-interceptor-ref name=crudStack/

action name=list
 class=org.apache.struts2.showcase.action.EmployeeAction method=list
result/empmanager/listEmployees.jsp/result
interceptor-ref name=basicStack/
/action
action name=edit-*
 class=org.apache.struts2.showcase.action.EmployeeAction
param name=empId{1}/param
result/empmanager/editEmployee.jsp/result
interceptor-ref name=crudStackparam
 name=validation.excludeMethodsexecute/param/interceptor-ref
/action
action name=save
 class=org.apache.struts2.showcase.action.EmployeeAction method=save
result name=input/empmanager/editEmployee.jsp/result
result
 type=redirectedit-${currentEmployee.empId}.action/result
/action
action name=delete
 

Re: Using DOJO in Struts2

2008-04-22 Thread umesh awasthi
Thanks Jeromy for the detailed Explanation

you have mentioned the point on which we are also confused...
we are on analysis phase of using any external ajax libraray with out coming
struts2 based applications

We have got lot of favourable comments for YUI over DOJO (Previously we
haqve faced some performance issues by using DOJO)

Still we will create a sample application for testing the functionality of
DOJO with struts2.

Hope it will help us to decide the path..
:)

Jermony can u share your exp of using YUI as we don't have much idea abt it
,like Its performance and intergation with struts2? i thik that will also
help us to choose the path.


we haven't given any thought of enhancing ftl.
surely Tom we will also look in to this aspect..

any other suggestuion in this regard will be much appriciated..

-S


On 4/22/08, tom tom [EMAIL PROTECTED] wrote:

 Hi,

 Instead of directly using DOJO 1.x, did you think
 about
 enhancing the ftl with a new theme type

 Thanks

 --- umesh awasthi [EMAIL PROTECTED] wrote:

  Thanks Jeromy for the rply
  we will try to impliment DOJO 1.x along with struts2
 
  some point i want to confirm if u have any exp using
  dojo with struts2
 
  1) IF we will replace the Struts2 ajax tag with dojo
  will there be any
  functional changes to struts2
  lilke action automatically populate form beans in
  the action.
 
  if we will use dojo tags will it again populate the
  beans like struts2 do on
  each request??
 
  or any other specific configuration which we have to
  take in to account??
 
 
  --S
 
 
  On 4/21/08, Jeromy Evans
  [EMAIL PROTECTED] wrote:
  
   umesh awasthi wrote:
  
Hi All,
   
   
   
Our current version of Struts2 is using DOJO
  toolkit version
0.4.x(Correct
me if i am wrong)
   
   
   
   Correct. Struts 2.0.x uses Dojo 0.4.0.  Struts
  2.1.x uses Dojo 0.4.3 at
   the moment.
  
my point is as we have earlier experience of
  using DOJO with java (Not
Struts2),we want to use DOJO with higher
  version(0.9 or higher)
with current version of struts2(In our case it
  is struts-2.0.11.1)
   
how can we achieve this ??
   
   
   
   Don't use the Struts2 ajax tags.  Use Dojo 1.x
  directly following the
   instructions provided by Dojo.  They're
  independent. You can use any
   client-side library with Struts2 and Dojo is an
  excellent choice.  Likewise,
   you can use Dojo with any server-side framework
  you like and Struts2 is a
   good choice.
  
   Instead of using tags like s:tabbedpanel you'll
  be using dojo markup
   directly (eg. div dojoType=whatever).
  
   Work has started on providing Dojo 1.x tags for
  Stuts2 that replace the
   functionality of the existing tags, but my view is
  that you will benefit
   more by learning and using Dojo the way its
  designers intended.
  
   regards,
   Jeromy Evans
  
  
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
  
  
 




 
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Using DOJO in Struts2

2008-04-22 Thread umesh awasthi
thks Jeromy for valuable feedback

hope it will solve our purpose..

-S


On 4/22/08, Jeromy Evans [EMAIL PROTECTED] wrote:

 umesh awasthi wrote:

  Thanks Jeromy for the detailed Explanation
 
  you have mentioned the point on which we are also confused...
  we are on analysis phase of using any external ajax libraray with out
  coming
  struts2 based applications
 
 
 
 I should mention here that there are other server-side frameworks that
 provide better integration for rich client-side widgets.  This is not a
 strength of Struts 2 at the moment.  If interested, start here:
 http://raibledesigns.com/rd/entry/comparing_jvm_web_frameworks_presentation

 We have got lot of favourable comments for YUI over DOJO (Previously we
  haqve faced some performance issues by using DOJO)
 
 
 

 The performance issues for Dojo were previously dominated by the library
 parsing your HTML to find and instantiate widgets and the lazy-loading of
 resources.
 They're costs of unobtrusive javascript.  The new tags in Struts2.1 went
 to some length to provide better control over that process.
 I believe Dojo1+ has also made major performance improvements .

 Still we will create a sample application for testing the functionality of
  DOJO with struts2.
 
  Hope it will help us to decide the path..
  :)
 
  Jermony can u share your exp of using YUI as we don't have much idea abt
  it
  ,like Its performance and intergation with struts2? i thik that will
  also
  help us to choose the path.
 
 
 
 
 YUI is great.  It doesn't have the fancy widgets of other libraries but it
 is so well designed and well documented that it's a pleasure to use.  Even
 the library's code is easy to understand.  Musachy put me onto it.
 There's no issues using it with Struts2, as with any other typical client
 side library.  Simply follow their examples.  We initially created some
 struts2 tags for it but I don't use them any more :
 http://cwiki.apache.org/S2PLUGINS/yui-plugin.html  (datetimepicker,
 autocomplete, submit, div, anchor, tabview)

 There are three major perceived drawbacks for YUI:
  - the widget set is small in number compared to other libraries.  It
 grows faster than I can keep up, but it's not fancy compared to MooTools or
 Scriptaliciouis;
  - you need to learn object-oriented javascript.  Properly.  I get the
 impression this scares off non-programmers.
  - it's Yahoo. I have no problem with that as there's brilliant paid
 programmers behind it, but some people seem to have issues with such
 open-source projects.


 we haven't given any thought of enhancing ftl.
  surely Tom we will also look in to this aspect..
 
  any other suggestuion in this regard will be much appriciated..
 
 
 
 Don't discount Dojo without first trying to use it directly.  It is
 different from YUI in that you can rely on their markup without getting
 heavily into the javascript until you need custom widgets. That has got to
 have its advantages for many projects. If you liked the struts tags you'll
 probably like using Dojo directly.

 Hope that helps,
 Jeromy Evans



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Using DOJO in Struts2

2008-04-21 Thread umesh awasthi
Hi All,

We are using Struts2 for our development,currently we are using
struts-2.0.11.1
As we know that struts2 is using DOJO toolkit internally for ajax support

we have previously used DOJO toolkit for UI develoment and it is a gr8
toolkit for ajax based application,with the announcement of DOJO 1.x
some of the issues involved with the DOJO like previously it was heavy for
loading have been improved significantly.

Our current version of Struts2 is using DOJO toolkit version 0.4.x(Correct
me if i am wrong)

my point is as we have earlier experience of using DOJO with java (Not
Struts2),we want to use DOJO with higher version(0.9 or higher)
with current version of struts2(In our case it is struts-2.0.11.1)

how can we achieve this ??

any suggestion or help in this regard will be much appriciated.

S


Re: Using DOJO in Struts2

2008-04-21 Thread umesh awasthi
Thanks Jeromy for the rply
we will try to impliment DOJO 1.x along with struts2

some point i want to confirm if u have any exp using dojo with struts2

1) IF we will replace the Struts2 ajax tag with dojo will there be any
functional changes to struts2
lilke action automatically populate form beans in the action.

if we will use dojo tags will it again populate the beans like struts2 do on
each request??

or any other specific configuration which we have to take in to account??


--S


On 4/21/08, Jeromy Evans [EMAIL PROTECTED] wrote:

 umesh awasthi wrote:

  Hi All,
 
 
 
  Our current version of Struts2 is using DOJO toolkit version
  0.4.x(Correct
  me if i am wrong)
 
 
 
 Correct. Struts 2.0.x uses Dojo 0.4.0.  Struts 2.1.x uses Dojo 0.4.3 at
 the moment.

  my point is as we have earlier experience of using DOJO with java (Not
  Struts2),we want to use DOJO with higher version(0.9 or higher)
  with current version of struts2(In our case it is struts-2.0.11.1)
 
  how can we achieve this ??
 
 
 
 Don't use the Struts2 ajax tags.  Use Dojo 1.x directly following the
 instructions provided by Dojo.  They're independent. You can use any
 client-side library with Struts2 and Dojo is an excellent choice.  Likewise,
 you can use Dojo with any server-side framework you like and Struts2 is a
 good choice.

 Instead of using tags like s:tabbedpanel you'll be using dojo markup
 directly (eg. div dojoType=whatever).

 Work has started on providing Dojo 1.x tags for Stuts2 that replace the
 functionality of the existing tags, but my view is that you will benefit
 more by learning and using Dojo the way its designers intended.

 regards,
 Jeromy Evans


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]