Re: How to get instance of the given dependency using Container

2012-10-01 Thread Aum Strut
I am still confused the way Struts2 internal DI and container.getInstance()
working
since i have this inside my class

private Class provider;
public void setProvider( Class provider)
{
this.provider = provider;
}

So if at run time i want to inject my provider, so i will be declaring a
constant for my plugin say



so i believe now i have to do the following steps

1. Get an instance of the provider based on the constant name
2. Init my provider with the instance i got from Struts2 DI

so i guess i need to do this either in init method or my bean constructor

 init(){

setProvider(container.getInstance(Provider.class,"provider.name"));
}

but above will not work ,since as per the getInstance() method
signature T getInstance
(Class type, String name)
i will getting instance of Provider class and which means either i have to
change the signature of  public void setProvider( Class
provider)

which means loosing the generics capability as my intentions are to inject
any class which extends Provider.

i am all confused here and not sure what exact is to do, nor i want to add
any further dependencies.

Any suggestion as how to achieve this?

Thanks



On Mon, Oct 1, 2012 at 6:09 PM, Lukasz Lenart wrote:

> 2012/10/1 Aum Strut :
> > i was thinking about a way like Spring DI used to do something like
> >
> > 
> >
> > 
> >
> > It would be more convient to have injection like this way.
>
> Just annotate your setter with @Inject(name="a") and create constant
> in struts.xml. If "a" is a String value.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: How to get instance of the given dependency using Container

2012-10-01 Thread Aum Strut
i was thinking about a way like Spring DI used to do something like


   


It would be more convient to have injection like this way.


On Mon, Oct 1, 2012 at 3:28 PM, Lukasz Lenart wrote:

> 2012/10/1 Aum Strut :
> > Only information i was having that all provider classes will have to
> > extends MyClass and there are not any specific set of classes
> > which implements MyClass.
> >
> > So i was trying to make the provider inside my plugin a more generic
> which
> > should be capable enough to hook itself with any provider
> > which satisfy the contact (  )
> >
> > is there any way to do this with S2 internals?
>
> Generics are erased during compile time, there is no option to check
> that. Use interface instead.
>
>
> Kind regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: How to get instance of the given dependency using Container

2012-10-01 Thread Aum Strut
Thanks Lukasz for the inputs.

I am using S2 DI because i am doing it for my plugin.

For Plugin to work with different implementations  my intentions let user
specify the provider class at configuration time and based on the user
provider class i want to init the plugin mechanism.

Only information i was having that all provider classes will have to
extends MyClass and there are not any specific set of classes
which implements MyClass.

So i was trying to make the provider inside my plugin a more generic which
should be capable enough to hook itself with any provider
which satisfy the contact (  )

is there any way to do this with S2 internals?

Thanks

On Mon, Oct 1, 2012 at 3:10 PM, Lukasz Lenart wrote:

> 2012/9/30 Aum Strut :
> > How can i pass this information to the container to get the instance
> > of the class passed at run time?
>
> First of all you shouldn't use Struts2 internal DI mechanism, use
> Spring or Guice. But if you don't have any other option just declare
> your bean in struts.xml and call with
>
> container.getInstance(MyClass.class)
>
> 
>
> or with interface
>
> container.getInstance(MyInterface.class)
>
> 
>
> or with two or more implementations
>
> container.getInstance(MyInterface.class, "impl1")
>
> 
> 
>
> And there are scopes as well.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: How to get instance of the given dependency using Container

2012-09-30 Thread Aum Strut
Thanks Gabriel for the help, but i am a bit confused about it.

Can you please help me to understand why we are using those two entries
like
one is a constant and other is a bean class?

while my understanding was that all i need to define a constant and based
on that i can get the actual class (extending MyCustomClass) from the
container.

I am still not sure about the use of bean? and if i go with your opinion
say

public class MyClass{
   private Class provider;

   public initialization() {
 provider = container.getInstance(MyCustomClass.class, constant);}
 }

Won't above statement will give an error "Type mismatch: cannot convert
from MyCustomClass to Class" ?

Thanks
-U
On Mon, Oct 1, 2012 at 6:43 AM, Gabriel Belingueres
wrote:

> This is a two step process: You can define a String property to hold
> the "name" of the required instance to inject, and then inject the
> appropiate instance with the given name.
>
> For example you can define a constant:
>
>   
>
>class="com.foo.MyCustomClassProvider" />
>
>
>
> @Inject(value="my.constant")
> public void setConstant(String value) {
>   this.constant = constant;
> }
>
> public initialization() {
>   provider = container.getInstance(MyCustomClass.class, constant);
> }
>
> HTH,
> Gabriel
>
>
> 2012/9/30 Aum Strut :
> > Hi All,
> >
> > I am working on a requirement where i need to get instance of given class
> > at run time using Struts2 Container and here is my Code
> >
> > public class MyClass{
> >
> >   private Class provider;
> >
> >  public MyClass(@inject Container container){
> >
> > provider=container.getInstance();  // this is where i got strucked
> >
> >  }
> >
> > }
> >
> > Since Provider can by anyone who extends MyCustomClass so i am not
> > sure before hand which implementation will be provided at run time.I
> > am not sure how to get instance in this case from container.
> >
> > for e.g At run time there can be Either ClassA or ClassB or may be
> > ClassC which all extends MyCustomClass.
> >
> > How can i pass this information to the container to get the instance
> > of the class passed at run time?
> >
> >
> > Thanks in advance
> >
> > -a
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Re: Using Base Action for application (struts2)

2012-06-28 Thread Aum Strut
I am planning to create  path (web-root path), like kind of application
specific variable with whome i can refer all my CSS,JS and images

though i can do it with simple JSTL etc but want to create a simple approach

its quite possible i  might be entirely wrong here in term of approach

On Thu, Jun 28, 2012 at 10:23 PM, samsongbest  wrote:

> Hi,
>
> Maybe my understanding is wrong. Please go ahead.
>
>
>
>
> Best Regards,
> Sam Song
> Cognizant Technology Solutions
>
> From: vEnkaTa mohAna rAo SriperumbUdUru
> Date: 2012-06-29 01:21
> To: Struts Users Mailing List; samsongbest
> Subject: Re: Re: Using Base Action for application (struts2)
> Hi,
>
> What you want to do here, explain to us if so we can provide better
> solutions how it should be done in struts2 style.
>
> Java Rocks.
>
>
> On Thu, Jun 28, 2012 at 9:44 PM, samsongbest 
> wrote:
>
> Hi Aum,
>
> Let me give you some simple code.
>
> public Class BaseAction{
>
> //constructor method
> public BaseAction() {
> property = ...;
> }
>
> String property;
>
> //get
> //set
> }
>
> I think any other action extends BaseAction can use "property" directly
> without calling any other method.
> Is that what you want?
>
>
>
>
>
> Best Regards,
> Sam Song
> Cognizant Technology Solutions
>
> From: Aum Strut
>
> Date: 2012-06-29 00:36
> To: samsongbest
> CC: Struts Users Mailing List
> Subject: Re: Using Base Action for application (struts2)
>
> I am not sure what you mean by constructor method??
>  u mean prepare method??
>
>
> On Thu, Jun 28, 2012 at 9:19 PM, samsongbest 
> wrote:
>
>
> Hi Aum,
>
> How about put the init type work in the constructor method of the
> BaseAction?
>
>
>
>
>
> Best Regards,
> Sam Song
> Cognizant Technology Solutions
>
> From: Aum Strut
> Date: 2012-06-29 00:05
> To: Struts Users Mailing List
>
> Subject: Using Base Action for application (struts2)
>
> Hi All,
>
> I am not sure how to do this, i am planning to create a BaseAction class
> and will do some init type work here which should be available to each and
> every action without need to call that specific method.
>
> Idea is to create a property which is needed by each and every
> Action/Request and i don't want to call that method from each and every
> action.
>
> is there a way to achieve this?
>


Re: Using Base Action for application (struts2)

2012-06-28 Thread Aum Strut
I am not sure what you mean by constructor method??
 u mean prepare method??

On Thu, Jun 28, 2012 at 9:19 PM, samsongbest  wrote:

> **
> Hi Aum,
>
> How about put the init type work in the constructor method of the
> BaseAction?
>
> --
>
> Best Regards,
>
> *Sam Song*
>
> *Cognizant Technology Solutions <http://www.cognizant.com/>*
>
>  *From:* Aum Strut 
> *Date:* 2012-06-29 00:05
> *To:* Struts Users Mailing List 
> *Subject:* Using Base Action for application (struts2)
>  Hi All,
>
> I am not sure how to do this, i am planning to create a BaseAction class
> and will do some init type work here which should be available to each and
> every action without need to call that specific method.
>
> Idea is to create a property which is needed by each and every
> Action/Request and i don't want to call that method from each and every
> action.
>
> is there a way to achieve this?
>
>


Re: Help with problem: ThreadLocal left after stopping tomcat

2012-03-11 Thread Aum Strut
Tom,
If the issue still persist, i suggest you to open a JIRA ticket with
information about your use-case as it might be still be a bug

On Wed, Mar 7, 2012 at 7:47 PM, Tom K  wrote:

> Thanks for the reply.
>
> Based on my experimentation it appears these threads are started by the
> Struts framework on startup. As I mentioned if I comment out my
> StrutsPrepareAndExecute filter
> and start/stop the app, I don't get any SEVERE warnings from tomcat.
>
> I can catch the Web Application shutdown by implementing a
> ContextLoaderListener
> and perform
> cleanup by overriding the contextDestroyed() method. However in my
> searching and
> reading so far
> I haven't found a solid clue as to what classes or beans struts uses I
> might
> explicitly try and get
> to and force cleanup on.
>
> Does anyone have any ideas?
>
> Thanks,
> Tom
>
>
>
> - Original Message 
> From: Greg Lindholm 
> To: Struts Users Mailing List 
> Sent: Wed, March 7, 2012 7:56:53 AM
> Subject: Re: Help with problem: ThreadLocal left after stopping tomcat
>
> I also get a boat-load of these ThreadLocal errors when I stop my app
> (using Tomcat 6).  Tomcat 6 & 7 are now checking and reporting on all the
> debris that gets left behind when an app shuts down.
>
> I don't think the WW-560 addresses this problem.
>
> If I understand it correctly the problem is when the app shuts down it is
> failing to cleanup some ThreadLocal variables. To fix this issue something
> would need to keep track of these variables and remove them when the app
> terminates. It also means it would need to either be notified about the
> shutdown or explicitly called to cleanup during shutdown.  Since these are
> ThreadLocal it could be a tricky problem.
>
>
>
> On Tue, Mar 6, 2012 at 11:57 AM, Tom K  wrote:
>
> > Hello,
> >
> >
> > When stopping or undeploying my struts 2 web app in Tomcat (7.0.23) I get
> > several severe warnings from tomcat:
> > SEVERE: The web application [/myapp] created a ThreadLocal with key  of
> > type
> > [com.opensymphony.xwork2.inject.ContainerImpl$10] (value
> > [com.opensymphony.xwork2.inject.ContainerImpl$10@1376afa]) and a value
> >  of type
> > [java.lang.Object[]] (value [[Ljava.lang.Object;@15075f9]) but  failed
> to
> > remove
> > it when the web application was stopped. Threads are  going to be renewed
> > over
> > time to try and avoid a probable memory leak.
> >
> > I've hunted all over the web and found this error repeated in several
> >  places,
> > but I haven't yet found a solution. I then found some posts  that lead me
> > to
> > believe this was a problem in the xwork libs but that it  had been
> > resolved in
> > the latest version:
> > http://jira.opensymphony.com/browse/XW-560
> > I also found a reference suggesting this could be a problem with  using
> the
> > deprecated FilterDispatcher rather than a  StrutsPrepareAndExecuteFilter:
> > https://issues.apache.org/jira/browse/WW-2167
> > I was originally using Struts 2.1.8.1 and upgraded to the latest
>  (2.3.1.2)
> > which didn't solve the problem, nor did switching back and  forth between
> > the
> > FilterDispatcher and StrutsPrepareAndExecuteFilter  (the following is
> from
> > my
> > web.xml):
> >  action2
> >
>
> >org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
> >>
> >
> > httpResponseFilter
> > /*  
> > springSecurityFilterChain
> > /*  
> > action2 /*
> > 
> >
> > I also tried an IntrospectorCleanupListener as a shot in the dark but to
> no
> > avail.
> >
> >
> > If I comment out the StrutsPrepareAndExecuteFilter and deploy/stop  the
> > web app,
> > the severe warnings regarding ThreadLocal's go away (though  obviously my
> > web
> > app no longer works).
> >
> > At this point I'm not sure what else to try - is there some  additional
> > cleanup
> > I can perform via a ContextLoaderListener or  otherwise on struts to shut
> > it
> > down properly when the web app is  stopped? Or are there still bugs in
> > struts
> > 2/xwork causing this issue  that  haven't been resolved?
> >
> >
> > Any suggestions or help much appreciated.
> > Thanks,
> > Tom
> >
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: using property/constant placeholder in struts config file

2011-12-18 Thread aum strut
Thanks Łukasz, that's a perfect approach

2011/12/18 Łukasz Lenart 

> Instead hardcoded result you can use expression
>
> 
> ${actionFrame}
> 
>
> And create a BaseAction (as a base action for all your actions) with
> getActionFrame() which will return
> "/templates/application/applicationframe.jsp" or whatever your want
> ;-)
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


using property/constant placeholder in struts config file

2011-12-17 Thread aum strut
Hi All,

While working in one application i came across a requirement where i need
to define a constant in struts.xml file and want to use in my
application.Here is the use case
in our application the layout is fixed and we are using a same template
throughout the application say

"applicationframe.jsp"
we have fixed the layout for the working template which we decide on run
time based on the action call,everything is working perfectly fine except
one issue as in each action configuration i have to do the following
configuration


/templates/application/applicationframe.jsp



/templates/application/applicationframe.jsp


etc
which means if anyhow at later stage we want to change the name of
applicationframe we need to change it at every place.I was thinking of
creating a constant like

and using its value in the result so if any change occur in future i know i
need to change it only at one place

is there a way i can achieve this?

thanks in advance


using action in welcome file list

2011-12-13 Thread aum strut
Hi All,

I am trying to user struts2 action in my welcome file list of web.xml here
is the entry

 
action2

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter



  action2
  /*
  REQUEST
 FORWARD
 INCLUDE
 ERROR


 
welcome
  

here is the entry in my struts.xml file



/templates/application/applicationframe.jsp



when i am hitting the URL of my applcation say http://localhost/my-app i am
getting following error

There is no Action mapped for namespace / and action name . - [unknown
location]
at
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
at
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
at
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
at
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
at
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
2011-12-13 22:25:08,947 [http-80-2] WARN
 org.apache.struts2.dispatcher.Dispatcher - Could not find action or result
There is no Action mapped for namespace / and action name . - [unknown
location]
at
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
at
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
at
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
at
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
at
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)

i am not sure what else i have to configure to achieve this
thanks in advance


Re: Alternate for actionRedirect

2011-12-04 Thread aum strut
Thing is i am already constructing the object there in my callback action
once user authorize me i will make some request to these services to get
user public profile so that means instead of using this profile object i
have to pass individual piece of information kind of pain and i want URL to
be short and well readable

hope i am able to explain it

On Sun, Dec 4, 2011 at 3:03 PM, Maurizio Cucchiara wrote:

> Why is long request URI an issue for you?
> You could do a simple redirect passing every parameters you want preserve.
>
> Twitter :http://www.twitter.com/m_cucchiara
> G+  :https://plus.google.com/107903711540963855921
> Linkedin:http://www.linkedin.com/in/mauriziocucchiara
>
> Maurizio Cucchiara
>
>
> On 4 December 2011 09:17, aum strut  wrote:
>
> > Hi All,
> >
> > Currently i am working with OAuth in my web-app, So i am redirecting my
> > user to the third party system (gmail/yahoo) and once they authenticate
> > thereself with those system ,these system will redirect back user to my
> App
> > at a specified callback URL
> >
> > Things are working fine except that when user will be redirected back to
> my
> > application the URL contains a lot of other information as a query string
> > which i need to get other information related to the user.
> >
> > In my callback Action i am using those parameters and making some request
> > to the gmail/yahoo and creating a user profile object and sending user
> back
> > to the success page.
> >
> > Though everything is working fine but the URL is still having those long
> > query string being send back by the OAuth service provider.
> >
> > if i use redirectAction though it will change the URL and make it clean
> but
> > i will loose my user profile Object.
> >
> > How can i achieve this in best way so that i can get rid of this
> > long query-string and same time able to maintain my user profile object?
> >
> >
> > Thanks in advacnce
> >
>


Alternate for actionRedirect

2011-12-04 Thread aum strut
Hi All,

Currently i am working with OAuth in my web-app, So i am redirecting my
user to the third party system (gmail/yahoo) and once they authenticate
thereself with those system ,these system will redirect back user to my App
at a specified callback URL

Things are working fine except that when user will be redirected back to my
application the URL contains a lot of other information as a query string
which i need to get other information related to the user.

In my callback Action i am using those parameters and making some request
to the gmail/yahoo and creating a user profile object and sending user back
to the success page.

Though everything is working fine but the URL is still having those long
query string being send back by the OAuth service provider.

if i use redirectAction though it will change the URL and make it clean but
i will loose my user profile Object.

How can i achieve this in best way so that i can get rid of this
long query-string and same time able to maintain my user profile object?


Thanks in advacnce


Re: Dynamically passing Templates name in struts.config file

2011-03-12 Thread aum strut
Thanks Dave for the help,but i am aware about dynamic results and we are
using it quite a lot in our application
but my problem is not like choosing a dynamic result since when validation
fails i am always being get input as control string and in all cases we have
ApplicationFrame as parent template all we are deciding workingTemplate on
run time but since in case of validation error my action class is not able
to set WorkingTemplate so i am looking for a way to achieve this when
Validation failed

On Sat, Mar 12, 2011 at 11:22 PM, Dave Newton  wrote:

> Check out dynamic results and see if that helps.
>
> http://struts.apache.org/2.x/docs/result-configuration.html
> http://struts.apache.org/2.x/docs/parameters-in-configuration-results.html
>
> Dave
>
> On Sat, Mar 12, 2011 at 12:49 PM, aum strut  wrote:
> > Hi All,
> >
> > In my application i have a single ApplicationFrame.jsp which takes care
> of
> > the overall look and feel of the application,from my action classes i am
> > setting the name of working template and this dynamic template name is
> being
> > used in the ApplicationFrame as follows
> > 
> >
> > and i have following entry in my struts.xml file
> > 
> >   applicationFrame.jsp
> >
> >
> > everything is working fine,but in one module i am trying to use build in
> > validation framework to validate user input and it seems working fine,but
> it
> > caught me with one issue while validating if the vallidation fails i am
> > being send back with the result "input" and in this case the
> workingtemplate
> > is not set and hence i am not able to show proper view.i am doing
> something
> > like
> >
> > 
> >   applicationFrame.jsp
> >   
> > applicationFrame.jsp
> >   
> >
> > since even in the case of input results Parent template has to be
> > ApplicationFrame to maintain the look and feel so i am wondering how i
> can
> > pass workingTemplate value in this case.
> >
> > any help in this regard will be helpfull.
> >
> > Thanks in advance
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Dynamically passing Templates name in struts.config file

2011-03-12 Thread aum strut
Hi All,

In my application i have a single ApplicationFrame.jsp which takes care of
the overall look and feel of the application,from my action classes i am
setting the name of working template and this dynamic template name is being
used in the ApplicationFrame as follows


and i have following entry in my struts.xml file

   applicationFrame.jsp


everything is working fine,but in one module i am trying to use build in
validation framework to validate user input and it seems working fine,but it
caught me with one issue while validating if the vallidation fails i am
being send back with the result "input" and in this case the workingtemplate
is not set and hence i am not able to show proper view.i am doing something
like


   applicationFrame.jsp
   
 applicationFrame.jsp
   

since even in the case of input results Parent template has to be
ApplicationFrame to maintain the look and feel so i am wondering how i can
pass workingTemplate value in this case.

any help in this regard will be helpfull.

Thanks in advance


Struts2 and Validation issue

2011-02-16 Thread aum strut
Hi All,

I am trying to user Validation framework with Struts2 but struck at a
point,here are the details.

I am developing a import service which includes various steps like

1) Showing number of import options

2) Showing number of elgible files for the import (Import type selected in
step one)

for all this i have created only one action with multiple methods which is
doing all the job.now in the second case when user select a file,i am trying
to place a validation for empty field but since property file is outside of
all he methods so the validation is working for all methods

e.g

i do not want the validation to execute for step1  but it is even getting
executed for step one (since file will be selected in step 2 so step1 is
always fails)

is there any way to organise validation so that it should only execute for a
specific method inside the Action

here is my validation code

@RequiredFieldValidator

(type=ValidatorType.*FIELD*,message="Please select a file for import")




*public* String getSelectedFile() {




*return* selectedFile;




}

any help in this regard will be appriciated


Re: Initialize and inject resources per application - S2

2011-01-04 Thread aum strut
Struts2 has its own Object creation way an Object factory which is
responsible for creating all framework required objects
like Actions,Interceptors Results etc.

And its flexible enough if you want to let spring do this for Struts2 you
can always do that by using Spring with struts2

On Wed, Jan 5, 2011 at 3:34 AM, Oscar  wrote:

> Hi to all, i have a question about Struts 2 capabilities. Maybe it sounds
> dumb, but yesterday i realized that, when you work with Hibernate, you have
> to initialize one SessionFactory per application, not per session as i
> believed. So i don't know if struts2 provides some mechanism to initialize
> resources once per application and set in application context for example,
> or i have to look for other choices like Spring.
>
> Regards.
>
> --
> Oscar Calderón
> SCJP 6  
>


Re: Multiple Submit Buttons problem in Struts2

2011-01-04 Thread aum strut
Well my +1 lots of the things in the doc are very old and yes i am ready to
contribute
@Dave :If you can share the list after compiling it will help us to pick the
topics more easily

On Tue, Jan 4, 2011 at 12:17 AM, Brian Thompson wrote:

> Thanks, Maurizio.
>
> Brian
>
>
>
> On Mon, Jan 3, 2011 at 12:14 PM, Maurizio Cucchiara <
> maurizio.cucchi...@gmail.com> wrote:
>
> > Individual Contributor License Agreement [1]
> > [1] http://www.apache.org/licenses/icla.txt
> >
> > 2011/1/3 Brian Thompson :
> > > Pardon my ignorance, but what is a CLA?  I haven't heard of it before
> > this.
> > >
> > > Brian
> > >
> > > Sent via my Droid, Eka.
> > > On Jan 3, 2011 10:42 AM, "Dave Newton"  wrote:
> > >> I kind of thought the ability to submit to specific action methods was
> > >> well-known, but perhaps you're correct, as this thread indicates (to
> my
> > >> chagrin).
> > >>
> > >> There are a number of things in the wiki that need updating; I'll
> > probably
> > >> start compiling a list from previous threads and open JIRA issues. The
> > > cool
> > >> thing is that anybody with a CLA on file can help. (The uncool thing
> is
> > > that
> > >> we get that kind of help more rarely than might be optimal.)
> > >>
> > >> Dave
> > >>
> > >> On Mon, Jan 3, 2011 at 11:33 AM, Biesbrock, Kevin <
> > > biesbrock.ke...@aoins.com
> > >>> wrote:
> > >>
> > >>> Should this be included in documentation as a more complex example of
> > >>> Struts2? Maybe an example action as well? Just a thought.
> > >>>
> > >>>
> > >>> -Beez
> > >>>
> > >>> -Original Message-
> > >>> From: stanl...@gmail.com [mailto:stanl...@gmail.com]
> > >>> Sent: Sunday, January 02, 2011 5:20 PM
> > >>> To: Struts Users Mailing List
> > >>> Subject: Re: Multiple Submit Buttons problem in Struts2
> > >>>
> > >>> How about something like this?
> > >>>
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>>
> > >>>
> > >>>   > >>> action="customer_save" value="Save"/>  action="customer_print"
> > >>> value="Print"/>  
> > >>>
> > >>> Scott
> > >>>
> > >>> On Sat, Jan 1, 2011 at 8:53 AM, aum strut 
> > wrote:
> > >>>
> > >>> > Hi All,
> > >>> >
> > >>> > Trying to work with multiple submit buttons within a single form in
> > >>> > struts2 application but not able to work. here is the jsp code i am
> > >>> > using
> > >>> >
> > >>> > 
> > >>> >  > >>> > class="button"> > >>> >
> > >>> > name="destinationImport" class="button">
> > >>> >  > >>> > class="button"> > >>> >
> > >>> > name="destinationExport" class="button">
> > >>> > 
> > >>> >
> > >>> > here is the java part
> > >>> >
> > >>> > private boolean destinationImport;
> > >>> > private boolean destinationExport;
> > >>> > and there respective setter and getter
> > >>> >
> > >>> > but i am sure is that Struts2 type convertor is having problem
> > >>> > converting the String value to boolean do any one have idea how to
> > >>> > achieve this
> > >>> >
> > >>> > i am using struts-2.2.1 version.
> > >>> >
> > >>> > Thanks in advance
> > >>> >
> > >>>
> > >>>
> > >>> -
> > >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > >>> For additional commands, e-mail: user-h...@struts.apache.org
> > >>>
> > >>>
> > >
> >
> >
> >
> > --
> > Maurizio Cucchiara
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>


Re: Multiple Submit Buttons problem in Struts2

2011-01-03 Thread aum strut
Scott,

that was a good way to go..

On Mon, Jan 3, 2011 at 3:59 AM, Dave Newton  wrote:

> Hmm, that looks like it might work ;)
>
> Your technique also avoids having to code the behavior into the action
> itself, decoupling things even more cleanly.
>
> (Another foot down the rabbit hole: "customer" namespace, so bits of CRUD
> can be reused across underlying models. I do both, and honestly, I'm not
> sure I care either way, especially if I'm not manually generating all the
> view-layer stuff.)
>
> Dave
>
> On Sun, Jan 2, 2011 at 5:20 PM,  wrote:
>
> > How about something  like this?
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> >
> > 
> > 
> > 
> > 
> > 
> >
> > Scott
> >
> > On Sat, Jan 1, 2011 at 8:53 AM, aum strut  wrote:
> >
> > > Hi All,
> > >
> > > Trying to work with multiple submit buttons within a single form in
> > struts2
> > > application but not able to work. here is the jsp code i am using
> > >
> > > 
> > > > > class="button"> > >
> > > name="destinationImport" class="button">
> > > > > class="button"> > >
> > > name="destinationExport" class="button">
> > >
> > >
> > > here is the java part
> > >
> > > private boolean destinationImport;
> > >private boolean destinationExport;
> > > and there respective setter and getter
> > >
> > > but i am sure is that Struts2 type convertor is having problem
> converting
> > > the String value to boolean do any one have idea how to achieve this
> > >
> > > i am using struts-2.2.1 version.
> > >
> > > Thanks in advance
> > >
> >
>


Re: Multiple Submit Buttons problem in Struts2

2011-01-01 Thread aum strut
agree!!!

On Sat, Jan 1, 2011 at 10:20 PM, Dave Newton  wrote:

> And *my* point is that perhaps there's another way you can solve your
> problem and eliminate the "tight" coupling between form and action.
>
> Dave
>
> On Sat, Jan 1, 2011 at 11:16 AM, aum strut  wrote:
>
> > My point was that the boolean approach mentioned in the document was in
> my
> > opinion is better and same was mentioned in the
> > document sinnce it was not coupling the form tightly with action.
> >
> >
> > On Sat, Jan 1, 2011 at 9:44 PM, Dave Newton 
> wrote:
> >
> > > On Sat, Jan 1, 2011 at 11:13 AM, aum strut 
> wrote:
> > >
> > > > agree!
> > > > but i still believe coupling the form value with action component is
> > > never
> > > > a
> > > > good idea.. so still believe the first approach was was better.
> > > >
> > >
> > > So... is there another way to achieve what you want?
> > >
> > > Dave
> > >
> >
>


Re: Multiple Submit Buttons problem in Struts2

2011-01-01 Thread aum strut
My point was that the boolean approach mentioned in the document was in my
opinion is better and same was mentioned in the
document sinnce it was not coupling the form tightly with action.


On Sat, Jan 1, 2011 at 9:44 PM, Dave Newton  wrote:

> On Sat, Jan 1, 2011 at 11:13 AM, aum strut  wrote:
>
> > agree!
> > but i still believe coupling the form value with action component is
> never
> > a
> > good idea.. so still believe the first approach was was better.
> >
>
> So... is there another way to achieve what you want?
>
> Dave
>


Re: Multiple Submit Buttons problem in Struts2

2011-01-01 Thread aum strut
agree!
but i still believe coupling the form value with action component is never a
good idea..
so still believe the first approach was was better.

Though i switched to second myself :)

On Sat, Jan 1, 2011 at 9:38 PM, Dave Newton  wrote:

> I think any time there's documentation that's 4+ years old you can't
> necessarily rely on it being accurate.
>
> Dave
>
> On Sat, Jan 1, 2011 at 10:29 AM, aum strut  wrote:
>
> > i was just refreing the following document
> > http://struts.apache.org/2.0.14/docs/multiple-submit-buttons.html
> >
> > since it was mentioned that second approach will make action code
> depedent
> > with the form
> >
> >
> > On Sat, Jan 1, 2011 at 8:48 PM, Dave Newton 
> wrote:
> >
> > > S2 would have no idea how to convert "Import" to a true or false value.
> > >
> > > Dave
> > >
> > > On Sat, Jan 1, 2011 at 9:53 AM, aum strut 
> wrote:
> > >
> > > > Hi All,
> > > >
> > > > Trying to work with multiple submit buttons within a single form in
> > > struts2
> > > > application but not able to work. here is the jsp code i am using
> > > >
> > > > 
> > > > > > > class="button"> > > >
> > > > name="destinationImport" class="button">
> > > > > > > class="button"> > > >
> > > > name="destinationExport" class="button">
> > > >
> > > >
> > > > here is the java part
> > > >
> > > > private boolean destinationImport;
> > > >private boolean destinationExport;
> > > > and there respective setter and getter
> > > >
> > > > but i am sure is that Struts2 type convertor is having problem
> > converting
> > > > the String value to boolean do any one have idea how to achieve this
> > > >
> > > > i am using struts-2.2.1 version.
> > > >
> > > > Thanks in advance
> > > >
> > >
> >
>


Re: Multiple Submit Buttons problem in Struts2

2011-01-01 Thread aum strut
i was just refreing the following document
http://struts.apache.org/2.0.14/docs/multiple-submit-buttons.html

since it was mentioned that second approach will make action code depedent
with the form


On Sat, Jan 1, 2011 at 8:48 PM, Dave Newton  wrote:

> S2 would have no idea how to convert "Import" to a true or false value.
>
> Dave
>
> On Sat, Jan 1, 2011 at 9:53 AM, aum strut  wrote:
>
> > Hi All,
> >
> > Trying to work with multiple submit buttons within a single form in
> struts2
> > application but not able to work. here is the jsp code i am using
> >
> > 
> > > class="button"> >
> > name="destinationImport" class="button">
> > > class="button"> >
> > name="destinationExport" class="button">
> >
> >
> > here is the java part
> >
> > private boolean destinationImport;
> >private boolean destinationExport;
> > and there respective setter and getter
> >
> > but i am sure is that Struts2 type convertor is having problem converting
> > the String value to boolean do any one have idea how to achieve this
> >
> > i am using struts-2.2.1 version.
> >
> > Thanks in advance
> >
>


Multiple Submit Buttons problem in Struts2

2011-01-01 Thread aum strut
Hi All,

Trying to work with multiple submit buttons within a single form in struts2
application but not able to work. here is the jsp code i am using






here is the java part

private boolean destinationImport;
private boolean destinationExport;
and there respective setter and getter

but i am sure is that Struts2 type convertor is having problem converting
the String value to boolean do any one have idea how to achieve this

i am using struts-2.2.1 version.

Thanks in advance


Re: E-Commerce website using struts

2010-12-12 Thread aum strut
if taking about struts2 here it is
http://www.shopizer.com/

On Fri, Dec 10, 2010 at 11:40 AM, ashish chawre
wrote:

> Hi, Is any body having any idea about the source/example of any ecommerce
> website implementation using struts?
> I am looking to implement a checkout using struts and I need to implement
> shopping cart as well.
>
> Any help will be greatly appreciated.
>
> Thanks!
> -- Ashish
>


Re: Generic Question about Struts2 Interceptor

2010-10-12 Thread aum strut
That's really Helpful Greg

On Wed, Oct 13, 2010 at 12:21 AM, Greg Lindholm wrote:

> Here are some that I've used in recent project:
>
> AuthenticationInterceptor to check if user is signed in.
> HibernateInterceptor to manage Hibernate session lifecycles
> LoggingInterceptor for custom logging
> HandsetPropertiesInterceptor for injecting properties into the request
> based on User-Agent settings
> TrimParametersInterceptor to trim whitespace off string parameters
> RedirectMessageInterceptor to handle preserving messages across redirects
> CookieMessageInterceptor to handle preserving message in cookies when
> not using sessions
>
> Interceptors are the place I will normally handle any cross-cutting
> concerns.
>
> On Tue, Oct 12, 2010 at 1:26 PM, aum strut  wrote:
> > I am truely agree but can give me some example where you have applied
> them
> > just to get me an idea may be lacing imagination this time
> >
> > :)
> >
> > On Tue, Oct 12, 2010 at 10:40 PM, Greg Lindholm  >wrote:
> >
> >> Every app I've written has custom interceptors (and of course custom
> >> interceptor stacks).
> >> Don't fear interceptors, they are your friends.
> >>
> >> On Tue, Oct 12, 2010 at 12:17 PM, aum strut 
> wrote:
> >> > Hi All,
> >> >
> >> > I have a generic question about Struts2Interceptor,since Struts2 is
> >> itself
> >> > in term of Interceptor and most of the required interceptors are there
> >> > placed.
> >> >
> >> > My question is how many of us are using custom Interceptor which are
> >> there
> >> > in production enviornment.my idea is to get some broad prespective
> about
> >> > there usuage and practical implimentation in production
> >> >
> >> >
> >> >
> >> > Thanks in advance,
> >> >
> >> > Aum
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Generic Question about Struts2 Interceptor

2010-10-12 Thread aum strut
I am truely agree but can give me some example where you have applied them
just to get me an idea may be lacing imagination this time

:)

On Tue, Oct 12, 2010 at 10:40 PM, Greg Lindholm wrote:

> Every app I've written has custom interceptors (and of course custom
> interceptor stacks).
> Don't fear interceptors, they are your friends.
>
> On Tue, Oct 12, 2010 at 12:17 PM, aum strut  wrote:
> > Hi All,
> >
> > I have a generic question about Struts2Interceptor,since Struts2 is
> itself
> > in term of Interceptor and most of the required interceptors are there
> > placed.
> >
> > My question is how many of us are using custom Interceptor which are
> there
> > in production enviornment.my idea is to get some broad prespective about
> > there usuage and practical implimentation in production
> >
> >
> >
> > Thanks in advance,
> >
> > Aum
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Generic Question about Struts2 Interceptor

2010-10-12 Thread aum strut
Hi All,

I have a generic question about Struts2Interceptor,since Struts2 is itself
in term of Interceptor and most of the required interceptors are there
placed.

My question is how many of us are using custom Interceptor which are there
in production enviornment.my idea is to get some broad prespective about
there usuage and practical implimentation in production



Thanks in advance,

Aum


Re: Need Help For Struts2 Debugging

2010-06-03 Thread aum strut
Thanks Wes for the detailed explanation..it surely going to help me a lot

On Fri, Jun 4, 2010 at 10:00 AM, Wes Wannemacher  wrote:

> Sorry to jump in so late, but depending on what I'm looking for, I
> generally do one of two things. If I am looking at reproducing a bug
> (which I haven't been doing much lately) and it would be easier to
> reproduce in a web-app, then I will try to update one of the reference
> apps (struts2-blank, struts2-showcase) and then run the updated
> web-app in my IDE in the debugger. The other option is to create a
> test-case using JUnit or something similar to validate the bug and
> debug it there.
>
> As far as learning the internals... just like any other significantly
> complex system, you just have to spend time grokking through it and it
> will eventually make sense. It's much harder to try to learn it all at
> once, so pick some piece that you can conceptualize (one of the
> interceptors or results for instance) and work through it.
>
> -Wes
>
> On Wed, May 26, 2010 at 7:22 AM, aum strut  wrote:
> > DO any one have other way to do this job done???
> > Please share their ideas
> >
> > On Tue, May 25, 2010 at 5:46 PM, aum strut  wrote:
> >
> >> Alex i am some what agree..
> >> but i am wondering how the Struts2 Development team is doing this..i am
> >> sure they are not following the things as you have mentioned.
> >>
> >> I am sure that must be some easy way to some one who wants to get
> knowledge
> >> about that internal working structure of struts2
> >>
> >> id any one have better idea please do share here
> >>
> >>
> >> On Tue, May 25, 2010 at 5:13 PM, Alex Rodriguez Lopez <
> >> alo...@flordeutopia.pt> wrote:
> >>
> >>> I use to find it impossible to do this...
> >>>
> >>> Then I started to use Maven, which can be used to download source code
> and
> >>> attach it easily. If you use Eclipse I suggest using M2Eclipse plugin.
> After
> >>> you get a Struts2 based project with Maven2 up and running it should be
> easy
> >>> to do what you want, download sources and javadocs, and start
> debugging!
> >>>
> >>>  Hi All,
> >>>>
> >>>> I am in process to explore internals of Struts2.Can any one suggest me
> >>>> how
> >>>> can i move ahead.
> >>>> All i need to know how framework internally called its different
> >>>> component
> >>>> and for this i guess i need to download the source code but how and
> what
> >>>> to
> >>>> do next i am confused..
> >>>> can any one point me to a direction so that i can move ahead.
> >>>>
> >>>> Thanks in advance
> >>>> -Aum
> >>>>
> >>>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>> For additional commands, e-mail: user-h...@struts.apache.org
> >>>
> >>>
> >>
> >
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: bug reports

2010-06-01 Thread aum strut
You need to create a ticket in JIRA
https://issues.apache.org/jira/browse/WW

create a new issue in JIRA with the details about the incident along with
Test cases if any.

On Wed, Jun 2, 2010 at 6:44 AM, Alex Zeng  wrote:

> Anyone knows how to submit a bug report for struts 2?
>
> This email with any attachments is confidential and may be subject to legal
> privilege. If it is not intended for you please advise by replying
> immediately, destroy it and do not copy, disclose or use it in any way.
>
> Please consider the environment before printing this e-mail
> __
>  This email has been scanned by the DMZGlobal Business Quality
>  Electronic Messaging Suite.
> Please see http://www.dmzglobal.com/dmzmessaging.htm for details.
> __
>
>


Re: How to Configure a DataSource in Struts 2.X

2010-05-31 Thread aum strut
There is no direct support for Data source in struts2 and as for your point
action classed are a mean of Model and its never preferred to use such
configuration at this level.



On Mon, May 31, 2010 at 5:30 PM, VR Venugopal Rao <
venugopal.vell...@cmcltd.com> wrote:

> Dear All,
> How do we configure a Datasource in Struts 2.X.
> 1. Do we put Driver and url in the Action Class file or
> 2. Do we configure the Driver and Url in the Web.xml or
> 3. Do we configure in struts.xml instead of web.xml.
>
> A Small example would be helpful.
> Regards,
> VR Venugopal Rao
>
>
>
>
> __
>
> DISCLAIMER
>
> The information contained in this e-mail message and/or attachments to it
> may
> contain confidential or privileged information. If you are not the intended
> recipient, any dissemination, use, review, distribution, printing or
> copying
> of the information contained in this e-mail message and/or attachments to
> it
> are strictly prohibited. If you have received this communication in error,
> please notify us by reply e-mail or directly to netsupp...@cmcltd.com or
> telephone and immediately and permanently delete the message and any
> attachments. Thank you.
>
>
>
> __
>
> This email has been scrubbed for your protection by SecureMX.
> For more information visit http://securemx.in
>
> __
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Need Help For Struts2 Debugging

2010-05-26 Thread aum strut
DO any one have other way to do this job done???
Please share their ideas

On Tue, May 25, 2010 at 5:46 PM, aum strut  wrote:

> Alex i am some what agree..
> but i am wondering how the Struts2 Development team is doing this..i am
> sure they are not following the things as you have mentioned.
>
> I am sure that must be some easy way to some one who wants to get knowledge
> about that internal working structure of struts2
>
> id any one have better idea please do share here
>
>
> On Tue, May 25, 2010 at 5:13 PM, Alex Rodriguez Lopez <
> alo...@flordeutopia.pt> wrote:
>
>> I use to find it impossible to do this...
>>
>> Then I started to use Maven, which can be used to download source code and
>> attach it easily. If you use Eclipse I suggest using M2Eclipse plugin. After
>> you get a Struts2 based project with Maven2 up and running it should be easy
>> to do what you want, download sources and javadocs, and start debugging!
>>
>>  Hi All,
>>>
>>> I am in process to explore internals of Struts2.Can any one suggest me
>>> how
>>> can i move ahead.
>>> All i need to know how framework internally called its different
>>> component
>>> and for this i guess i need to download the source code but how and what
>>> to
>>> do next i am confused..
>>> can any one point me to a direction so that i can move ahead.
>>>
>>> Thanks in advance
>>> -Aum
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>


Re: Need Help For Struts2 Debugging

2010-05-25 Thread aum strut
Alex i am some what agree..
but i am wondering how the Struts2 Development team is doing this..i am sure
they are not following the things as you have mentioned.

I am sure that must be some easy way to some one who wants to get knowledge
about that internal working structure of struts2

id any one have better idea please do share here

On Tue, May 25, 2010 at 5:13 PM, Alex Rodriguez Lopez <
alo...@flordeutopia.pt> wrote:

> I use to find it impossible to do this...
>
> Then I started to use Maven, which can be used to download source code and
> attach it easily. If you use Eclipse I suggest using M2Eclipse plugin. After
> you get a Struts2 based project with Maven2 up and running it should be easy
> to do what you want, download sources and javadocs, and start debugging!
>
>  Hi All,
>>
>> I am in process to explore internals of Struts2.Can any one suggest me how
>> can i move ahead.
>> All i need to know how framework internally called its different component
>> and for this i guess i need to download the source code but how and what
>> to
>> do next i am confused..
>> can any one point me to a direction so that i can move ahead.
>>
>> Thanks in advance
>> -Aum
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Need Help For Struts2 Debugging

2010-05-25 Thread aum strut
Hi All,

I am in process to explore internals of Struts2.Can any one suggest me how
can i move ahead.
All i need to know how framework internally called its different component
and for this i guess i need to download the source code but how and what to
do next i am confused..
can any one point me to a direction so that i can move ahead.

Thanks in advance
-Aum


Re: The Apache Software Foundation Receives Approval for Sale to Oracle Corporation

2010-05-19 Thread aum strut
Manos i have alreay mentioed this in my post...
but since it was on community site so i prefer to confirm it...

On Wed, May 19, 2010 at 12:49 PM, Manos Batsis
wrote:

> On 05/19/2010 09:31 AM, aum strut wrote:
>
>> Hi All,
>>
>> i am not sure is this a good place to ask about such question but since
>> many
>> here are involved with Apache from so long
>>
>> while browsing Apache community site i came across this blog post,though
>> this has been posted on April 1st but still not sure whats the truth??
>> can any one have better idea about this post
>>
>> https://blogs.apache.org/foundation/entry/the_apache_software_foundation_receives
>>
>>
> The post has a date of April 1st. It's just an April fool's joke.
>
> Cheers,
>
> Manos
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


The Apache Software Foundation Receives Approval for Sale to Oracle Corporation

2010-05-18 Thread aum strut
Hi All,

i am not sure is this a good place to ask about such question but since many
here are involved with Apache from so long

while browsing Apache community site i came across this blog post,though
this has been posted on April 1st but still not sure whats the truth??
can any one have better idea about this post
https://blogs.apache.org/foundation/entry/the_apache_software_foundation_receives


Re: struts action related query

2010-04-21 Thread aum strut
i am also agree with Dale
you have two option either to develop your own solution using AJAX or can
use third party solution
i myself using YUI for the development but lately we are trying jquery and
its really good to work with it.

Choice is all urs...

On Wed, Apr 21, 2010 at 12:23 PM, Dale Newfield  wrote:

> Sounds like you want the browser to submit a request without attempting to
> replace the current page with the results.
>
> The way the browser does that is by using javascript and specifically a
> javascript object called XMLHttpRequest.  Use of that has become called
> AJAX, and there are lots of libraries that'll help you do so in a (more)
> browser independent manner.
>
> The Request object in prototype is pretty simple, but if you're getting
> started with a library that you'll be using for a while I've heard good
> things about and would suggest looking at jquery.
>
> -Dale
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Struts vs SpringMVC

2010-04-15 Thread aum strut
Well we using Spring is our most of projects but to be honest we are using
it for IOC,AOP and yes for other stuff but as per MVC is concerned Struts is
our first choice..

we are on way to migrate our 25% of projects to Struts2 from struts1.

On Fri, Apr 16, 2010 at 8:48 AM, Cimballi wrote:

> Comments are already included in the doc :
> 1. When we talk about MVC frameworks Struts(original and not  Struts2)
> 2. Sturts 2 is the revision of Struts (original) and takes care of
> such shortcoming and provides a good set of competing features.
>
> So not so much to debate on...
>
> Cimballi
>
>
> On Thu, Apr 15, 2010 at 9:04 PM, Frans Thamura  wrote:
> > have anyone read this?
> >
> >
> http://www.java4learners.com/struts/faq/what-are-advantages-spring-mvc-over-struts
> >
> > <
> http://www.java4learners.com/struts/faq/what-are-advantages-spring-mvc-over-struts
> >any
> > comment?
> >
> >
> > --
> > Frans Thamura
> > Meruvian.
> > Experiential Tempation of Java and Enterprise OpenSource
> >
> > Meruvian jTechnopreneur Program (S1) telah hadir, Dapatkan benefit bagi
> SMK
> > yang melakukan mapping SKKD, dg program beasiswa dari Gunadarma
> >
> > Mobile: +6287885901958
> > Blog & Profile: http://frans.thamura.info
> >
> > We provide services to migrate your apps to Java (web), in amazing fast
> and
> > reliable.
> >
>
>
>
> --
> Cimballi
> JAVA J2EE Freelance
> http://cimballi.elance.com/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Struts project structure in eclipse

2010-04-13 Thread aum strut
* we are using below mentioed like approach and its working in our case.
" rel="stylesheet"
  type="text/css"/>*



On Tue, Apr 13, 2010 at 4:29 PM, Upasana Sharma  wrote:

> Hi
>
> I am new to Struts. I am trying to develop a project. The jsp pages that
> are
> relevant are arranged in respective folders. When I start the project from
> eclipse the page from welcome file list are loaded properly with the
> respective css. But whenever i try to access some other jsp css are not
> accessed. there is a single css file in web-content. Images are under
> images
> folder. I want to use a common css for my entire project. But the pages in
> each folder work only when they have individual copy of images and css
> inside their folder. I tried to use s:url  in the  href but it does
> not seem to help. What should be the approach to handle it? If I need to
> maintain a separate web.xml in each folder then how can I put the mapping
> for the images folders and css.
> --
> Thanks and Regards
> Upasana Sharma
>


Re: Which Spring and Hibernate versions are compatible

2010-04-07 Thread aum strut
Yes we can use it..
we are using it one of our project which is ready to go t production.

On Wed, Apr 7, 2010 at 8:49 AM, Cimballi wrote:

> Yes !
>
>
> On Tue, Apr 6, 2010 at 11:15 PM, Krunal Dhamelia 
> wrote:
> > Hi All,
> >
> > I am new to Struts 2 and wanted to use latest versions of Spring and
> > Hibernate with Struts2.
> > Is it possible to use Spring 3.0.2 and Hibernate 3.5 with Struts 2?
> >
> >
> > Krunal Dhamelia
> >
>
>
>
> --
> Cimballi
> JAVA J2EE Freelance
> http://cimballi.elance.com/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: struts.xml vs struts.properties which takes a precedence?

2010-03-26 Thread aum strut
struts.properties
http://struts.apache.org/2.0.11/docs/strutsproperties.html

On Fri, Mar 26, 2010 at 8:03 AM, Bhaarat Sharma  wrote:

> Hi,
>
>
> If the same property is set in struts.xml and struts.properties which one
> takes precedence?  also, is there any documentation where this is explained
> /verified?
>


Renaming struts.xml file

2010-03-14 Thread aum strut
Hi Friends,

Is it possible to rename and change the position of struts.xml configuration
file in a simple web application.
If yes, then please also mention the steps.

Thanks,
aum


Re: Struts2 and Security

2009-06-23 Thread aum strut
Thanks Dave for the details, as my self also not very much known about the
spring so may be we have to look in to this and in the draft in more
details.



On Tue, Jun 23, 2009 at 5:54 PM, Dave Newton  wrote:

> aum strut wrote:
>
>> Our requirement is to use good authentication framework for our
>> application
>> and as per the initial application draft we are not going to use spring in
>> our application.
>>
>> as we have found that Spring Security is quite a matured framework so we
>> are
>> just investigating the option, if we can use it without using spring at
>> all,
>> but as suggested if we can use it by including only some libraries than
>> this
>> is not a bad choice at all.
>>
>
> I'm pretty sure that Spring Security requires the use of Spring--I'm not
> sure how this fact can escape you. Here's the first sentence of the first
> paragraph on the Spring Security site:
>
> "Spring Security is one of the most mature and widely used Spring
> projects."
>
> Just because Spring isn't being used by anything *else* in your app doesn't
> mean it doesn't use Spring.
>
> (It's difficult for me to understand why you'd not want to use Spring
> anywhere else in the app, unless you're using another IoC/DI solution.)
>
>
> Dave
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Struts2 and Security

2009-06-22 Thread aum strut
Dave
Our requirement is to use good authentication framework for our application
and as per the initial application draft we are not going to use spring in
our application.

as we have found that Spring Security is quite a matured framework so we are
just investigating the option, if we can use it without using spring at all,
but as suggested if we can use it by including only some libraries than this
is not a bad choice at all.

Thanks Dustin for detailed explanation, we are surely going to dig in to
this frame work.

On Mon, Jun 22, 2009 at 3:38 PM, Dave Newton  wrote:

> aum strut wrote:
>
>> my main point was also this we were about to choose Spring Security but as
>> we are not going to use Spring in our application so we were just a bit
>> confused (:) ) if we can use this frame work even without using Spring??
>>
>
> You want to use Spring Security without Spring?
>
> Dave
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Struts2 and Security

2009-06-21 Thread aum strut
Hi All,

my main point was also this we were about to choose Spring Security but as
we are not going to use Spring in our application so we were just a bit
confused (:) ) if we can use this frame work even without using Spring??

hope to get some light over this.

On Sun, Jun 21, 2009 at 12:37 PM, dusty  wrote:

>
> We have used Spring Security in the last 10 struts2 apps.  We have some
> that
> use a local user store in the database, others that use LDAP to AD and some
> that use Atlassian's Crowd.
>
> Spring Security is very easy to add to your app and gives just about
> everything you need I have not ventured into some of the more advanced
> ACL features for securing individual objects, but it is also fairly
> straight
> forward to provide method level security.
>
> A good example of Spring Security implemented on top of Struts2 is the
> appfuse framework.  http://appfuse.org.
>
>
>
>
> aum strut wrote:
> >
> > Hi All,
> >
> > We are on the way to develop a new application using struts2. Currently
> we
> > are analysing the area of authentication and authorization, we do have
> > some
> > options of using the following frame work for these
> >
> > 1) Acegi
> > 2)JAAS
> >
> > my point is that we any one in the list is using any of the security
> frame
> > work.please let me know about there experiences, so that it will help us
> > in
> > choosing the right security model.
> >
> > regarding the pltfrom we have decided to use is as follows
> >
> > 1) Struts2
> > 2) JSP/Velocity
> > 3) Hibernate
> > 4) YUI
> >
> > these are the core building block rest technologies and frame work can be
> > choosen as required
> >
> > looking forward for your valuable suggestions.
> >
> > thannks in advance
> > aum
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Struts2-and-Security-tp24106660p24132071.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
>
>


Struts2 and Security

2009-06-19 Thread aum strut
Hi All,

We are on the way to develop a new application using struts2. Currently we
are analysing the area of authentication and authorization, we do have some
options of using the following frame work for these

1) Acegi
2)JAAS

my point is that we any one in the list is using any of the security frame
work.please let me know about there experiences, so that it will help us in
choosing the right security model.

regarding the pltfrom we have decided to use is as follows

1) Struts2
2) JSP/Velocity
3) Hibernate
4) YUI

these are the core building block rest technologies and frame work can be
choosen as required

looking forward for your valuable suggestions.

thannks in advance
aum


No Action mapped for namespace

2009-03-01 Thread aum strut
HI All,

i am facing action mapping problem and unable to figure it out where ia m
doing wrong. i have a login.jsp page where there are only 2 fileds a loinid
and password field

i am using AJAX call for user login below is the code from my login.jsp page



























i am using the following javascript code to submit my form

if(o.responseText=="SUCCESS"){

document.Login.action="Welcome.action";

document.Login.submit();

}
it is able to validate the user input from the database. in the struts.xml
file i have defined the Welcome action as follows:








/index.jsp































/LoginForm.action







/Templates/User/CustomerRegistrationFrame.jsp






but it is giving me the following error:

Could not find action or result There is no Action mapped for namespace /
and action name Welcome here is the error stacjk trace for refrence

07:55:54,937DEBUG com.opensymphony.xwork2.DefaultActionProxy {1}:65
-Creating an DefaultActionProxy for namespace / and action name Welcome

07:55:54,953ERROR org.apache.struts2.dispatcher.Dispatcher {1}:512 -Could
not find action or result

There is no Action mapped for namespace / and action name Welcome. -
[unknown location]

at com.opensymphony.xwork2.DefaultActionProxy.prepare(*
DefaultActionProxy.java:186*)

at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(*
StrutsActionProxyFactory.java:41*)

at org.apache.struts2.dispatcher.Dispatcher.serviceAction(*
Dispatcher.java:494*)

at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(*
FilterDispatcher.java:419*)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

at org.apache.catalina.core.StandardWrapperValve.invoke(*
StandardWrapperValve.java:230*)

at org.apache.catalina.core.StandardContextValve.invoke(*
StandardContextValve.java:175*)

at org.apache.catalina.core.StandardHostValve.invoke(*
StandardHostValve.java:128*)

at org.apache.catalina.valves.ErrorReportValve.invoke(*
ErrorReportValve.java:104*)

at org.apache.catalina.core.StandardEngineValve.invoke(*
StandardEngineValve.java:109*)

at org.apache.catalina.connector.CoyoteAdapter.service(*
CoyoteAdapter.java:261*)

at org.apache.coyote.http11.Http11Processor.process(*
Http11Processor.java:844*)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
Http11Protocol.java:581*)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*JIoEndpoint.java:447*)

at java.lang.Thread.run(Unknown Source)

07:55:54,953DEBUG com.opensymphony.xwork2.config.ConfigurationManager
{1}:156 -Checking ConfigurationProviders for reload.

if any one any cluue where things are going wrong pleaes suggest



thanks in advance

-s


Re: Problem with MyEclipse+JDBC Driver

2009-02-12 Thread aum strut
This Error generally comes when the compilation JRE and running JRE  are not
same, have you developed the code used in the Struts application and in java
application on same enviornment??

and which version of struts you are using??

On Fri, Feb 13, 2009 at 9:51 AM, Narasimha Raju Naidu
wrote:

> Hi to all,
>
>  I am new to MyEclipse IDE and Struts. I am developing a Login
> form. In that i need to test the user entered details from Databse. My
> Database is PostgreSQL. I tested with a java program and i am sucessfully
> retriving data from database. But when i am trying to access from
> loginForm.java of struts i am getting the following errors.
>
>
> SEVERE: Servlet.service() for servlet action threw exception
> java.lang.UnsupportedClassVersionError: Bad version number in .class file
>java.lang.ClassLoader.defineClass1(Native Method)
>java.lang.ClassLoader.defineClass(Unknown Source)
>java.security.SecureClassLoader.defineClass(Unknown Source)
>
>
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
>
>
>
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
>
>
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
>
>
>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
>
>java.lang.ClassLoader.loadClassInternal(Unknown Source)
>java.lang.Class.forName0(Native Method)
>java.lang.Class.forName(Unknown Source)
>com.yourcompany.struts.action.LoginAction.execute(LoginAction.java:43)
>
>
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
>
>
>
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
>
>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
>
> Can any one tell what is the exact problem and how to resolve it. I am
> waiting for your valuabel replies.
>
>
> --
> Regards,
> Narasimha Raju.Naidu
> Hyderabad
> India
> uni...
>


Re: Sending XML data from action to YUI

2009-01-19 Thread aum strut
I tried using XSLT result type but it forced me to have a stylesheet
might be something i was doing wrong

but finally for XM i found that creating your own custom result type is the
clean approach
and it worked quite smoothly for me.

-aum

On Tue, Jan 20, 2009 at 9:55 AM, Miguel  wrote:

> The xslt result works fine, but you need to build the dom tree (using
> dom, jdom, dom4j or anything that can "export" to w3 dom) and have it
> in memory. I think Xstream also can "export" to w3 DOM. I´ve used
> xstream and it works like a charm (in reflexion mode), but I don´t
> know how to "customize" the xml it produces, and it´s pretty ugly. So
> you may want to research how to create a custom mapping object <-->
> xml .
> One good thing about the xslt result type is that you don´t need to
> have a stylesheet to do a null transformation!! (if you don't
> configure a stylesheet you get a identity transform).
>
> Si quieres ser más positivo, pierde un electrón
> Miguel Ruiz Velasco S.
>
>
>
> On Mon, Jan 19, 2009 at 21:11, dusty  wrote:
> >
> > Has either of you tried the XSLT result type?  I have not and I am
> curious
> > about how well it works.
> >
> >
> >
> > aum strut wrote:
> >>
> >> Thanks Musachy for the help
> >> i will try to follow what u have suggested
> >>
> >>
> >>
> >> On 1/19/09, Musachy Barroso  wrote:
> >>>
> >>> Take a look at the results, they are pretty simple, this is
> >>> StreamResult for example:
> >>>
> >>>
> >>>
> http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java?view=markup
> >>>
> >>> all you need to do is implement the Result interface, and then
> >>> register the result in a package:
> >>>
> >>> 
> >>>
> >>> >>> class="org.apache.struts2.dispatcher.StreamResult"/>
> >>>
> >>> 
> >>> ...
> >>>
> >>> and the result is ready to be used.
> >>> musachy
> >>>
> >>>
> >>> On Mon, Jan 19, 2009 at 11:40 AM, aum strut 
> wrote:
> >>> > Thats what i came up with..
> >>> > any one have any idea where i can find a good starter so that i can
> >>> write
> >>> my
> >>> > own result type?
> >>> >
> >>> > thanks for the help Musachy
> >>> >
> >>> > On 1/19/09, Musachy Barroso  wrote:
> >>> >>
> >>> >> You could write your own result that uses XStream, or any other
> >>> >> library to serialize the objects into xml.
> >>> >>
> >>> >> musachy
> >>> >>
> >>> >> On Mon, Jan 19, 2009 at 2:27 AM, aum strut 
> >>> wrote:
> >>> >> > Hi All,
> >>> >> >
> >>> >> > I developing ajax based application using struts 2.0.11
> >>> >> > for ajax we are using YUI for making ajax based call and currently
> >>> its
> >>> >> > working fine for me.For one case i need to send XML created in my
> >>> >> business
> >>> >> > logic to the front end
> >>> >> >
> >>> >> > The call will be created using YUI API and it must get XML which
> is
> >>> >> getting
> >>> >> > created in Business logic in in order to fullfill its requirement.
> >>> >> >
> >>> >> > For experimentation i used the result type "Stream" and put the
> >>> generated
> >>> >> > XML in the buffer and it worked perfectly fine, but i think that
> is
> >>> not
> >>> >> the
> >>> >> > best approach.
> >>> >> >
> >>> >> > and due to the current project stage we can't migrate this to
> higher
> >>> >> > version, so the probability of using REST plugin or any other
> option
> >>> is
> >>> >> not
> >>> >> > there
> >>> >> >
> >>> >> > Can an one suggest me the best approach so that we can return XML
> to
> >>> the
> >>> >> YUI
> >>> >> > ajax call
> >>> >> >
> >>> >> > thanks in advance
> >>> >> > -aum
> >>> >> >
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> "Hey you! Would you help me to carry the stone?" Pink Floyd
> >>> >>
> >>> >>
> -
> >>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>> >>
> >>> >>
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> "Hey you! Would you help me to carry the stone?" Pink Floyd
> >>>
> >>> -
> >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >>> For additional commands, e-mail: user-h...@struts.apache.org
> >>>
> >>>
> >>
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/Sending-XML-data-from-action-to-YUI-tp21538031p21556256.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
> >
> >
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Sending XML data from action to YUI

2009-01-19 Thread aum strut
Thanks Musachy for the help
i will try to follow what u have suggested



On 1/19/09, Musachy Barroso  wrote:
>
> Take a look at the results, they are pretty simple, this is
> StreamResult for example:
>
>
> http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java?view=markup
>
> all you need to do is implement the Result interface, and then
> register the result in a package:
>
> 
>
> class="org.apache.struts2.dispatcher.StreamResult"/>
>
> 
> ...
>
> and the result is ready to be used.
> musachy
>
>
> On Mon, Jan 19, 2009 at 11:40 AM, aum strut  wrote:
> > Thats what i came up with..
> > any one have any idea where i can find a good starter so that i can write
> my
> > own result type?
> >
> > thanks for the help Musachy
> >
> > On 1/19/09, Musachy Barroso  wrote:
> >>
> >> You could write your own result that uses XStream, or any other
> >> library to serialize the objects into xml.
> >>
> >> musachy
> >>
> >> On Mon, Jan 19, 2009 at 2:27 AM, aum strut 
> wrote:
> >> > Hi All,
> >> >
> >> > I developing ajax based application using struts 2.0.11
> >> > for ajax we are using YUI for making ajax based call and currently its
> >> > working fine for me.For one case i need to send XML created in my
> >> business
> >> > logic to the front end
> >> >
> >> > The call will be created using YUI API and it must get XML which is
> >> getting
> >> > created in Business logic in in order to fullfill its requirement.
> >> >
> >> > For experimentation i used the result type "Stream" and put the
> generated
> >> > XML in the buffer and it worked perfectly fine, but i think that is
> not
> >> the
> >> > best approach.
> >> >
> >> > and due to the current project stage we can't migrate this to higher
> >> > version, so the probability of using REST plugin or any other option
> is
> >> not
> >> > there
> >> >
> >> > Can an one suggest me the best approach so that we can return XML to
> the
> >> YUI
> >> > ajax call
> >> >
> >> > thanks in advance
> >> > -aum
> >> >
> >>
> >>
> >>
> >> --
> >> "Hey you! Would you help me to carry the stone?" Pink Floyd
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Sending XML data from action to YUI

2009-01-19 Thread aum strut
Thats what i came up with..
any one have any idea where i can find a good starter so that i can write my
own result type?

thanks for the help Musachy

On 1/19/09, Musachy Barroso  wrote:
>
> You could write your own result that uses XStream, or any other
> library to serialize the objects into xml.
>
> musachy
>
> On Mon, Jan 19, 2009 at 2:27 AM, aum strut  wrote:
> > Hi All,
> >
> > I developing ajax based application using struts 2.0.11
> > for ajax we are using YUI for making ajax based call and currently its
> > working fine for me.For one case i need to send XML created in my
> business
> > logic to the front end
> >
> > The call will be created using YUI API and it must get XML which is
> getting
> > created in Business logic in in order to fullfill its requirement.
> >
> > For experimentation i used the result type "Stream" and put the generated
> > XML in the buffer and it worked perfectly fine, but i think that is not
> the
> > best approach.
> >
> > and due to the current project stage we can't migrate this to higher
> > version, so the probability of using REST plugin or any other option is
> not
> > there
> >
> > Can an one suggest me the best approach so that we can return XML to the
> YUI
> > ajax call
> >
> > thanks in advance
> > -aum
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Sending XML data from action to YUI

2009-01-18 Thread aum strut
Hi All,

I developing ajax based application using struts 2.0.11
for ajax we are using YUI for making ajax based call and currently its
working fine for me.For one case i need to send XML created in my business
logic to the front end

The call will be created using YUI API and it must get XML which is getting
created in Business logic in in order to fullfill its requirement.

For experimentation i used the result type "Stream" and put the generated
XML in the buffer and it worked perfectly fine, but i think that is not the
best approach.

and due to the current project stage we can't migrate this to higher
version, so the probability of using REST plugin or any other option is not
there

Can an one suggest me the best approach so that we can return XML to the YUI
ajax call

thanks in advance
-aum


Custm interceptor Problem

2008-12-14 Thread aum strut
Hi All,

I am developing custom inteceptor so that unauthorized user can not access
the resources using struts2. i am following the below mentioed approach

1) when user login process succeed i am putting user object in the session
2) For all other request when user try to hit the direct action URL like
http://kartavya-30a587:8080/BillSmart/Welcome.action
   i am checking(Using this interceptor) if the user object is there in the
session or not and it is working fine for me.

when the user first try to hit the direct URL he is getting redirected to
login page but even if i will provide the user credential it loged me to the
specified page like http://kartavya-30a587:8080/BillSmart/Welcome.action

but when i come back to login page withour logoff and then try to go
directly to a particular page it is not allowing me to do that even the user
object is there in the session.below is the code of my login action,login
interceptor and xml file.pleaes advise where i am doing wrong

3) When user provide valid credential he will be redirected to Welcome page
using Welcome action


Login Action
*

private* Map session;

*public* String execute() *throws* Exception{

*if*(getForm_pw().equals("228781")){

User user=*new* User();

user.setName("aum");

user.setAge("30");

 session.put(BillSmartConstants.*USER*,user);

session.put(BillSmartConstants.*USERNAME*, "aum");

*return* *SUCCESS*;

}



*LoginInterceptor*

public class AuthenticationInterceptor implements Interceptor {

 public void destroy() {
 }

 public void init() {
 }

 public String intercept( ActionInvocation actionInvocation ) throws
Exception {

  Map session = actionInvocation.getInvocationContext().getSession();

  purgeStaleTokens(session);

  User user = (User) session.get( BillSmartConstants.USER );

  if (user == null) {


  return Action.LOGIN;
  }


  else {

  Action action = ( Action ) actionInvocation.getAction();

  if (action instanceof UserAware) {
  ((UserAware)action).setUser(user);
  }

  System.out.println("Logged in: interceptor");
  return actionInvocation.invoke();
  }

 }

 private void purgeStaleTokens (Map session ){




  Object userToken = session.get( BillSmartConstants.USER );
  if ( !( userToken instanceof User ) ) session.remove
(BillSmartConstants.USER ) ;

 }

}

*user.xml*






   

   


   

  

  

  
   /index.jsp
   /chapterFour/Error.jsp
  



 
/Templates/User/Registration.jsp



my login.xml file is in another packae where i am not configured the
Authentication Inteceptor i just want that when ever any one hit directly
Welcome.action it must check if the user object is there in session if it is
there it must allow to go directly using this URL and if user obect is not
present it must ask the user to login first,but in case even the user object
is there in the session it is not allowing direct accessto the welcome page



Any help in this regard will be much appriciaed


Validating Autocompleter using javascript

2008-12-10 Thread aum strut
Do any one have any suggestion regarding this problem or do i need to drop
down the idea of using autocompleter???

Hi all,

i am struck in a simple problem but not able to proceed as i m unable to
find any solution for this. I am using struts2 UI tags and in order to
validate the user input i am using javascript for validation(Currently not
in a position to use validation frame work).

everything was going ok but now i have to use auocompleter and here
javascript validation is not working.i have created a seperated javascript
file and validating the user input using this file.

My javascript validation is working fine(even displaying errors) up to the
point it encounters autocompleter but it stops validating the input fields
after it.

below is the code i m using to validtate autocompleter:


<
s:autocompleter name="addressPO.city" forceValidOption="true" theme="simple"
id="addressPO.city" cssClass="inputText" cssStyle="width:125px" list="{'Andaman
and Nicobar','Andhra Pradesh','Arunachal Pradesh','Assam'}"/>



and the code to validate this is:

document.getElementById(
'addressPO.city').value =
document.getElementById('addressPO.city').value.trim();


if(document.getElementById('addressPO.city').value == null ||
document.getElementById('addressPO.city').value == "" )

{

alert("error");

}

following is the error Mozilla is showing to me

*Error: document.getElementById("addressPO.city") has no properties*

*
*Any suggestion for this are welcomed

Pleaes suggest me where i am doing wrong in order to validate this
autocomplete.

thanks in advance,

umesh


Validating Autocompleter using javascript

2008-12-09 Thread aum strut
Hi all,

i am struck in a simple problem but not able to proceed as i m unable to
find any solution for this. I am using struts2 UI tags and in order to
validate the user input i am using javascript for validation(Currently not
in a position to use validation frame work).

everything was going ok but now i have to use auocompleter and here
javascript validation is not working.i have created a seperated javascript
file and validating the user input using this file.

My javascript validation is working fine(even displaying errors) up to the
point it encounters autocompleter but it stops validating the input fields
after it.

below is the code i m using to validtate autocompleter:






and the code to validate this is:

document.getElementById('addressPO.city').value = document.getElementById(
'addressPO.city').value.trim();

if(document.getElementById('addressPO.city').value == null ||
document.getElementById('addressPO.city').value == "" )

{

alert("error");

}

following is the error Mozilla is showing to me

*Error: document.getElementById("addressPO.city") has no properties*

*
*Any suggestion for this are welcomed

Pleaes suggest me where i am doing wrong in order to validate this
autocomplete.

thanks in advance,

umesh


Struts2 XML Handling

2008-11-29 Thread aum strut
HI All,

I need to send XML data from my action. Curently in one of action i need to
send JSOn data from the action and for this i am using  JSON Plugin for
sending JSOn data from my action to the frontend.

Now i have to send XML data from my action.Do any one have any information
about how can we send XML data from action or any knowledge about any plugin
so that we can use this plugin to fullfill our requirment.

Any help in this regard will be much appriciated

Thanks in advance,
aum


Re: Struts2 Data Transfer is not working

2008-11-11 Thread aum strut
Yes thats true..
but may be i am wrong i am assuming that i am trying to set my PO classes in
the USer class
and for this user class i am using MOdel Driven Approach in my action
class..

if i am doing wrong here can any body point me where's the error in the
approach

On Tue, Nov 11, 2008 at 5:54 PM, Nils-Helge Garli Hegvik
<[EMAIL PROTECTED]>wrote:

> I'm guessing your POs in User are null. Line 15 in TestAction should
> tell you what.
>
> Nils-H
>
> On Tue, Nov 11, 2008 at 12:52 PM, aum strut <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I am using Model Driven approach for transfering my form data to the bean
> > object.i have a form(JSP Page) where i have divided the form in three
> > sections.
> > and based on the name of these sections i have created 3 Bean classes(PO)
> > for storing the data.Additonally i have created one more PO class for
> > setting values in these three PO classes.below is the code for this
> class.
> >
> > *
> >
> > package* demo;
> >
> > *
> >
> > public* *class* User {
> >
> > *private* AddressPO addressPO;
> >
> > *private* BusinessInformationPO businessInformationPO;
> >
> > *private* UserCredentialPO userCredentialPO;
> >
> > /**
> >
> > * [EMAIL PROTECTED] the addressPO
> >
> > */
> >
> > *public* AddressPO getAddressPO() {
> >
> > *return* addressPO;
> >
> > }
> >
> > /**
> >
> > * [EMAIL PROTECTED] addressPO the addressPO to set
> >
> > */
> >
> > *public* *void* setAddressPO(AddressPO addressPO) {
> >
> > *this*.addressPO = addressPO;
> >
> > }
> >
> > /**
> >
> > * [EMAIL PROTECTED] the businessInformationPO
> >
> > */
> >
> > *public* BusinessInformationPO getBusinessInformationPO() {
> >
> > *return* businessInformationPO;
> >
> > }
> >
> > /**
> >
> > * [EMAIL PROTECTED] businessInformationPO the businessInformationPO to set
> >
> > */
> >
> > *public* *void* setBusinessInformationPO(BusinessInformationPO
> > businessInformationPO) {
> >
> > *this*.businessInformationPO = businessInformationPO;
> >
> > }
> >
> > /**
> >
> > * [EMAIL PROTECTED] the userCredentialPO
> >
> > */
> >
> > *public* UserCredentialPO getUserCredentialPO() {
> >
> > *return* userCredentialPO;
> >
> > }
> >
> > /**
> >
> > * [EMAIL PROTECTED] userCredentialPO the userCredentialPO to set
> >
> > */
> >
> > *public* *void* setUserCredentialPO(UserCredentialPO userCredentialPO) {
> >
> > *this*.userCredentialPO = userCredentialPO;
> >
> > }
> >
> > }
> >
> >
> >
> > MY action class is looking like this
> > *
> >
> > public* *class* TestAction *extends* ActionSupport
> > *implements*ModelDriven {
> >
> > /**
> >
> > *
> >
> > */
> >
> > *private* *static* *final* *long* *serialVersionUID* =
> 4184580362763509728L;
> >
> > *public* String execute() *throws* Exception{
> >
> > System.*out*.println("inside action");
> >
> > System.*out*.println(user.getAddressPO().getFirstName());
> >
> > System.*out*.println(user.getBusinessInformationPO().getTinNumber());
> >
> > System.*out*.println(user.getUserCredentialPO().getEmail());
> >
> > *return* *SUCCESS*;
> >
> > }
> >
> > *private* User user=*new* User();
> >
> >
> >
> > *public* User getModel() {
> >
> > *return* user;
> >
> > }
> >
> > }
> >
> >
> >
> > but it is giving me the following exception
> >
> > inside action
> >
> > Nov 11, 2008 5:20:11 PM org.apache.catalina.core.StandardWrapperValve
> invoke
> >
> > SEVERE: Servlet.service() for servlet default threw exception
> > *
> >
> > java.lang.NullPointerException
> > *
> >
> > at com.test.demo.TestAction.execute(*TestAction.java:15*)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
> >
> > at sun.reflect.NativeMethodAccessorImpl.invoke(*
> > NativeMethodAccessorImpl.java:39*)
> >
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(*
> > DelegatingMethodAccessorImpl.java:25*)
> >
> > at java.lang.reflect.Method.invoke(*Method.java:597*)
> >
> > at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(*
> > Defaul

Struts2 Data Transfer is not working

2008-11-11 Thread aum strut
Hi all,

I am using Model Driven approach for transfering my form data to the bean
object.i have a form(JSP Page) where i have divided the form in three
sections.
and based on the name of these sections i have created 3 Bean classes(PO)
for storing the data.Additonally i have created one more PO class for
setting values in these three PO classes.below is the code for this class.

*

package* demo;

*

public* *class* User {

*private* AddressPO addressPO;

*private* BusinessInformationPO businessInformationPO;

*private* UserCredentialPO userCredentialPO;

/**

* [EMAIL PROTECTED] the addressPO

*/

*public* AddressPO getAddressPO() {

*return* addressPO;

}

/**

* [EMAIL PROTECTED] addressPO the addressPO to set

*/

*public* *void* setAddressPO(AddressPO addressPO) {

*this*.addressPO = addressPO;

}

/**

* [EMAIL PROTECTED] the businessInformationPO

*/

*public* BusinessInformationPO getBusinessInformationPO() {

*return* businessInformationPO;

}

/**

* [EMAIL PROTECTED] businessInformationPO the businessInformationPO to set

*/

*public* *void* setBusinessInformationPO(BusinessInformationPO
businessInformationPO) {

*this*.businessInformationPO = businessInformationPO;

}

/**

* [EMAIL PROTECTED] the userCredentialPO

*/

*public* UserCredentialPO getUserCredentialPO() {

*return* userCredentialPO;

}

/**

* [EMAIL PROTECTED] userCredentialPO the userCredentialPO to set

*/

*public* *void* setUserCredentialPO(UserCredentialPO userCredentialPO) {

*this*.userCredentialPO = userCredentialPO;

}

}



MY action class is looking like this
*

public* *class* TestAction *extends* ActionSupport
*implements*ModelDriven {

/**

*

*/

*private* *static* *final* *long* *serialVersionUID* = 4184580362763509728L;

*public* String execute() *throws* Exception{

System.*out*.println("inside action");

System.*out*.println(user.getAddressPO().getFirstName());

System.*out*.println(user.getBusinessInformationPO().getTinNumber());

System.*out*.println(user.getUserCredentialPO().getEmail());

*return* *SUCCESS*;

}

*private* User user=*new* User();



*public* User getModel() {

*return* user;

}

}



but it is giving me the following exception

inside action

Nov 11, 2008 5:20:11 PM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet default threw exception
*

java.lang.NullPointerException
*

at com.test.demo.TestAction.execute(*TestAction.java:15*)

at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)

at sun.reflect.NativeMethodAccessorImpl.invoke(*
NativeMethodAccessorImpl.java:39*)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(*
DelegatingMethodAccessorImpl.java:25*)

at java.lang.reflect.Method.invoke(*Method.java:597*)

at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(*
DefaultActionInvocation.java:404*)

at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(*
DefaultActionInvocation.java:267*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:229*)

at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(*
DefaultWorkflowInterceptor.java:221*)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:86*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(*
ValidationInterceptor.java:150*)

at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(
*AnnotationValidationInterceptor.java:48*)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:86*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(
*ConversionErrorInterceptor.java:123*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:224*)

at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
DefaultActionInvocation.java:223*)

at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
UtilTimerStack.java:455*)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:221*)

at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(*
Para

Re: Struts2+YUI

2008-10-17 Thread aum strut
HI All,

DO any one have any clue about this probelm...???

i am really stuck here.

On Thu, Oct 16, 2008 at 3:33 PM, shekher awasthi
<[EMAIL PROTECTED]>wrote:

> Hi All,
>
> I am trying to integrate struts2 with YUI ,but facing some problems with
> this. I want that when my action get called by YUI it must return a
> arrayList of string which i must be able to handle using the YUI.
>
> For this i took the help of example from YUI site and able to hit the
> action
> but my problem is that how can i get the access to the arraylist which my
> action is populating when its execute methos is called .below i m pasting
> the code from my action calss as well as the YUI code.
> Plaese let me know how can i get this arraylist in my YUI code
> *
> YUI CODE*
>
> 
> 
>
>var div = document.getElementById('container');
>
>var handleSuccess = function(o){
>alert("pass");
>
>
>if(o.responseText !== undefined){
>alert("test11");
>
>div.innerHTML = "
  • Transaction id: " + o.tId + "
  • "; >div.innerHTML += "
  • HTTP status: " + o.status + "
  • "; >div.innerHTML += "
  • Status code message: " + o.statusText + > "
  • "; >div.innerHTML += "
  • HTTP headers:
      " + o.getAllResponseHeaders > + "
  • "; >div.innerHTML += "
  • Server response: " + o.getList().toString + > "
  • "; >div.innerHTML += "
  • Argument object: Object ( [foo] => " + > o.argument.foo + > " [bar] => " + o.argument.bar +" )
  • "; >} > > > } > > var handleFailure = function(o){ >alert("fail"); >YAHOO.log("The failure handler was called. tId: " + o.tId + ".", > "info", "example"); > >if(o.responseText !== undefined){ >div.innerHTML = "
    • Transaction id: " + o.tId + "
    • "; >div.innerHTML += "
    • HTTP status: " + o.status + "
    • "; >div.innerHTML += "
    • Status code message: " + o.statusText + > "
    "; >} > } > > var callback = > { > success:handleSuccess, > failure:handleFailure, > argument: { foo:"foo", bar:"bar" } > }; > > var sUrl = "YUITestAction.action"; > > > >function makeRequest(){ >alert("test"); > >var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); > > > > } > > > *MY ACTION CLASS* > > public class YUITestAction extends ActionSupport{ > >/** > * > */ >private static final long serialVersionUID = 1926031204500756104L; >ArrayList list=new ArrayList(); >public String execute() throws Exception{ >System.out.println("inside the execute method"); > >return SUCCESS; >} > >public ArrayList getList(){ > >list.add("test1"); >list.add("test2"); >list.add("aum"); >list.add("arun"); >list.add("mannu"); >list.add("umesh"); > >return list; >} > } > > any help in this regard is much appricaited > > --shekher >

    Re: Struts2+YUI

    2008-10-16 Thread aum strut
    sorry for using another mail box for posting the question i am geting some
    problem in my ID while posting the question in the mail listso i have
    used my alternative ID.
    
    On Thu, Oct 16, 2008 at 4:31 PM, aum strut <[EMAIL PROTECTED]> wrote:
    
    > No i want to get this arraylist using YUI Ajax functionality
    >
    > i have a drop down in my jsp page and i am calling the ajax function with
    > onChange event the code which i have used for calling my action class is
    > working fine and even i am able to hot my action class using YUI APIbut what
    > i want is that i should be able to use the Arraylilst which my action is
    > populating using only YUI so can anybody tell me how can i use the YUI to
    > get access to this Arraylist which is being populated by my action class so
    > that i can use this arraylist for my other work using the ajax function
    >
    >
    > On Thu, Oct 16, 2008 at 4:08 PM, Hardik Shah <[EMAIL PROTECTED]> wrote:
    >
    >>
    >> hi
    >>
    >> you can use
    >>  
    >>  
    >> 
    >>
    >> for getting array list of valuestack
    >>
    >> but you should setter and getter for this arraylist for accessing it from
    >> jsp side
    >>
    >>
    >> shekher awasthi wrote:
    >> >
    >> > Hi All,
    >> >
    >> > I am trying to integrate struts2 with YUI ,but facing some problems with
    >> > this. I want that when my action get called by YUI it must return a
    >> > arrayList of string which i must be able to handle using the YUI.
    >> >
    >> > For this i took the help of example from YUI site and able to hit the
    >> > action
    >> > but my problem is that how can i get the access to the arraylist which
    >> my
    >> > action is populating when its execute methos is called .below i m
    >> pasting
    >> > the code from my action calss as well as the YUI code.
    >> > Plaese let me know how can i get this arraylist in my YUI code
    >> > *
    >> > YUI CODE*
    >> >
    >> > 
    >> > 
    >> >
    >> > var div = document.getElementById('container');
    >> >
    >> > var handleSuccess = function(o){
    >> > alert("pass");
    >> >
    >> >
    >> > if(o.responseText !== undefined){
    >> > alert("test11");
    >> >
    >> > div.innerHTML = "<li>Transaction id: " + o.tId + "</li>";
    >> > div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
    >> > div.innerHTML += "<li>Status code message: " + o.statusText +
    >> > "</li>";
    >> > div.innerHTML += "<li>HTTP headers: <ul>" +
    >> > o.getAllResponseHeaders
    >> > + "</ul></li>";
    >> > div.innerHTML += "<li>Server response: " + o.getList().toString
    >> +
    >> > "</li>";
    >> > div.innerHTML += "<li>Argument object: Object ( [foo] => " +
    >> > o.argument.foo +
    >> >  " [bar] => " + o.argument.bar +" )</li>";
    >> > }
    >> >
    >> >
    >> > }
    >> >
    >> > var handleFailure = function(o){
    >> > alert("fail");
    >> > YAHOO.log("The failure handler was called.  tId: " + o.tId +
    >> ".",
    >> > "info", "example");
    >> >
    >> > if(o.responseText !== undefined){
    >> > div.innerHTML = "<ul><li>Transaction id: " + o.tId + "</li>";
    >> > div.innerHTML += "<li>HTTP status: " + o.status + "</li>";
    >> > div.innerHTML += "<li>Status code message: " + o.statusText +
    >> > "</li></ul>";
    >> > }
    >> > }
    >> >
    >> > var callback =
    >> > {
    >> >   success:handleSuccess,
    >> >   failure:handleFailure,
    >> >   argument: { foo:"foo", bar:"bar" }
    >> > };
    >> >
    >> > var sUrl = "YUITestAction.action";
    >> >
    >> >
    >> >
    >> > function makeRequest(){
    >> > alert("test");
    >> >
    >> > var request = YAHOO.util.Connect.asyncRequest('GET', sUrl,
    >> callback);
    >> >
    >> >
    >> >
    >> > }
    >> > 
    >> >
    >> > *MY ACTION CLASS*
    >> >
    >> > public class YUITestAction extends ActionSupport{
    >> >
    >> > /**
    >> >  *
    >> >  */
    >> > private static final long serialVersionUID = 1926031204500756104L;
    >> > ArrayList list=new ArrayList();
    >> > public String execute() throws Exception{
    >> > System.out.println("inside the execute method");
    >> >
    >> > return SUCCESS;
    >> > }
    >> >
    >> > public ArrayList getList(){
    >> >
    >> > list.add("test1");
    >> > list.add("test2");
    >> > list.add("aum");
    >> > list.add("arun");
    >> > list.add("mannu");
    >> > list.add("umesh");
    >> >
    >> > return list;
    >> > }
    >> > }
    >> >
    >> > any help in this regard is much appricaited
    >> >
    >> > --shekher
    >> >
    >> >
    >>
    >> --
    >> View this message in context:
    >> http://www.nabble.com/Struts2%2BYUI-tp20010680p20011032.html
    >> Sent from the Struts - User mailing list archive at Nabble.com.
    >>
    >>
    >> -
    >> To unsubscribe, e-mail: [EMAIL PROTECTED]
    >> For additional commands, e-mail: [EMAIL PROTECTED]
    >>
    >>
    >
    
    

    Re: Struts2+YUI

    2008-10-16 Thread aum strut
    No i want to get this arraylist using YUI Ajax functionality
    
    i have a drop down in my jsp page and i am calling the ajax function with
    onChange event the code which i have used for calling my action class is
    working fine and even i am able to hot my action class using YUI APIbut what
    i want is that i should be able to use the Arraylilst which my action is
    populating using only YUI so can anybody tell me how can i use the YUI to
    get access to this Arraylist which is being populated by my action class so
    that i can use this arraylist for my other work using the ajax function
    
    On Thu, Oct 16, 2008 at 4:08 PM, Hardik Shah <[EMAIL PROTECTED]> wrote:
    
    >
    > hi
    >
    > you can use
    >  
    >  
    > 
    >
    > for getting array list of valuestack
    >
    > but you should setter and getter for this arraylist for accessing it from
    > jsp side
    >
    >
    > shekher awasthi wrote:
    > >
    > > Hi All,
    > >
    > > I am trying to integrate struts2 with YUI ,but facing some problems with
    > > this. I want that when my action get called by YUI it must return a
    > > arrayList of string which i must be able to handle using the YUI.
    > >
    > > For this i took the help of example from YUI site and able to hit the
    > > action
    > > but my problem is that how can i get the access to the arraylist which my
    > > action is populating when its execute methos is called .below i m pasting
    > > the code from my action calss as well as the YUI code.
    > > Plaese let me know how can i get this arraylist in my YUI code
    > > *
    > > YUI CODE*
    > >
    > > 
    > > 
    > >
    > > var div = document.getElementById('container');
    > >
    > > var handleSuccess = function(o){
    > > alert("pass");
    > >
    > >
    > > if(o.responseText !== undefined){
    > > alert("test11");
    > >
    > > div.innerHTML = "
  • Transaction id: " + o.tId + "
  • "; > > div.innerHTML += "
  • HTTP status: " + o.status + "
  • "; > > div.innerHTML += "
  • Status code message: " + o.statusText + > > "
  • "; > > div.innerHTML += "
  • HTTP headers:
      " + > > o.getAllResponseHeaders > > + "
  • "; > > div.innerHTML += "
  • Server response: " + o.getList().toString + > > "
  • "; > > div.innerHTML += "
  • Argument object: Object ( [foo] => " + > > o.argument.foo + > > " [bar] => " + o.argument.bar +" )
  • "; > > } > > > > > > } > > > > var handleFailure = function(o){ > > alert("fail"); > > YAHOO.log("The failure handler was called. tId: " + o.tId + ".", > > "info", "example"); > > > > if(o.responseText !== undefined){ > > div.innerHTML = "
    • Transaction id: " + o.tId + "
    • "; > > div.innerHTML += "
    • HTTP status: " + o.status + "
    • "; > > div.innerHTML += "
    • Status code message: " + o.statusText + > > "
    "; > > } > > } > > > > var callback = > > { > > success:handleSuccess, > > failure:handleFailure, > > argument: { foo:"foo", bar:"bar" } > > }; > > > > var sUrl = "YUITestAction.action"; > > > > > > > > function makeRequest(){ > > alert("test"); > > > > var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); > > > > > > > > } > > > > > > *MY ACTION CLASS* > > > > public class YUITestAction extends ActionSupport{ > > > > /** > > * > > */ > > private static final long serialVersionUID = 1926031204500756104L; > > ArrayList list=new ArrayList(); > > public String execute() throws Exception{ > > System.out.println("inside the execute method"); > > > > return SUCCESS; > > } > > > > public ArrayList getList(){ > > > > list.add("test1"); > > list.add("test2"); > > list.add("aum"); > > list.add("arun"); > > list.add("mannu"); > > list.add("umesh"); > > > > return list; > > } > > } > > > > any help in this regard is much appricaited > > > > --shekher > > > > > > -- > View this message in context: > http://www.nabble.com/Struts2%2BYUI-tp20010680p20011032.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >

    Re: Struts 2 actions executing twice

    2008-10-15 Thread aum strut
    well i did what you have mntioned in ur post but still the problem was there
    action was exectued twice so i removed the javascript and it worked
    
    still i will look again what i did in order to  solve this problem...
    
    On Thu, Oct 16, 2008 at 9:38 AM, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
    
    > How were you submitting via JavaScript? I was just working on an app,
    > and forgot (face-palm-style) that you do have to 'return false;' in an
    > onclick handler for a form submission button... It's an old rule, I
    > know, but if you forget, then your JS code will submit the form and your
    > form will also be submitted as well through the normal mechanism.
    > Returning false from your handler tells the page not to submit. I don't
    > think this is the OP's issue, but thought I would chime in.
    >
    > -Wes
    >
    > On Thu, 2008-10-16 at 09:27 +0530, aum strut wrote:
    > > Hi,
    > >
    > > i faced this issue a lot while developing some sample application in
    > which
    > > my action was getting called twice,
    > >
    > > but i was using javascript for submitting the action and when i removed
    > > javascript for submitting form the problem just disappears
    > >
    > > On Thu, Oct 16, 2008 at 3:07 AM, Dave Newton <[EMAIL PROTECTED]>
    > wrote:
    > >
    > > > --- On Wed, 10/15/08, wskent wrote:
    > > > > This is happening with JavaScript turned off or on. It is
    > > > > also happening in Tomcat 6. This behavior is not happening
    > > > > in IE 7 on either Tomcat 6 or JBoss 4.2 . I am also seeing
    > > > > this in a Struts 2.1.2 application running in JBoss 4.2
    > > > > with the Firefox 3.0.3 browser. So far this looks like Firefox
    > > > > is causing Struts 2 to execute the action twice?
    > > >
    > > > There must be more to it than that, because I run a few S2 apps (both
    > S2.0
    > > > and S2.1) under FF3 w/o any issues.
    > > >
    > > > Dave
    > > >
    > > >
    > > > -
    > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > > For additional commands, e-mail: [EMAIL PROTECTED]
    > > >
    > > >
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Struts 2 actions executing twice

    2008-10-15 Thread aum strut
    Hi,
    
    i faced this issue a lot while developing some sample application in which
    my action was getting called twice,
    
    but i was using javascript for submitting the action and when i removed
    javascript for submitting form the problem just disappears
    
    On Thu, Oct 16, 2008 at 3:07 AM, Dave Newton <[EMAIL PROTECTED]> wrote:
    
    > --- On Wed, 10/15/08, wskent wrote:
    > > This is happening with JavaScript turned off or on. It is
    > > also happening in Tomcat 6. This behavior is not happening
    > > in IE 7 on either Tomcat 6 or JBoss 4.2 . I am also seeing
    > > this in a Struts 2.1.2 application running in JBoss 4.2
    > > with the Firefox 3.0.3 browser. So far this looks like Firefox
    > > is causing Struts 2 to execute the action twice?
    >
    > There must be more to it than that, because I run a few S2 apps (both S2.0
    > and S2.1) under FF3 w/o any issues.
    >
    > Dave
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: object backed data transfer in struts2

    2008-10-11 Thread aum strut
    yes everything is there at its place..
    
    still unable to figure it out the reason
    
    :(
    
    On Sat, Oct 11, 2008 at 11:00 PM, Lukasz Lenart <
    [EMAIL PROTECTED]> wrote:
    
    > > can anybody suggest me what is the likely cause of this exception.Thanks
    > in
    > > advanve
    >
    > Does AddressBean has default constructor? And are you extending
    > struts-default package in struts.xml?
    >
    >
    > Regards
    > --
    > Lukasz
    > http://www.lenart.org.pl/
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    object backed data transfer in struts2

    2008-10-11 Thread aum strut
    Hi all,
    
    i am developing an application in struts2 and trying to used object backed
    data transfer method in struts2 i have created a bean namely address where i
    have declared all the properties.
    
    Now i want that my struts2 intercepter will fill this beans by itself when
    it called,below is the code snap i have written in my REgsitration class
    
    public class UserRegistrationAction extends ActionSupport {
    
    /**
    *
    */
    private static final long serialVersionUID = 1L;
    
    
    public String execute() throws Exception{
    System.out.println("test");
    System.out.println("test1 "+getAddressBean().getCity());
    
    
    
    return SUCCESS;
    }
    
    
    private AddressBean addressBean;
    
    
    /**
    * @return the addressBean
    */
    public AddressBean getAddressBean() {
    return addressBean;
    }
    
    /**
    * @param addressBean the addressBean to set
    */
    public void setAddressBean(AddressBean addressBean) {
    this.addressBean = addressBean;
    }
    }
    
    but when i am running this aplication i am getting the Null POINTER
    exception on server
    
    SEVERE: Servlet.service() for servlet default threw exception
    java.lang.NullPointerException
    at
    com.dograpress.raisonne.registration.UserRegistrationAction.validate(UserRegistrationAction.java:88)
    at
    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:200)
    at
    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at
    com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at
    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
    at
    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
    at
    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at
    com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at
    com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at
    com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at
    com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:186)
    at
    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at
    com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at
    com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at
    com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at
    org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at
    com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
    at
    org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    at
    com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
    at
    com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
    at
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultAct

    Re: Struts2 Data Transfer

    2008-10-09 Thread aum strut
    thats true but the probelm is when i am trying to return my custom bean from
    the getModel()
    method..
    
    and i am unable to find out the exact cause why it is occuring there
    
    On Thu, Oct 9, 2008 at 11:25 PM, Jim Kiley <[EMAIL PROTECTED]> wrote:
    
    > The error is complaining that you have no result defined for the result
    > named "input".  That probably means that the Action is encountering a
    > validation error or the like, causing it to return "input".
    >
    > On Thu, Oct 9, 2008 at 1:21 PM, aum strut <[EMAIL PROTECTED]> wrote:
    >
    > > Hi All,
    > >
    > > i tried to follow the the way suggested by Laurie i followed the below
    > > mentioned practice.
    > >
    > > 1) I have two beans which i want to fill at the same time when the user
    > hit
    > > the registration button after filling the form.
    > >
    > > 2) in my action calss i am using the model driven approach to fill the
    > two
    > > beans using getMOdel() method
    > >
    > > 3) For this i creaded another beans with the getter and setter for thse
    > two
    > > above mentioed beans
    > >
    > > below is the code i have written in my REgister  Action class
    > >
    > >
    > > *
    > >
    > > public* *class* UserRegistrationAction *extends* ActionSupport
    > > *implements*ModelDriven {
    > >
    > > /**
    > >
    > > *
    > >
    > > */
    > >
    > > *private* *static* *final* *long* *serialVersionUID* = 1L;
    > >
    > >  *public* String execute() *throws* Exception{
    > >
    > >  *return* *SUCCESS*;
    > >
    > > }
    > >
    > > *private* RegisterBean registerBean=*new* RegisterBean();
    > >
    > >
    > >
    > > *public* RegisterBean getModel() {
    > >
    > > *return* registerBean;
    > >
    > > }
    > >
    > >
    > >
    > >  }
    > > but i am getting the below mentoed exception in the console which is
    > saying
    > > that i have not configured the system if the resulkt type is input
    > >
    > > *but if i will remove* "*return* registerBean;" line from my
    > > *getModel()*and "
    > > *return* registerBean;""*return* null;"* the exception will no longer be
    > > there*
    > >
    > >
    > > can anybody suggest me where i am wrong???
    > >
    > > SEVERE: Could not find action or result
    > >
    > > No result defined for action
    > > com.dograpress.raisonne.registration.UserRegistrationAction and result
    > > input
    > > - action -
    > >
    > >
    > file:/F:/EclipseProjects/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/DograPress/WEB-INF/classes/struts-UserRegistration.xml:6:105
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(*
    > > DefaultActionInvocation.java:350*)
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
    > > DefaultActionInvocation.java:253*)
    > >
    > > at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(*
    > > ValidationInterceptor.java:150*)
    > >
    > > at
    > >
    > >
    > org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(
    > > *AnnotationValidationInterceptor.java:48*)
    > >
    > > at
    > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
    > > MethodFilterInterceptor.java:86*)
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
    > > DefaultActionInvocation.java:224*)
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
    > > DefaultActionInvocation.java:223*)
    > >
    > > at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
    > > UtilTimerStack.java:455*)
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
    > > DefaultActionInvocation.java:221*)
    > >
    > > at
    > > com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(
    > > *ConversionErrorInterceptor.java:123*)
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
    > > DefaultActionInvocation.java:224*)
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
    > > DefaultActionInvocation.java:223*)
    > >
    > > at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
    > > UtilTimerStack.java:455*)
    > >
    > > at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
    > > DefaultActionInvocation.java:221*)
    > >
    > > at
    > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(*
    > > ParametersInterceptor.java:186*)
    > >
    > > at
    > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
    > > MethodFilterIn

    Re: Struts2 Data Transfer

    2008-10-09 Thread aum strut
    ctionInvocation.java:224*)
    
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
    DefaultActionInvocation.java:223*)
    
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
    UtilTimerStack.java:455*)
    
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
    DefaultActionInvocation.java:221*)
    
    at org.apache.struts2.impl.StrutsActionProxy.execute(*
    StrutsActionProxy.java:50*)
    
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(*
    Dispatcher.java:504*)
    
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(*
    FilterDispatcher.java:419*)
    
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
    ApplicationFilterChain.java:235*)
    
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
    ApplicationFilterChain.java:206*)
    
    at org.apache.catalina.core.StandardWrapperValve.invoke(*
    StandardWrapperValve.java:230*)
    
    at org.apache.catalina.core.StandardContextValve.invoke(*
    StandardContextValve.java:175*)
    
    at org.apache.catalina.core.StandardHostValve.invoke(*
    StandardHostValve.java:128*)
    
    at org.apache.catalina.valves.ErrorReportValve.invoke(*
    ErrorReportValve.java:104*)
    
    at org.apache.catalina.core.StandardEngineValve.invoke(*
    StandardEngineValve.java:109*)
    
    at org.apache.catalina.connector.CoyoteAdapter.service(*
    CoyoteAdapter.java:261*)
    
    at org.apache.coyote.http11.Http11Processor.process(*
    Http11Processor.java:844*)
    
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
    Http11Protocol.java:581*)
    
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*JIoEndpoint.java:447*)
    
    at java.lang.Thread.run(Unknown Source)
    
    
    On 10/9/08, aum strut <[EMAIL PROTECTED]> wrote:
    >
    >  Thaks laurie
    >
    > this was exactly i was looking for...
    > i will try this way and it seems to be a good way .
    >
    > Thanks for the help
    >
    >
    >  On Thu, Oct 9, 2008 at 1:32 PM, Laurie Harper <[EMAIL PROTECTED]> wrote:
    >
    >> You can't expose two different beans with one getModel() method, if that's
    >> what you're asking. You can, however, return a simple 'wrapper' bean from
    >> getModel() which has a getter/setter pair for each of your target beans.
    >>
    >> Either approach gives you a way to address the two beans independently,
    >> either explicitly as in .getBean1().setField1() on implicitly as in
    >> .getModel().getBean1().setField1().
    >>
    >> L.
    >>
    >>
    >> aum strut wrote:
    >>
    >>> Yes Dave , There is a sigle form(Page) for this with different sections
    >>> in
    >>> it for registration.i only want that the data from this single page
    >>> should
    >>> go to different (2 in my case) beans depends upon the fields i have
    >>> defined
    >>> in the respective beans.
    >>>
    >>>
    >>> i tied this and is working fine but i want that i should seperate the
    >>> getter
    >>> and setter from my action
    >>>
    >>> i am using model driven approach and it is filling one beans accurately
    >>> but
    >>> i can not fill the second beans in the same getModel() .
    >>>
    >>> any other approach so that i can fill thm at the same time once my action
    >>> get called .
    >>>
    >>> On Thu, Oct 9, 2008 at 3:46 AM, Laurie Harper <[EMAIL PROTECTED]>
    >>> wrote:
    >>>
    >>> Just do what Dave outlined in his previous reply. You need getter/setters
    >>>> in your action for each bean ([gs]etBean1(), [gs]etBean2() to correspond
    >>>> with Dave's JSP sample code) and everything should work. Have you tried
    >>>> it?
    >>>>
    >>>> L.
    >>>>
    >>>>
    >>>> aum strut wrote:
    >>>>
    >>>> the issue is i have a registration from in the UI  which have two
    >>>>> different
    >>>>> section in a single page.
    >>>>>
    >>>>> 1) User login Information
    >>>>> 2)Address Information
    >>>>>
    >>>>> i want that these two sections should get populated in two different
    >>>>> Bean
    >>>>> by
    >>>>> the interceptor
    >>>>> that mean User login fields get Pouplated in the UserLogin Beans while
    >>>>> the
    >>>>> Address section should  get populated in the Address Bean when my
    >>>>> Registration Action get called once user will hit the Register Button.
    >>>>>
    >>>>>
    >>>>> Thanks
    >>>>> -aum
    >>>>>
    >>>>>
    >>>>> On Tue, Oct 7, 2008 at 10:59 PM, Dave Newton <[EMAIL PROTECTED]>
    >>>>> wrote:
    >>>>>
    >>>>> --- On Tue, 10/7/08, aum strut wrote:
    >>>>>
    >>>>>> i need

    Re: Struts2 Data Transfer

    2008-10-09 Thread aum strut
    Thaks laurie
    
    this was exactly i was looking for...
    i will try this way and it seems to be a good way .
    
    Thanks for the help
    
    On Thu, Oct 9, 2008 at 1:32 PM, Laurie Harper <[EMAIL PROTECTED]> wrote:
    
    > You can't expose two different beans with one getModel() method, if that's
    > what you're asking. You can, however, return a simple 'wrapper' bean from
    > getModel() which has a getter/setter pair for each of your target beans.
    >
    > Either approach gives you a way to address the two beans independently,
    > either explicitly as in .getBean1().setField1() on implicitly as in
    > .getModel().getBean1().setField1().
    >
    > L.
    >
    >
    > aum strut wrote:
    >
    >> Yes Dave , There is a sigle form(Page) for this with different sections in
    >> it for registration.i only want that the data from this single page should
    >> go to different (2 in my case) beans depends upon the fields i have
    >> defined
    >> in the respective beans.
    >>
    >>
    >> i tied this and is working fine but i want that i should seperate the
    >> getter
    >> and setter from my action
    >>
    >> i am using model driven approach and it is filling one beans accurately
    >> but
    >> i can not fill the second beans in the same getModel() .
    >>
    >> any other approach so that i can fill thm at the same time once my action
    >> get called .
    >>
    >> On Thu, Oct 9, 2008 at 3:46 AM, Laurie Harper <[EMAIL PROTECTED]> wrote:
    >>
    >> Just do what Dave outlined in his previous reply. You need getter/setters
    >>> in your action for each bean ([gs]etBean1(), [gs]etBean2() to correspond
    >>> with Dave's JSP sample code) and everything should work. Have you tried
    >>> it?
    >>>
    >>> L.
    >>>
    >>>
    >>> aum strut wrote:
    >>>
    >>> the issue is i have a registration from in the UI  which have two
    >>>> different
    >>>> section in a single page.
    >>>>
    >>>> 1) User login Information
    >>>> 2)Address Information
    >>>>
    >>>> i want that these two sections should get populated in two different
    >>>> Bean
    >>>> by
    >>>> the interceptor
    >>>> that mean User login fields get Pouplated in the UserLogin Beans while
    >>>> the
    >>>> Address section should  get populated in the Address Bean when my
    >>>> Registration Action get called once user will hit the Register Button.
    >>>>
    >>>>
    >>>> Thanks
    >>>> -aum
    >>>>
    >>>>
    >>>> On Tue, Oct 7, 2008 at 10:59 PM, Dave Newton <[EMAIL PROTECTED]>
    >>>> wrote:
    >>>>
    >>>> --- On Tue, 10/7/08, aum strut wrote:
    >>>>
    >>>>> i need to transfer data from the user registration page to
    >>>>>> the java beans to be used for inserting values in the data base.
    >>>>>> i have created two seperate beans for this 1) for storing user
    >>>>>> address field and second is for storing user login information.
    >>>>>>
    >>>>>> i want that when user cllick on the REgister button these
    >>>>>> two Beans get filled with the respective  values from the UI.
    >>>>>> i have named the corresponding fields in the beans with respect
    >>>>>> to the fields name in the UI.
    >>>>>>
    >>>>>> What, precisely, is the issue?
    >>>>>
    >>>>> If you have a form containing:
    >>>>>
    >>>>> 
    >>>>> 
    >>>>>
    >>>>> each bean will contain whatever was entered in the form.
    >>>>>
    >>>>> Dave
    >>>>>
    >>>>>
    >>>>> -
    >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
    >>>>> For additional commands, e-mail: [EMAIL PROTECTED]
    >>>>>
    >>>>>
    >>>>>
    >>>>> -
    >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
    >>> For additional commands, e-mail: [EMAIL PROTECTED]
    >>>
    >>>
    >>>
    >>
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Struts2 Data Transfer

    2008-10-09 Thread aum strut
    i even made getter and setter method for one of my beans namely Person
    
    but when i am using these getter /setter method in the action calss for the
    beans i am getting exception while the GetModel()
    
    i mean the model driven approach is working fine..
    
    On Thu, Oct 9, 2008 at 1:16 PM, aum strut <[EMAIL PROTECTED]> wrote:
    
    >  Yes Dave , There is a sigle form(Page) for this with different sections
    > in it for registration.i only want that the data from this single page
    > should go to different (2 in my case) beans depends upon the fields i have
    > defined in the respective beans.
    >
    >
    > i tied this and is working fine but i want that i should seperate the
    > getter and setter from my action
    >
    > i am using model driven approach and it is filling one beans accurately but
    > i can not fill the second beans in the same getModel() .
    >
    > any other approach so that i can fill thm at the same time once my action
    > get called .
    >
    >   On Thu, Oct 9, 2008 at 3:46 AM, Laurie Harper <[EMAIL PROTECTED]>wrote:
    >
    >> Just do what Dave outlined in his previous reply. You need getter/setters
    >> in your action for each bean ([gs]etBean1(), [gs]etBean2() to correspond
    >> with Dave's JSP sample code) and everything should work. Have you tried it?
    >>
    >> L.
    >>
    >>
    >> aum strut wrote:
    >>
    >>> the issue is i have a registration from in the UI  which have two
    >>> different
    >>> section in a single page.
    >>>
    >>> 1) User login Information
    >>> 2)Address Information
    >>>
    >>> i want that these two sections should get populated in two different Bean
    >>> by
    >>> the interceptor
    >>> that mean User login fields get Pouplated in the UserLogin Beans while
    >>> the
    >>> Address section should  get populated in the Address Bean when my
    >>> Registration Action get called once user will hit the Register Button.
    >>>
    >>>
    >>> Thanks
    >>> -aum
    >>>
    >>>
    >>> On Tue, Oct 7, 2008 at 10:59 PM, Dave Newton <[EMAIL PROTECTED]>
    >>> wrote:
    >>>
    >>> --- On Tue, 10/7/08, aum strut wrote:
    >>>>
    >>>>> i need to transfer data from the user registration page to
    >>>>> the java beans to be used for inserting values in the data base.
    >>>>> i have created two seperate beans for this 1) for storing user
    >>>>> address field and second is for storing user login information.
    >>>>>
    >>>>> i want that when user cllick on the REgister button these
    >>>>> two Beans get filled with the respective  values from the UI.
    >>>>> i have named the corresponding fields in the beans with respect
    >>>>> to the fields name in the UI.
    >>>>>
    >>>> What, precisely, is the issue?
    >>>>
    >>>> If you have a form containing:
    >>>>
    >>>> 
    >>>> 
    >>>>
    >>>> each bean will contain whatever was entered in the form.
    >>>>
    >>>> Dave
    >>>>
    >>>>
    >>>> -
    >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
    >>>> For additional commands, e-mail: [EMAIL PROTECTED]
    >>>>
    >>>>
    >>>>
    >>>
    >>
    >> -
    >> To unsubscribe, e-mail: [EMAIL PROTECTED]
    >> For additional commands, e-mail: [EMAIL PROTECTED]
    >>
    >>
    >
    
    

    Re: Struts2 Data Transfer

    2008-10-09 Thread aum strut
    Yes Dave , There is a sigle form(Page) for this with different sections in
    it for registration.i only want that the data from this single page should
    go to different (2 in my case) beans depends upon the fields i have defined
    in the respective beans.
    
    
    i tied this and is working fine but i want that i should seperate the getter
    and setter from my action
    
    i am using model driven approach and it is filling one beans accurately but
    i can not fill the second beans in the same getModel() .
    
    any other approach so that i can fill thm at the same time once my action
    get called .
    
    On Thu, Oct 9, 2008 at 3:46 AM, Laurie Harper <[EMAIL PROTECTED]> wrote:
    
    > Just do what Dave outlined in his previous reply. You need getter/setters
    > in your action for each bean ([gs]etBean1(), [gs]etBean2() to correspond
    > with Dave's JSP sample code) and everything should work. Have you tried it?
    >
    > L.
    >
    >
    > aum strut wrote:
    >
    >> the issue is i have a registration from in the UI  which have two
    >> different
    >> section in a single page.
    >>
    >> 1) User login Information
    >> 2)Address Information
    >>
    >> i want that these two sections should get populated in two different Bean
    >> by
    >> the interceptor
    >> that mean User login fields get Pouplated in the UserLogin Beans while the
    >> Address section should  get populated in the Address Bean when my
    >> Registration Action get called once user will hit the Register Button.
    >>
    >>
    >> Thanks
    >> -aum
    >>
    >>
    >> On Tue, Oct 7, 2008 at 10:59 PM, Dave Newton <[EMAIL PROTECTED]>
    >> wrote:
    >>
    >> --- On Tue, 10/7/08, aum strut wrote:
    >>>
    >>>> i need to transfer data from the user registration page to
    >>>> the java beans to be used for inserting values in the data base.
    >>>> i have created two seperate beans for this 1) for storing user
    >>>> address field and second is for storing user login information.
    >>>>
    >>>> i want that when user cllick on the REgister button these
    >>>> two Beans get filled with the respective  values from the UI.
    >>>> i have named the corresponding fields in the beans with respect
    >>>> to the fields name in the UI.
    >>>>
    >>> What, precisely, is the issue?
    >>>
    >>> If you have a form containing:
    >>>
    >>> 
    >>> 
    >>>
    >>> each bean will contain whatever was entered in the form.
    >>>
    >>> Dave
    >>>
    >>>
    >>> -
    >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
    >>> For additional commands, e-mail: [EMAIL PROTECTED]
    >>>
    >>>
    >>>
    >>
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Struts2 Data Transfer

    2008-10-08 Thread aum strut
    the issue is i have a registration from in the UI  which have two different
    section in a single page.
    
    1) User login Information
    2)Address Information
    
    i want that these two sections should get populated in two different Bean by
    the interceptor
    that mean User login fields get Pouplated in the UserLogin Beans while the
    Address section should  get populated in the Address Bean when my
    Registration Action get called once user will hit the Register Button.
    
    
    Thanks
    -aum
    
    
    On Tue, Oct 7, 2008 at 10:59 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
    
    > --- On Tue, 10/7/08, aum strut wrote:
    > > i need to transfer data from the user registration page to
    > > the java beans to be used for inserting values in the data base.
    > > i have created two seperate beans for this 1) for storing user
    > > address field and second is for storing user login information.
    > >
    > > i want that when user cllick on the REgister button these
    > > two Beans get filled with the respective  values from the UI.
    > > i have named the corresponding fields in the beans with respect
    > > to the fields name in the UI.
    >
    > What, precisely, is the issue?
    >
    > If you have a form containing:
    >
    > 
    > 
    >
    > each bean will contain whatever was entered in the form.
    >
    > Dave
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Struts2 Data Transfer

    2008-10-07 Thread aum strut
    Hi All,
    
    Sorry if i am asking a very basic question.
    
    i need to transfer data from the user registration page to the java beans to
    be used for inserting values in the data base.
    i have created two seperate beans for this
    1) for storing user address field and second is for storing user login
    information.
    
    i want that when user cllick on the REgister button these two Beans get
    filled with the respective  values from the UI. i have named the
    corresponding fields in the beans with respect to the fields name in the UI.
    
    currently i am using struts 2.0.11
    
    how can i fill these two beans at a same time so that my action class can
    use these two beans classes for the registration Logic.
    
    i have the idea of using ModelDriven Action but how can intianilised these
    two beans at same time any pointer in this regard will be much appriciated.
    
    Thanks in advance
    -aum
    
    

    Re: Action Execute Being called 2 times

    2008-08-04 Thread aum strut
    i changed this approach just to cross check the functionality
    i used simple java beans properties but still find the same problem i am
    gain attaching the jsp file.
    
    Thanks
    aum
    
    On Mon, Aug 4, 2008 at 3:56 PM, Gabriel Belingueres
    <[EMAIL PROTECTED]>wrote:
    
    > can't see the jsp file.
    > In the action class you are not using modeldriven as you said in the
    > first email.
    >
    > 2008/8/4 aum strut <[EMAIL PROTECTED]>:
    > > Hi,
    > >
    > > I tried all things and its again not working still action is getting
    > called
    > > 2 times for each call to this Register Action i am attaching the
    > > Register.jsp,Struts.xml as well as the action class please have a look at
    > it
    > > and point me where i am doing the mistake.
    > >
    > >
    > > Thanks in Advance
    > > -aum
    > >
    > > On Fri, Aug 1, 2008 at 5:37 PM, Joachim Ansorg <[EMAIL PROTECTED]> wrote:
    > >>
    > >> Hi,
    > >> you use the same action to render the welcome screen and Registrer.jsp.
    > >>
    > >> So this means that when you display the welcome screen execute() is
    > called
    > >> and when you display the Registrer.jsp page.
    > >>
    > >> Either use two separate actions or just return null in execute and have
    > >> another action method (i.e. save()) which writes into the db.
    > >> In the page with the submit button link to the action's save method. So
    > >> execute is used for welcome and save for the registration.
    > >>
    > >> Hope that helps,
    > >> Joachim
    > >>>
    > >>> Hi All,
    > >>>
    > >>> While developing an application in struts2 i am facing a strange
    > problem
    > >>> with one of my action namely RegsitrationAction.
    > >>> i have a jsp page for user registration where there are certain fields
    > >>> for
    > >>> the user to be filled for the registration purpose.
    > >>> i have created a UserProfile bean class with the bean properties for
    > all
    > >>> the
    > >>> user registration field.
    > >>
    > >> -
    > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
    > >> For additional commands, e-mail: [EMAIL PROTECTED]
    > >>
    > >
    > >
    > > -
    > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > For additional commands, e-mail: [EMAIL PROTECTED]
    > >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    

    Re: Action Execute Being called 2 times

    2008-08-04 Thread aum strut
    Hi,
    
    I tried all things and its again not working still action is getting called
    2 times for each call to this Register Action i am attaching the
    Register.jsp,Struts.xml as well as the action class please have a look at it
    and point me where i am doing the mistake.
    
    
    Thanks in Advance
    -aum
    
    On Fri, Aug 1, 2008 at 5:37 PM, Joachim Ansorg <[EMAIL PROTECTED]> wrote:
    
    > Hi,
    > you use the same action to render the welcome screen and Registrer.jsp.
    >
    > So this means that when you display the welcome screen execute() is called
    > and when you display the Registrer.jsp page.
    >
    > Either use two separate actions or just return null in execute and have
    > another action method (i.e. save()) which writes into the db.
    > In the page with the submit button link to the action's save method. So
    > execute is used for welcome and save for the registration.
    >
    > Hope that helps,
    > Joachim
    >
    >> Hi All,
    >>
    >> While developing an application in struts2 i am facing a strange problem
    >> with one of my action namely RegsitrationAction.
    >> i have a jsp page for user registration where there are certain fields for
    >> the user to be filled for the registration purpose.
    >> i have created a UserProfile bean class with the bean properties for all
    >> the
    >> user registration field.
    >>
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    package actionsfolder;
    
    import com.opensymphony.xwork2.ActionSupport;
    
    public class UserRegistrationAction extends ActionSupport{
    
    /**
     * 
     */
    private static final long serialVersionUID = -4632666801257988218L;
    
    private String username=null;
    private String password=null;
    private String email=null;
    /**
     * @return the username
     */
    public String getUsername() {
    return username;
    }
    /**
     * @param username the username to set
     */
    public void setUsername(String username) {
    this.username = username;
    }
    /**
     * @return the password
     */
    public String getPassword() {
    return password;
    }
    /**
     * @param password the password to set
     */
    public void setPassword(String password) {
    this.password = password;
    }
    /**
     * @return the email
     */
    public String getEmail() {
    return email;
    }
    /**
     * @param email the email to set
     */
    public void setEmail(String email) {
    this.email = email;
    }
    
    public String execute() throws Exception{
    System.out.println("**in Action***");
    return SUCCESS;
    }
    
    }
    http://struts.apache.org/dtds/struts-2.0.dtd";>
    
      
    
    
    /welcome/welcome.jsp
    /index.jsp
    
    
    
    /welcome/welcome.jsp
    
    
    
      /index.jsp
      
      
      
      /index.jsp
      
      
      
      /registration/Registrer.jsp
      
      
     
    
    -
    To unsubscribe, e-mail: [EMAIL PROTECTED]
    For additional commands, e-mail: [EMAIL PROTECTED]
    

    Action Execute Being called 2 times

    2008-08-01 Thread aum strut
    Hi All,
    
    While developing an application in struts2 i am facing a strange problem
    with one of my action namely RegsitrationAction.
    i have a jsp page for user registration where there are certain fields for
    the user to be filled for the registration purpose.
    i have created a UserProfile bean class with the bean properties for all the
    user registration fields.
    
    in the Action class i am using Model Driven Approach for the Data Transfer
    but my action execute method is being called 2 times and i am unable to
    figure out the exact problem,but i can find the same data twice in the
    database.below is the snapshot of my action calss as well as the Struts.xml
    file for the Registration Process.
    
    *ACTION CLASS
    
    public class UserRegistration extends ActionSupport implements
    ModelDriven {
    
    /**
     *
     */
    private static final long serialVersionUID = 4619853901735738145L;
    private boolean status=false;
    public String execute()throws Exception{
    
    RegisterUser registerUser=new RegisterUser();
    status=registerUser.registerNewUser(userProfile);
    
    System.out.println("***Status is*
    "+status);
    if(status){
    return SUCCESS;
    }
    else{
    return INPUT;
    }
    }
    
    private UserProfile userProfile=new UserProfile();
    
    public UserProfile getModel(){
    return userProfile;
    }
    
    
    
    }
    
    
    Struts.xml
    
    
    /welcome/welcome.jsp
    /registration/Registrer.jsp
    
    
    
    Any help in this regard will be much appriciated..
    
    
    Thanks in advance
    -aum
    *
    
    

    Re: not working

    2008-07-20 Thread aum strut
    Thanks Chase for the Help
    
    There was the problem with the URL value in the include statement.
    :)
    
    On Mon, Jul 21, 2008 at 2:46 AM, Chase <[EMAIL PROTECTED]> wrote:
    
    > Are you adjusting the relative URL value in your include statement
    > based on the folder depth of the containing page or are you just
    > copying & pasting the same include statement in every single page?
    >
    > -Chase
    >
    > On Sun, Jul 20, 2008 at 1:20 AM, aum strut <[EMAIL PROTECTED]> wrote:
    > > Hi Chase,
    > >
    > > Is there any relation with the depth because when i put index.jsp page
    > and
    > > HElloWorld.jsp page in the same folder, it starts to include the other
    > jsp
    > > page which i unable to include when the pages were in different folders.
    > >
    > > any suggestion in this regards will be much helpful.
    > > yes all the pages have same tag lib directive
    > >
    > > -Aum
    > >
    > >
    > > On 7/19/08, Chase <[EMAIL PROTECTED]> wrote:
    > >>
    > >> Why does your tag have a body?  value="IncludedMenu/menu.jsp"/>
    > >>
    > >> Do the other pages contain the same taglib directives? If you view the
    > >> source in your web browser and see the tag code that means you are
    > >> missing a taglib directive.
    > >>
    > >> Your include is using a relative page, are all the pages at the same
    > depth?
    > >>
    > >> -Chase
    > >>
    > >> On Sat, Jul 19, 2008 at 4:22 AM, aum strut <[EMAIL PROTECTED]>
    > wrote:
    > >> > Hi all,
    > >> >
    > >> > i am trying to include a jsp page using struts2  but
    > >> > itdosen't seems to be working in my way.
    > >> > i have a menu.jsp page where i have written a code for the menu for my
    > >> > application.
    > >> > i have included this menu.jsp page in my index.jsp page were it is
    > >> working
    > >> > fine.When i click on any menu option it redirect me to another page
    > using
    > >> > the action.i tried to use the same  tage in other pages but
    > it
    > >> is
    > >> > not working where as it is working fine in the index.jsp page. where
    > as
    > >> if i
    > >> > include the code in the other pages instead of including the jap page
    > the
    > >> > menuy starts appearing fine.
    > >> >
    > >> >
    > >> > 
    > >> >
    > >> > i have included the menu.jsp page in index page using this tag and
    > >> working
    > >> > fine here but when tried to use the same tage in others pageses i
    > >> failed.Can
    > >> > any one suggest me where i am doing wrong.??
    > >> >
    > >> > Thanks in advance
    > >> >
    > >> > -aum
    > >> >
    > >>
    > >> -
    > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
    > >> For additional commands, e-mail: [EMAIL PROTECTED]
    > >>
    > >>
    > >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: not working

    2008-07-19 Thread aum strut
    Hi Chase,
    
    Is there any relation with the depth because when i put index.jsp page and
    HElloWorld.jsp page in the same folder, it starts to include the other jsp
    page which i unable to include when the pages were in different folders.
    
    any suggestion in this regards will be much helpful.
    yes all the pages have same tag lib directive
    
    -Aum
    
    
    On 7/19/08, Chase <[EMAIL PROTECTED]> wrote:
    >
    > Why does your tag have a body? 
    >
    > Do the other pages contain the same taglib directives? If you view the
    > source in your web browser and see the tag code that means you are
    > missing a taglib directive.
    >
    > Your include is using a relative page, are all the pages at the same depth?
    >
    > -Chase
    >
    > On Sat, Jul 19, 2008 at 4:22 AM, aum strut <[EMAIL PROTECTED]> wrote:
    > > Hi all,
    > >
    > > i am trying to include a jsp page using struts2  but
    > > itdosen't seems to be working in my way.
    > > i have a menu.jsp page where i have written a code for the menu for my
    > > application.
    > > i have included this menu.jsp page in my index.jsp page were it is
    > working
    > > fine.When i click on any menu option it redirect me to another page using
    > > the action.i tried to use the same  tage in other pages but it
    > is
    > > not working where as it is working fine in the index.jsp page. where as
    > if i
    > > include the code in the other pages instead of including the jap page the
    > > menuy starts appearing fine.
    > >
    > >
    > > 
    > >
    > > i have included the menu.jsp page in index page using this tag and
    > working
    > > fine here but when tried to use the same tage in others pageses i
    > failed.Can
    > > any one suggest me where i am doing wrong.??
    > >
    > > Thanks in advance
    > >
    > > -aum
    > >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    not working

    2008-07-19 Thread aum strut
    Hi all,
    
    i am trying to include a jsp page using struts2  but
    itdosen't seems to be working in my way.
    i have a menu.jsp page where i have written a code for the menu for my
    application.
    i have included this menu.jsp page in my index.jsp page were it is working
    fine.When i click on any menu option it redirect me to another page using
    the action.i tried to use the same  tage in other pages but it is
    not working where as it is working fine in the index.jsp page. where as if i
    include the code in the other pages instead of including the jap page the
    menuy starts appearing fine.
    
    
    
    
    i have included the menu.jsp page in index page using this tag and working
    fine here but when tried to use the same tage in others pageses i failed.Can
    any one suggest me where i am doing wrong.??
    
    Thanks in advance
    
    -aum
    
    

    Re: Struts 2 in action

    2008-07-03 Thread aum strut
    Hi Bharat,
    
    Its a Gud deal go ahead.
    
    i almost went through all the books in the market with title Struts2
    but it is best
    go for it boss..
    
    --aum
    
    
    On Thu, Jul 3, 2008 at 11:34 PM, bhaarat Sharma <[EMAIL PROTECTED]> wrote:
    
    > buy it, i shall then.
    >
    > Thanks guys!
    >
    > I've also scammed over Ian Roughly's book which was also a good read.
    >
    > On Thu, Jul 3, 2008 at 1:51 PM, Greg Lindholm <[EMAIL PROTECTED]> wrote:
    >
    > >
    > > Yes, I highly recommend it, it's the top book on my desk right now.
    > > I've referenced it almost everyday since I read it.
    > >
    > >
    > > omnipresent wrote:
    > > >
    > > > Hi guys,
    > > >
    > > > Has anyone taken a look at 'Struts 2 in action' from manning
    > > publications?
    > > >
    > > > I am thinking about buything this book and wanted someone's suggestion.
    > > >
    > > > If you've browsed through the book, can you please provide some
    > feedback.
    > > >
    > > > Thanks
    > > >
    > > >
    > >
    > > --
    > > View this message in context:
    > > http://www.nabble.com/Struts-2-in-action-tp18263762p18264964.html
    > > Sent from the Struts - User mailing list archive at Nabble.com.
    > >
    > >
    > > -
    > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > For additional commands, e-mail: [EMAIL PROTECTED]
    > >
    > >
    >
    
    

    Re: Building First strut

    2008-04-24 Thread aum strut
    Wes is right without information about the version its very hard to put any
    comments on this,
    
    On 4/25/08, Wes Wannemacher <[EMAIL PROTECTED]> wrote:
    >
    > Which version of struts are you using? Struts 1 and Struts 2 are very
    > different.
    >
    > -Wes
    >
    > On Thu, 2008-04-24 at 17:48 -0700, Vinay Nagrik wrote:
    > > Hello Group,
    > >
    > > I am working with struts and following is what I have done already.
    > >
    > > 1. Downloaded tomcat, configured it, and it is running alright.
    > >
    > > 2. Downloaded struts unzipped, untarred it and copied necessary .jar
    > files
    > > from this directory into tomcat WEB-INF/lib directory.
    > >
    > > 3. Built web.xml for HelloWorld example and placed it under WEB-INF.
    > >
    > > 4. Built struts.xml file for HelloWorld and placed it under
    > WEB-INF/classes
    > > directory.
    > >
    > > 5. Wrote HelloWorld.java and compiled it.
    > >
    > > I am stuck here.
    > >
    > > Questions
    > >
    > > Where to put HelloWorld.java, HelloWorld.jsp.
    > >
    > > I downloaded Maven to work with struts but it did not compile for lack of
    > > pom.xml. And there is no good example available. I copied the one on the
    > > internet, but
    > >
    > > Neither
    > >
    > > mvn clean install
    > >
    > > nor
    > > mvn install
    > >
    > > will compile
    > >
    > > How do I create the .war files.
    > >
    > > I need to start my first strut example and I will appreciate any help.
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Clearing form value

    2008-04-21 Thread aum strut
    ok i got that
    
    thks for helping me out
    
    
    On 4/21/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    >
    > By "redirect" I mean using the redirect action result type.
    >
    > Nils-H
    >
    > On Mon, Apr 21, 2008 at 6:40 AM, aum strut <[EMAIL PROTECTED]> wrote:
    > > Nils can u just describe a bit wat u mean here by redirect
    > >  its quite possible that i am taking redirect in some other way..
    > >
    > >  aum
    > >
    > >
    > >
    > >
    > >  On 4/21/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    > >  >
    > >  > I don't see why that should prevent you from doing a redirect?
    > >  >
    > >  > Nils-H
    > >  >
    > >  > On Mon, Apr 21, 2008 at 5:44 AM, aum strut <[EMAIL PROTECTED]>
    > wrote:
    > >  > > Nils
    > >  > >
    > >  > >  though i have achieved this using javascript
    > >  > >  my problem was that i can not redirect as i have to enter multipal
    > >  > records
    > >  > >  at a given time
    > >  > >
    > >  > >
    > >  > >
    > >  > >
    > >  > >  On 4/20/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    > >  > >  >
    > >  > >  > Considering you're processing the form and displaying the form
    > using
    > >  > >  > the same action within the same request, I would say this is
    > expected
    > >  > >  > behavior. I would consider doing a redirect after the post
    > instead.
    > >  > >  >
    > >  > >  > Nils-H
    > >  > >  >
    > >  > >  > On Sat, Apr 19, 2008 at 12:06 PM, aum strut <
    > [EMAIL PROTECTED]>
    > >  > wrote:
    > >  > >  > > i am not using Spring at all.here is the code for my
    > configuration
    > >  > and
    > >  > >  > >  action class
    > >  > >  > >
    > >  > >  > >  my *Quotation.jsp page* by which i am adding data
    > >  > >  > >
    > >  > >  > >
    > >  > >  > >  <%@ taglib prefix="s" uri="/struts-tags" %>
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  Quotation Form
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >   >  > color="red"> >  > >  > >  s:actionmessage>
    > >  > >  > >
    > >  > >  > >      Quotation Form
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >   
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >   rows="4"/>
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >
    > >  > >  > >  
    > >  > >  > >  *my action class*
    > >  > >  > >
    > >  > >  > >
    > >  > >  > >  package raisonne.billgeneration;
    > >  > >  > >
    > >  > >  > >  import com.opensymphony.xwork2.ActionSupport;
    > >  > >  > >  import raisonne.billgeneration.GetBillConnection;
    > >  > >  > >
    > >  > >  > >  public class SaveBillingData extends ActionSupport{
    > >  > >  > >
    > >  > >  > >   /**
    > >  > >  > >   *
    > >  > >  > >   */
    > >  > >  > >   private static final long serialVersionUID =
    > >  > -5856152810070496725L;
    > >  > >  > >   private i

    Re: Clearing form value

    2008-04-20 Thread aum strut
    Nils can u just describe a bit wat u mean here by redirect
    its quite possible that i am taking redirect in some other way..
    
    aum
    
    
    On 4/21/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    >
    > I don't see why that should prevent you from doing a redirect?
    >
    > Nils-H
    >
    > On Mon, Apr 21, 2008 at 5:44 AM, aum strut <[EMAIL PROTECTED]> wrote:
    > > Nils
    > >
    > >  though i have achieved this using javascript
    > >  my problem was that i can not redirect as i have to enter multipal
    > records
    > >  at a given time
    > >
    > >
    > >
    > >
    > >  On 4/20/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    > >  >
    > >  > Considering you're processing the form and displaying the form using
    > >  > the same action within the same request, I would say this is expected
    > >  > behavior. I would consider doing a redirect after the post instead.
    > >  >
    > >  > Nils-H
    > >  >
    > >  > On Sat, Apr 19, 2008 at 12:06 PM, aum strut <[EMAIL PROTECTED]>
    > wrote:
    > >  > > i am not using Spring at all.here is the code for my configuration
    > and
    > >  > >  action class
    > >  > >
    > >  > >  my *Quotation.jsp page* by which i am adding data
    > >  > >
    > >  > >
    > >  > >  <%@ taglib prefix="s" uri="/struts-tags" %>
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  Quotation Form
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >   color="red"> >  > >  s:actionmessage>
    > >  > >
    > >  > >      Quotation Form
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >   
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >
    > >  > >  
    > >  > >  *my action class*
    > >  > >
    > >  > >
    > >  > >  package raisonne.billgeneration;
    > >  > >
    > >  > >  import com.opensymphony.xwork2.ActionSupport;
    > >  > >  import raisonne.billgeneration.GetBillConnection;
    > >  > >
    > >  > >  public class SaveBillingData extends ActionSupport{
    > >  > >
    > >  > >   /**
    > >  > >   *
    > >  > >   */
    > >  > >   private static final long serialVersionUID =
    > -5856152810070496725L;
    > >  > >   private int rowInserted=0;
    > >  > >   private String date=null;
    > >  > >   private String voucherNumber=null;
    > >  > >   private String customerName=null;
    > >  > >   private String address=null;
    > >  > >   private String contactNo=null;
    > >  > >   private String itemName=null;
    > >  > >   private String purity=null;
    > >  > >   private double grossWeight=0.0;
    > >  > >   private double netWeight=0.0;
    > >  > >   private double diamondWeight=0.0;
    > >  > >   private double goldRate=0.0;
    > >  > >   private double amount=0.0;
    > >  > >
    > >  > >  /*
    > >  > >
    > >  > >  Getter and Setter Method
    > >  > >
    > >  > >  */
    > >  > >
    > >  > >   public String execute() throws Exception{
    > >  > >   GetBillConnection billCollection =new GetBillConnection();
    > >  > >
    > >  >
    > rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
    > >  > > getCustomerName(),getAddress(),getContactNo(),
    > >  > > getItemName(),getPurity(),getGrossWeight(),
    > >  > > getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
    > >  > >   if(rowInserted>0){
    > >  > >addActionMessage("Quotation data has been submitted
    > successfully");
    > >  > >return SUCCESS;
    > >  > >   }
    > >  > >   else{
    > >  > >addAc

    Re: Clearing form value

    2008-04-20 Thread aum strut
    Nils
    
    though i have achieved this using javascript
    my problem was that i can not redirect as i have to enter multipal records
    at a given time
    
    
    On 4/20/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    >
    > Considering you're processing the form and displaying the form using
    > the same action within the same request, I would say this is expected
    > behavior. I would consider doing a redirect after the post instead.
    >
    > Nils-H
    >
    > On Sat, Apr 19, 2008 at 12:06 PM, aum strut <[EMAIL PROTECTED]> wrote:
    > > i am not using Spring at all.here is the code for my configuration and
    > >  action class
    > >
    > >  my *Quotation.jsp page* by which i am adding data
    > >
    > >
    > >  <%@ taglib prefix="s" uri="/struts-tags" %>
    > >
    > >  
    > >
    > >  
    > >
    > >  Quotation Form
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >   >  s:actionmessage>
    > >
    > >      Quotation Form
    > >
    > >  
    > >
    > >  
    > >
    > >   
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >
    > >  
    > >  *my action class*
    > >
    > >
    > >  package raisonne.billgeneration;
    > >
    > >  import com.opensymphony.xwork2.ActionSupport;
    > >  import raisonne.billgeneration.GetBillConnection;
    > >
    > >  public class SaveBillingData extends ActionSupport{
    > >
    > >   /**
    > >   *
    > >   */
    > >   private static final long serialVersionUID = -5856152810070496725L;
    > >   private int rowInserted=0;
    > >   private String date=null;
    > >   private String voucherNumber=null;
    > >   private String customerName=null;
    > >   private String address=null;
    > >   private String contactNo=null;
    > >   private String itemName=null;
    > >   private String purity=null;
    > >   private double grossWeight=0.0;
    > >   private double netWeight=0.0;
    > >   private double diamondWeight=0.0;
    > >   private double goldRate=0.0;
    > >   private double amount=0.0;
    > >
    > >  /*
    > >
    > >  Getter and Setter Method
    > >
    > >  */
    > >
    > >   public String execute() throws Exception{
    > >   GetBillConnection billCollection =new GetBillConnection();
    > >
    > rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
    > > getCustomerName(),getAddress(),getContactNo(),
    > > getItemName(),getPurity(),getGrossWeight(),
    > > getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
    > >   if(rowInserted>0){
    > >addActionMessage("Quotation data has been submitted successfully");
    > >return SUCCESS;
    > >   }
    > >   else{
    > >addActionMessage("Error while saving Quotation data, Pleaes retry");
    > >return INPUT;
    > >   }
    > >   }
    > >
    > >
    > >  }
    > >
    > >
    > >  lastly *Struts.xml file*
    > >
    > >
    > >   namespace=
    > >  "/">
    > >
    > >   class="raisonne.billgeneration.SaveBillingData">
    > >
    > >  /BillGeneration/Quotation.jsp
    > >
    > >  /Login/Login.jsp
    > >
    > >  
    > >
    > >  
    > >  -aum
    > >
    > >
    > >
    > >
    > >  On 4/19/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    > >  >
    > >  > It would be a lot easier helping if you show us some configuration
    > >  > files and code
    > >  >
    > >  > Nils-H
    > >  >
    > >  > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <[EMAIL PROTECTED]>
    > wrote:
    > >  > > yes you are right
    > >  > >
    > >  > >  not providing complete information in one mail is really not good
    > >  > >
    > >  > >  i wil take this in to account in future...
    > >  > >
    > >  > >  well i am not using spring in my application i have a simple form
    > which
    > >  > is
    > >  > >  sending the input values to my action where i am adding these in
    > to the
    > >  > data
    > >  > >  base using simple jdbc call everything is working fine i am even
    > >  > getting
    > >  > >  back the success response in my add form.
    > >  > >
    > >  > >  i am not able to understand what u mean by "not have your action
    > >  > defined as
    > >  > >  being "prototype"
    > >  > >  scope"
    >

    Re: Clearing form value

    2008-04-19 Thread aum strut
    i am not using Spring at all.here is the code for my configuration and
    action class
    
    my *Quotation.jsp page* by which i am adding data
    
    
    <%@ taglib prefix="s" uri="/struts-tags" %>
    
    
    
    
    
    Quotation Form
    
    
    
    
    
    
    
    
    
        Quotation Form
    
    
    
    
    
     
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    *my action class*
    
    
    package raisonne.billgeneration;
    
    import com.opensymphony.xwork2.ActionSupport;
    import raisonne.billgeneration.GetBillConnection;
    
    public class SaveBillingData extends ActionSupport{
    
     /**
      *
      */
     private static final long serialVersionUID = -5856152810070496725L;
     private int rowInserted=0;
     private String date=null;
     private String voucherNumber=null;
     private String customerName=null;
     private String address=null;
     private String contactNo=null;
     private String itemName=null;
     private String purity=null;
     private double grossWeight=0.0;
     private double netWeight=0.0;
     private double diamondWeight=0.0;
     private double goldRate=0.0;
     private double amount=0.0;
    
    /*
    
    Getter and Setter Method
    
    */
    
     public String execute() throws Exception{
      GetBillConnection billCollection =new GetBillConnection();
      rowInserted=billCollection.AddBillingData(getDate(),getVoucherNumber(),
    getCustomerName(),getAddress(),getContactNo(),
    getItemName(),getPurity(),getGrossWeight(),
    getNetWeight(),getDiamondWeight(),getGoldRate(),getAmount());
      if(rowInserted>0){
       addActionMessage("Quotation data has been submitted successfully");
       return SUCCESS;
      }
      else{
       addActionMessage("Error while saving Quotation data, Pleaes retry");
       return INPUT;
      }
     }
    
    
    }
    
    
    lastly *Struts.xml file*
    
    
    
    
    
    
    /BillGeneration/Quotation.jsp
    
    /Login/Login.jsp
    
    
    
    
    -aum
    
    
    On 4/19/08, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]> wrote:
    >
    > It would be a lot easier helping if you show us some configuration
    > files and code
    >
    > Nils-H
    >
    > On Sat, Apr 19, 2008 at 6:59 AM, aum strut <[EMAIL PROTECTED]> wrote:
    > > yes you are right
    > >
    > >  not providing complete information in one mail is really not good
    > >
    > >  i wil take this in to account in future...
    > >
    > >  well i am not using spring in my application i have a simple form which
    > is
    > >  sending the input values to my action where i am adding these in to the
    > data
    > >  base using simple jdbc call everything is working fine i am even
    > getting
    > >  back the success response in my add form.
    > >
    > >  i am not able to understand what u mean by "not have your action
    > defined as
    > >  being "prototype"
    > >  scope"
    > >
    > >  aum
    > >
    > >
    > >
    > >
    > >  On 4/19/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    > >  >
    > >  > Are you using Spring?
    > >  >
    > >  > Would it be possible for you to provide more useful information in
    > your
    > >  > initial emails rather than generating a stream of a half-dozen or
    > more?
    > >  > It's
    > >  > rather frustrating; we've gone through this before.
    > >  >
    > >  > One common error is to not have your action defined as being
    > "prototype"
    > >  > scope. Since actions are instantiated on each request (normally) it's
    > not
    > >  > typical to see this behavior without some effort on your part or
    > >  > mis-configuration.
    > >  >
    > >  > Dave
    > >  >
    > >  > --- aum strut <[EMAIL PROTECTED]> wrote:
    > >  >
    > >  > > currently i am using struts-2.0.11.1
    > >  > >
    > >  > > On 4/19/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    > >  > > >
    > >  > > > Which version of Struts?
    > >  > > >
    > >  > > > --- aum strut <[EMAIL PROTECTED]> wrote:
    > >  > > >
    > >  > > > > Hi all,
    > >  > > > >
    > >  > > > > a little point which i want to know.
    > >  > > > > i have a form by which we can add billing detais in the
    > database
    > >  > > > >
    > >  > > > > form is working fine, it is adding the value to the database as
    > >  > > > expected,
    > >  > > > > the problem whcih i am facing is even after successfully
    > submitting
    > >  > the
    > >  > > > > values, it is not clearing the form values which has been added
    > >  > > > >
    > >  > > > > i can clear the fields values  using java script,but i want to
    > know
    > >  > is
    > >  > > > it
    > >  > > > > possible using Struts2,is theer any was that when ever data is
    > >  > > submitted
    > >  > > > > successfully in the database form fields values should get
    > cleared.
    > >  > > > >
    > >  > > > >
    > >  > > > > any help in this regard will be much appriciated.
    > >  > > > >
    > >  > > > >
    > >  > > > > thanks in advance
    > >  > > > > --aum
    > >  > > > >
    > >  > > >
    > >  > > >
    > >  > > >
    > -
    > >  > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > >  > > > For additional commands, e-mail: [EMAIL PROTECTED]
    > >  > > >
    > >  > > >
    > >  > >
    > >  >
    > >  >
    > >  > -
    > >  > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > >  > For additional commands, e-mail: [EMAIL PROTECTED]
    > >  >
    > >  >
    > >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Clearing form value

    2008-04-18 Thread aum strut
    yes you are right
    
    not providing complete information in one mail is really not good
    
    i wil take this in to account in future...
    
    well i am not using spring in my application i have a simple form which is
    sending the input values to my action where i am adding these in to the data
    base using simple jdbc call everything is working fine i am even getting
    back the success response in my add form.
    
    i am not able to understand what u mean by "not have your action defined as
    being "prototype"
    scope"
    
    aum
    
    
    On 4/19/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    >
    > Are you using Spring?
    >
    > Would it be possible for you to provide more useful information in your
    > initial emails rather than generating a stream of a half-dozen or more?
    > It's
    > rather frustrating; we've gone through this before.
    >
    > One common error is to not have your action defined as being "prototype"
    > scope. Since actions are instantiated on each request (normally) it's not
    > typical to see this behavior without some effort on your part or
    > mis-configuration.
    >
    > Dave
    >
    > --- aum strut <[EMAIL PROTECTED]> wrote:
    >
    > > currently i am using struts-2.0.11.1
    > >
    > > On 4/19/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    > > >
    > > > Which version of Struts?
    > > >
    > > > --- aum strut <[EMAIL PROTECTED]> wrote:
    > > >
    > > > > Hi all,
    > > > >
    > > > > a little point which i want to know.
    > > > > i have a form by which we can add billing detais in the database
    > > > >
    > > > > form is working fine, it is adding the value to the database as
    > > > expected,
    > > > > the problem whcih i am facing is even after successfully submitting
    > the
    > > > > values, it is not clearing the form values which has been added
    > > > >
    > > > > i can clear the fields values  using java script,but i want to know
    > is
    > > > it
    > > > > possible using Struts2,is theer any was that when ever data is
    > > submitted
    > > > > successfully in the database form fields values should get cleared.
    > > > >
    > > > >
    > > > > any help in this regard will be much appriciated.
    > > > >
    > > > >
    > > > > thanks in advance
    > > > > --aum
    > > > >
    > > >
    > > >
    > > > -
    > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > > For additional commands, e-mail: [EMAIL PROTECTED]
    > > >
    > > >
    > >
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Clearing form value

    2008-04-18 Thread aum strut
    currently i am using struts-2.0.11.1
    
    On 4/19/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    >
    > Which version of Struts?
    >
    > --- aum strut <[EMAIL PROTECTED]> wrote:
    >
    > > Hi all,
    > >
    > > a little point which i want to know.
    > > i have a form by which we can add billing detais in the database
    > >
    > > form is working fine, it is adding the value to the database as
    > expected,
    > > the problem whcih i am facing is even after successfully submitting the
    > > values, it is not clearing the form values which has been added
    > >
    > > i can clear the fields values  using java script,but i want to know is
    > it
    > > possible using Struts2,is theer any was that when ever data is submitted
    > > successfully in the database form fields values should get cleared.
    > >
    > >
    > > any help in this regard will be much appriciated.
    > >
    > >
    > > thanks in advance
    > > --aum
    > >
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Clearing form value

    2008-04-18 Thread aum strut
    Hi all,
    
    a little point which i want to know.
    i have a form by which we can add billing detais in the database
    
    form is working fine, it is adding the value to the database as expected,
    the problem whcih i am facing is even after successfully submitting the
    values, it is not clearing the form values which has been added
    
    i can clear the fields values  using java script,but i want to know is it
    possible using Struts2,is theer any was that when ever data is submitted
    successfully in the database form fields values should get cleared.
    
    
    any help in this regard will be much appriciated.
    
    
    thanks in advance
    --aum
    
    

    JasperReports in Struts2

    2008-04-17 Thread aum strut
    Hi Friends,
    
    I have tried jasperreports in simple web application using jsp, servlets, it
    works fine.
    Now I need to implement jasperreports in struts2 application but its not
    working. Currently it is displaying blank report.
    
    Please guide me in this regard. Any gud reference related to
    struts2+jasperreports will be much appreciated.
    
    Thanks!
    
    

    Re: [OT] Re: Struts2 and tag

    2008-04-05 Thread aum strut
    thanks dave for the help iwill look in to this and will try to find out the
    clue
    
    On 4/5/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    >
    > --- aum strut <[EMAIL PROTECTED]> wrote:
    > > i am using my eclipse for the development
    > > everything was working ine before i tried to use the display tag
    >
    > ...
    >
    > The exception is telling you precisely what class is missing; this is a
    > clue
    > as to what may be wrong.
    >
    > Do you have *all* the libraries you need for using displaytag?
    >
    > You can't just randomly add libraries to your application and expect it to
    > work: libraries have their own sets of dependencies. You almost certainly
    > don't have all the dependencies that displaytag requires.
    >
    > Look up the dependencies for displaytag and make sure you have them all.
    > Here's the link:
    >
    > http://displaytag.sourceforge.net/11/displaytag/dependencies.html
    >
    > This is Java 101. I'd consider taking some time to learn the environment
    > within which you're attempting to program; it will almost certainly save
    > time
    > and aggravation.
    >
    > Dave
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: [OT] Re: Struts2 and tag

    2008-04-05 Thread aum strut
    i am using my eclipse for the development
    everything was working ine before i tried to use the display tag
    
    
    
    On 4/5/08, Alberto A. Flores <[EMAIL PROTECTED]> wrote:
    >
    > Please note:
    >
    > java.lang.NoClassDefFoundError:
    > *org/apache/commons/lang/UnhandledException
    > *
    >
    > Indicates the classloader couldn't find a class (which one, you may ask?).
    > Looks like commons.lang couldn't find the UnhandledException class. Please
    > make sure you have all displaytag dependencies. You may want to consider
    > using maven2 to avoid these problems.
    >
    >
    > On Sat, Apr 5, 2008 at 1:52 PM, aum strut <[EMAIL PROTECTED]> wrote:
    >
    > > yes i have already put the display tag jr file in my lib folder
    > > only problem in my opinion is use of
    > >
    > > <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>
    > > tag lib directiveas removing this directive will aslo remove the
    > > exception,
    > > according to exceptin it is unable to find the class.
    > > myself also trying to use the display tag first time with struts2 and i
    > am
    > > also not sure abot how to configure it with struts2.
    > >
    > >
    > > On 4/5/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    > > >
    > > > --- aum strut <[EMAIL PROTECTED]> wrote:
    > > > > here is the exception which i am facing
    > > > >
    > > > > java.lang.NoClassDefFoundError:
    > > > *org/apache/commons/lang/UnhandledException
    > > > > *
    > > >
    > > > So what does that exception tell you?
    > > >
    > > > (I have very limited internet access today, so I can't look up the
    > > > requirements for displaytag. but do you have all the required
    > libraries
    > > > for
    > > > it?)
    > > >
    > > > Dave
    > > >
    > > >
    > > > -
    > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > > For additional commands, e-mail: [EMAIL PROTECTED]
    > > >
    > > >
    > >
    >
    >
    >
    > --
    > Alberto
    > http://www.linkedin.com/in/aflores
    >
    
    

    Re: [OT] Re: Struts2 and tag

    2008-04-05 Thread aum strut
    yes i have already put the display tag jr file in my lib folder
    only problem in my opinion is use of
    
    <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>
    tag lib directiveas removing this directive will aslo remove the exception,
    according to exceptin it is unable to find the class.
    myself also trying to use the display tag first time with struts2 and i am
    also not sure abot how to configure it with struts2.
    
    
    On 4/5/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    >
    > --- aum strut <[EMAIL PROTECTED]> wrote:
    > > here is the exception which i am facing
    > >
    > > java.lang.NoClassDefFoundError:
    > *org/apache/commons/lang/UnhandledException
    > > *
    >
    > So what does that exception tell you?
    >
    > (I have very limited internet access today, so I can't look up the
    > requirements for displaytag. but do you have all the required libraries
    > for
    > it?)
    >
    > Dave
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Struts2 and tag

    2008-04-05 Thread aum strut
    .DefaultActionInvocation$2.doProfiling(*
    DefaultActionInvocation.java:223*)
    
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
    UtilTimerStack.java:455*)
    
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
    DefaultActionInvocation.java:221*)
    
    at
    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(*
    ExceptionMappingInterceptor.java:176*)
    
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
    DefaultActionInvocation.java:224*)
    
    at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(*
    DefaultActionInvocation.java:223*)
    
    at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(*
    UtilTimerStack.java:455*)
    
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
    DefaultActionInvocation.java:221*)
    
    at org.apache.struts2.impl.StrutsActionProxy.execute(*
    StrutsActionProxy.java:50*)
    
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(*
    Dispatcher.java:504*)
    
    at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(*
    FilterDispatcher.java:419*)
    
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
    ApplicationFilterChain.java:235*)
    
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
    ApplicationFilterChain.java:206*)
    
    at org.apache.catalina.core.StandardWrapperValve.invoke(*
    StandardWrapperValve.java:230*)
    
    at org.apache.catalina.core.StandardContextValve.invoke(*
    StandardContextValve.java:175*)
    
    at org.apache.catalina.core.StandardHostValve.invoke(*
    StandardHostValve.java:128*)
    
    at org.apache.catalina.valves.ErrorReportValve.invoke(*
    ErrorReportValve.java:104*)
    
    at org.apache.catalina.core.StandardEngineValve.invoke(*
    StandardEngineValve.java:109*)
    
    at org.apache.catalina.connector.CoyoteAdapter.service(*
    CoyoteAdapter.java:261*)
    
    at org.apache.coyote.http11.Http11Processor.process(*
    Http11Processor.java:844*)
    
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
    Http11Protocol.java:581*)
    
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*JIoEndpoint.java:447*)
    
    at java.lang.Thread.run(Unknown Source
    
    
    
    but if i will remove this tag lib directive
    
    <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>
    from the JSP pag everything is working fine.
    
    --aum
    
    
    On 4/5/08, Dave Newton <[EMAIL PROTECTED]> wrote:
    >
    > --- aum strut <[EMAIL PROTECTED]> wrote:
    > > i have also imported the displaytag* in my jsp in the following way*
    > >
    > > <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>
    > >
    > > but on adding this it is giving exception and i will remove this taglib
    > > eveything is working fine yes the data is not being displyed
    >
    > *WHAT* exception?!
    >
    > It's really important to include useful information when you ask
    > questions:
    > you must realize that the exception might have allowed someone to
    > immediately
    > diagnose the problem, turning this into a solved issue with a single
    > email.
    >
    > Dave
    >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Struts2 and tag

    2008-04-05 Thread aum strut
    Hi All,
    
    I want to use display tag for displaying the data i have put the
    displaytag.jar file in the lib folder.
    i have an action class which is returnig the required data in an array list
    
    *
    
    public* ArrayList getItemCodeList() {
    
    *return* itemCodeList;
    
    }
    
    i am trying to use the display table tag* *in my jsp in the following manner
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    i have also imported the displaytag* in my jsp in the following way*
    
    <%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>
    
    but on adding this it is giving exception and i will remove this taglib
    eveything is working fine yes the data is not being displyed
    
    if any body have any idea how to configure display tag in struts2 pleaes
    provider the pointer towards this.
    
    any help in this regard will be much appriciated.
    
    
    
    aum
    
    **
    
    

    Re: New to Struts

    2008-04-01 Thread aum strut
    documentation is the best place to get started...
    keep one thing do not read only try them side by side.
    below are some of the others link which might help you.
    
    http://www.wantii.com/wordpress/?p=9
    http://www.roseindia.com
    
    i hope these are the perfect starter.
    
    -aum
    
    On Tue, Apr 1, 2008 at 4:33 PM, Nils-Helge Garli Hegvik <[EMAIL PROTECTED]>
    wrote:
    
    > There is no shortcut to learning a new framework. I suggest buying a
    > couple of books and taking your time reading the documentation and
    > trying out the examples that are available. Search engines is also a
    > good way to find relevant information. Anything you need to get
    > started, both for Struts 1 and Struts 2, should be available at
    > http://struts.apache.org/
    >
    > Nils-H
    >
    > On Tue, Apr 1, 2008 at 11:59 AM, pavanbh <[EMAIL PROTECTED]> wrote:
    > >
    > >  Hi All,
    > >
    > >  I am new to struts and wana to learn it.Any help or suggestion in this
    > >  regard is much appriciated.
    > >  please help  me
    > >
    > >
    > >
    > >
    > >  Thanks,
    > >  Pavan
    > >
    > >
    > >
    > >  --
    > >  View this message in context:
    > http://www.nabble.com/New-to-Struts-tp14313460p16417500.html
    > >
    > > Sent from the Struts - User mailing list archive at Nabble.com.
    > >
    > >
    > >  -
    > >
    > >
    > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > >  For additional commands, e-mail: [EMAIL PROTECTED]
    > >
    > >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Eroor Message display

    2008-03-30 Thread aum strut
    Hi all,
    
    i  am facing a problem while validating the login form..
    i have to validate it in two ways:
    
    1) Have to check if the requiredinput fields are filled and are in line with
    the laid procedure.
    
    for this i am using the server side validation.i have developed a xml for
    validating the fields and it is running fine and validationg the entries.
    for displaying i am using  tag
    
    2) Second case is where i have to check if the useris valid with respect to
    the database, and in my action class i am using a
    
    addFieldError("UserID", "Either User name or Password is Wrong"); and
    
     to display he error but these two are not working
    together,my server side validation is working fine but the otheris not
    working
    
    only one is working ata time.any help in this regard is much appricaisted.
    
    
    
    -aum
    
    

    Re: Calling Action on form load

    2008-03-28 Thread aum strut
    Jane your solutions is working fine...
    was doing a small mistake from my end..
    
    thanks for helping me out..
    
    -aum
    
    
    On 3/28/08, aum strut <[EMAIL PROTECTED]> wrote:
    >
    > Hi Jane,
    >
    > what i m doing in my action class i am putting the list in the session
    > like this
    >
    > Map> session = ActionContext.*getContext*
    > ().getSession();
    >
    > session.put(
    > "value",itemCode);
    > and in my jsp page i m trying to retrieving the values like this:
    >
    > <
    > s:select label="Select Code" cssClass="large" list="%{#session.value}"
    >
    > name="code"
    >
    > headerKey="1"
    >
    > headerValue="-- Select Item Codet --"
    >
    > list="ItemCode"
    >
    > />
    > but when ever i m hitting the submitt button it is giving me the exception
    >
    > tag 'select', field 'list', name 'code': The requested list key 'ItemCode'
    > could not be resolved as a collection/array/map/enumeration/iterator type.
    > Example: people or people.{name} - [unknown location]
    > any suggestion in this regard??
    > -aum
    >
    >
    >  On 3/27/08, Jiang, Jane (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote:
    > >
    > > Aum,
    > >
    > > After you retrieve the list in your action, save it in session using
    > >
    > > session.put("mySelectionList", list);
    > >
    > > Then in your jsp, use the list in session for s:selection.
    > >
    > >>  list="%{#session.mySelectionList}" listKey="value"
    > >  listValue="label" />
    > >
    > > Hope this helps,
    > >
    > > Jane
    > >
    > > -Original Message-
    > > From: aum strut [mailto:[EMAIL PROTECTED]
    > > Sent: Thursday, March 27, 2008 1:08 PM
    > > To: Struts Users Mailing List
    > > Subject: Re: Calling Action on form load
    > >
    > > Jane,
    > >
    > > can you just give me a brief aidea about (or even if u can a demo code )
    > > how
    > > u put ur list in to the action.
    > >
    > > that will be of gr8 help
    > >
    > > --aum
    > >
    > >
    > > On 3/27/08, Randy Burgess <[EMAIL PROTECTED]> wrote:
    > > >
    > > > Use the  tag.
    > > >
    > > > http://struts.apache.org/2.x/docs/action.html
    > > >
    > > > Regards,
    > > > Randy Burgess
    > > > Sr. Web Applications Developer
    > > > Nuvox Communications
    > > >
    > > >
    > > >
    > > > > From: aum strut <[EMAIL PROTECTED]>
    > > > > Reply-To: Struts Users Mailing List 
    > > > > Date: Thu, 27 Mar 2008 22:04:04 +0530
    > > > > To: Struts Users Mailing List 
    > > > > Subject: Calling Action on form load
    > > > >
    > > > > Hi all,
    > > > >
    > > > > is it possible to call an action in struts2  everytime when the page
    > > get
    > > > > loaded if yes how it is possible.
    > > > > my problem is i am using  tag and using a list to pupulate
    > > > this
    > > > > drop down this list is coming from the action which i m calling
    > > before
    > > > the
    > > > > page is being displayed.
    > > > >
    > > > > the folw is like this:
    > > > >
    > > > > if usercall for this JSP page instaed to direct user directly  to
    > > this
    > > > page
    > > > > i m calling an action which is preaparing a list for the 
    > > tag
    > > > > and then it is forwarding the user to this page.
    > > > >
    > > > > Till now eveything is working fine,but when on this page user is
    > > > entering
    > > > > some values in the fields and hitting the submitting
    > > button,exception is
    > > > > being thrown which is saying that:
    > > > >
    > > > >
    > > > > select', field 'list', name 'code': The requested list key
    > > 'ItemCode'
    > > > could
    > > > > not be resolved as a collection/array/map/enumeration/iterator type.
    > > > > Example: people or people.{name} - [unknown location]
    > > > >
    > > > > because i thik it is unable to call the action again which is
    > > returning
    > > > the
    > > > > list...is theer any way to call that action each time when user is
    > > > > submitting the value..
    > > > >
    > > > >
    > > > >
    > > > > any pointer in this regard will be much appriciated.
    > > > >
    > > > > -aum
    > > >
    > > >
    > > >
    > > > This email and any attachments ("Message") may contain legally
    > > privileged
    > > > and/or confidential information.  If you are not the addressee, or if
    > > this
    > > > Message has been addressed to you in error, you are not authorized to
    > > read,
    > > > copy, or distribute it, and we ask that you please delete it
    > > (including all
    > > > copies) and notify the sender by return email.  Delivery of this
    > > Message to
    > > > any person other than the intended recipient(s) shall not be deemed a
    > > waiver
    > > > of confidentiality and/or a privilege.
    > > >
    > > > -
    > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > > For additional commands, e-mail: [EMAIL PROTECTED]
    > > >
    > > >
    > >
    > > -
    > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > For additional commands, e-mail: [EMAIL PROTECTED]
    > >
    > >
    >
    
    

    Re: Calling Action on form load

    2008-03-28 Thread aum strut
    Hi Jane,
    
    what i m doing in my action class i am putting the list in the session like
    this
    
    Map> session = ActionContext.*getContext*
    ().getSession();
    
    session.put("value",itemCode);
    and in my jsp page i m trying to retrieving the values like this:
    
    
    but when ever i m hitting the submitt button it is giving me the exception
    
    tag 'select', field 'list', name 'code': The requested list key 'ItemCode'
    could not be resolved as a collection/array/map/enumeration/iterator type.
    Example: people or people.{name} - [unknown location]
    any suggestion in this regard??
    
    -aum
    
    
    On 3/27/08, Jiang, Jane (NIH/NCI) [C] <[EMAIL PROTECTED]> wrote:
    >
    > Aum,
    >
    > After you retrieve the list in your action, save it in session using
    >
    > session.put("mySelectionList", list);
    >
    > Then in your jsp, use the list in session for s:selection.
    >
    > list="%{#session.mySelectionList}" listKey="value"
    >  listValue="label" />
    >
    > Hope this helps,
    >
    > Jane
    >
    > -Original Message-
    > From: aum strut [mailto:[EMAIL PROTECTED]
    > Sent: Thursday, March 27, 2008 1:08 PM
    > To: Struts Users Mailing List
    > Subject: Re: Calling Action on form load
    >
    > Jane,
    >
    > can you just give me a brief aidea about (or even if u can a demo code )
    > how
    > u put ur list in to the action.
    >
    > that will be of gr8 help
    >
    > --aum
    >
    >
    > On 3/27/08, Randy Burgess <[EMAIL PROTECTED]> wrote:
    > >
    > > Use the  tag.
    > >
    > > http://struts.apache.org/2.x/docs/action.html
    > >
    > > Regards,
    > > Randy Burgess
    > > Sr. Web Applications Developer
    > > Nuvox Communications
    > >
    > >
    > >
    > > > From: aum strut <[EMAIL PROTECTED]>
    > > > Reply-To: Struts Users Mailing List 
    > > > Date: Thu, 27 Mar 2008 22:04:04 +0530
    > > > To: Struts Users Mailing List 
    > > > Subject: Calling Action on form load
    > > >
    > > > Hi all,
    > > >
    > > > is it possible to call an action in struts2  everytime when the page
    > get
    > > > loaded if yes how it is possible.
    > > > my problem is i am using  tag and using a list to pupulate
    > > this
    > > > drop down this list is coming from the action which i m calling
    > before
    > > the
    > > > page is being displayed.
    > > >
    > > > the folw is like this:
    > > >
    > > > if usercall for this JSP page instaed to direct user directly  to
    > this
    > > page
    > > > i m calling an action which is preaparing a list for the 
    > tag
    > > > and then it is forwarding the user to this page.
    > > >
    > > > Till now eveything is working fine,but when on this page user is
    > > entering
    > > > some values in the fields and hitting the submitting
    > button,exception is
    > > > being thrown which is saying that:
    > > >
    > > >
    > > > select', field 'list', name 'code': The requested list key
    > 'ItemCode'
    > > could
    > > > not be resolved as a collection/array/map/enumeration/iterator type.
    > > > Example: people or people.{name} - [unknown location]
    > > >
    > > > because i thik it is unable to call the action again which is
    > returning
    > > the
    > > > list...is theer any way to call that action each time when user is
    > > > submitting the value..
    > > >
    > > >
    > > >
    > > > any pointer in this regard will be much appriciated.
    > > >
    > > > -aum
    > >
    > >
    > >
    > > This email and any attachments ("Message") may contain legally
    > privileged
    > > and/or confidential information.  If you are not the addressee, or if
    > this
    > > Message has been addressed to you in error, you are not authorized to
    > read,
    > > copy, or distribute it, and we ask that you please delete it
    > (including all
    > > copies) and notify the sender by return email.  Delivery of this
    > Message to
    > > any person other than the intended recipient(s) shall not be deemed a
    > waiver
    > > of confidentiality and/or a privilege.
    > >
    > > -
    > > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > > For additional commands, e-mail: [EMAIL PROTECTED]
    > >
    > >
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Re: Calling Action on form load

    2008-03-27 Thread aum strut
    Jane,
    
    can you just give me a brief aidea about (or even if u can a demo code ) how
    u put ur list in to the action.
    
    that will be of gr8 help
    
    --aum
    
    
    On 3/27/08, Randy Burgess <[EMAIL PROTECTED]> wrote:
    >
    > Use the  tag.
    >
    > http://struts.apache.org/2.x/docs/action.html
    >
    > Regards,
    > Randy Burgess
    > Sr. Web Applications Developer
    > Nuvox Communications
    >
    >
    >
    > > From: aum strut <[EMAIL PROTECTED]>
    > > Reply-To: Struts Users Mailing List 
    > > Date: Thu, 27 Mar 2008 22:04:04 +0530
    > > To: Struts Users Mailing List 
    > > Subject: Calling Action on form load
    > >
    > > Hi all,
    > >
    > > is it possible to call an action in struts2  everytime when the page get
    > > loaded if yes how it is possible.
    > > my problem is i am using  tag and using a list to pupulate
    > this
    > > drop down this list is coming from the action which i m calling before
    > the
    > > page is being displayed.
    > >
    > > the folw is like this:
    > >
    > > if usercall for this JSP page instaed to direct user directly  to this
    > page
    > > i m calling an action which is preaparing a list for the  tag
    > > and then it is forwarding the user to this page.
    > >
    > > Till now eveything is working fine,but when on this page user is
    > entering
    > > some values in the fields and hitting the submitting button,exception is
    > > being thrown which is saying that:
    > >
    > >
    > > select', field 'list', name 'code': The requested list key 'ItemCode'
    > could
    > > not be resolved as a collection/array/map/enumeration/iterator type.
    > > Example: people or people.{name} - [unknown location]
    > >
    > > because i thik it is unable to call the action again which is returning
    > the
    > > list...is theer any way to call that action each time when user is
    > > submitting the value..
    > >
    > >
    > >
    > > any pointer in this regard will be much appriciated.
    > >
    > > -aum
    >
    >
    >
    > This email and any attachments ("Message") may contain legally privileged
    > and/or confidential information.  If you are not the addressee, or if this
    > Message has been addressed to you in error, you are not authorized to read,
    > copy, or distribute it, and we ask that you please delete it (including all
    > copies) and notify the sender by return email.  Delivery of this Message to
    > any person other than the intended recipient(s) shall not be deemed a waiver
    > of confidentiality and/or a privilege.
    >
    > -
    > To unsubscribe, e-mail: [EMAIL PROTECTED]
    > For additional commands, e-mail: [EMAIL PROTECTED]
    >
    >
    
    

    Calling Action on form load

    2008-03-27 Thread aum strut
    Hi all,
    
    is it possible to call an action in struts2  everytime when the page get
    loaded if yes how it is possible.
    my problem is i am using  tag and using a list to pupulate this
    drop down this list is coming from the action which i m calling before the
    page is being displayed.
    
    the folw is like this:
    
    if usercall for this JSP page instaed to direct user directly  to this page
    i m calling an action which is preaparing a list for the  tag
    and then it is forwarding the user to this page.
    
    Till now eveything is working fine,but when on this page user is entering
    some values in the fields and hitting the submitting button,exception is
    being thrown which is saying that:
    
    
    select', field 'list', name 'code': The requested list key 'ItemCode' could
    not be resolved as a collection/array/map/enumeration/iterator type.
    Example: people or people.{name} - [unknown location]
    
    because i thik it is unable to call the action again which is returning the
    list...is theer any way to call that action each time when user is
    submitting the value..
    
    
    
    any pointer in this regard will be much appriciated.
    
    -aum
    
    

    Re: Exception in running application

    2008-03-21 Thread aum strut
    hi all,
    
    As far as concern with the .jar files
    both the jars are there in the lib folderas moreover there is only one
    application deployed in the container with which i m working.
    
    can u just clear me about the point regarding opensymphony URI in web.xml.
    
    --aum
    
    
    On 3/21/08, manjunathmn <[EMAIL PROTECTED]> wrote:
    >
    >
    > Hi,
    >
    >Please make sure that the you are placing the xwor2 jar in lib folder
    > and not in Referenced Lib package(if u r using MyEclipse IDE) and specifiy
    > the opensymphony URI in web.xml.
    >
    > Thanks.
    >
    >
    >
    > aum strut wrote:
    > >
    > > Hi All,
    > >
    > > i am running an application, everythingis working fineapplication is
    > > running fine...
    > > but in the console it is giving an exception...although the
    > > application
    > > is running fine..
    > > below is the console output:
    > >
    > >
    > > SEVERE: Exception starting filter struts2
    > >
    > > Unable to load bean:
    > > type:com.opensymphony.xwork2.util.ObjectTypeDeterminerclass:
    > > com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
    > >
    > jar:file:/E:/MyEclipse/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Jewellery/WEB-INF/lib/struts2-
    > > core-2.0.11.jar!/struts-default.xml:36:148
    > >
    > > at
    > >
    > com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register
    > (*
    > > XmlConfigurationProvider.java:208*)
    > >
    > > at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(*
    > > StrutsXmlConfigurationProvider.java:101*)
    > >
    > > at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(*
    > > DefaultConfiguration.java:131*)
    > >
    > > at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration
    > (*
    > > ConfigurationManager.java:52*)
    > >
    > > at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(*
    > > Dispatcher.java:395*)
    > >
    > > at org.apache.struts2.dispatcher.Dispatcher.init(*Dispatcher.java:452*)
    > >
    > > at org.apache.struts2.dispatcher.FilterDispatcher.init(*
    > > FilterDispatcher.java:201*)
    > >
    > > at org.apache.catalina.core.ApplicationFilterConfig.getFilter(*
    > > ApplicationFilterConfig.java:275*)
    > >
    > > at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(*
    > > ApplicationFilterConfig.java:397*)
    > >
    > > at org.apache.catalina.core.ApplicationFilterConfig.(*
    > > ApplicationFilterConfig.java:108*)
    > >
    > > at org.apache.catalina.core.StandardContext.filterStart(*
    > > StandardContext.java:3693*)
    > >
    > > at
    > > org.apache.catalina.core.StandardContext.start(*StandardContext.java
    > :4340
    > > *)
    > >
    > > at org.apache.catalina.core.ContainerBase.addChildInternal(*
    > > ContainerBase.java:791*)
    > >
    > > at
    > > org.apache.catalina.core.ContainerBase.addChild(*ContainerBase.java
    > :771*)
    > >
    > > at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java
    > :525*)
    > >
    > > at org.apache.catalina.startup.HostConfig.deployDirectory(*
    > HostConfig.java
    > > :920*)
    > >
    > > at
    > > org.apache.catalina.startup.HostConfig.deployDirectories(*
    > HostConfig.java
    > > :883*)
    > >
    > > at
    > > org.apache.catalina.startup.HostConfig.deployApps(*HostConfig.java:492*)
    > >
    > > at org.apache.catalina.startup.HostConfig.start(*HostConfig.java:1138*)
    > >
    > > at org.apache.catalina.startup.HostConfig.lifecycleEvent(*
    > HostConfig.java
    > > :311*)
    > >
    > > at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
    > > LifecycleSupport.java:117*)
    > >
    > > at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
    > :1053*)
    > >
    > > at org.apache.catalina.core.StandardHost.start(*StandardHost.java:719*)
    > >
    > > at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
    > :1045*)
    > >
    > > at
    > > org.apache.catalina.core.StandardEngine.start(*StandardEngine.java:443*)
    > >
    > > at
    > > org.apache.catalina.core.StandardService.start(*StandardService.java
    > :516*
    > > )
    > >
    > > at
    > > org.apache.catalina.core.StandardServer.start(*StandardServer.java:710*)
    > >
    > > at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
    > >
    > > at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
    > >
    > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    > >
    > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    > >
    > > at java.lang.reflect.Method.invoke(Unknown Source)
    > >
    > > at org.apac

    Exception in running application

    2008-03-21 Thread aum strut
    Hi All,
    
    i am running an application, everythingis working fineapplication is
    running fine...
    but in the console it is giving an exception...although the application
    is running fine..
    below is the console output:
    
    
    SEVERE: Exception starting filter struts2
    
    Unable to load bean:
    type:com.opensymphony.xwork2.util.ObjectTypeDeterminerclass:
    com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer - bean -
    jar:file:/E:/MyEclipse/.metadata/.plugins/com.genuitec.eclipse.easie.tomcat.myeclipse/tomcat/webapps/Jewellery/WEB-INF/lib/struts2-
    core-2.0.11.jar!/struts-default.xml:36:148
    
    at
    com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(*
    XmlConfigurationProvider.java:208*)
    
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(*
    StrutsXmlConfigurationProvider.java:101*)
    
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(*
    DefaultConfiguration.java:131*)
    
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(*
    ConfigurationManager.java:52*)
    
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(*
    Dispatcher.java:395*)
    
    at org.apache.struts2.dispatcher.Dispatcher.init(*Dispatcher.java:452*)
    
    at org.apache.struts2.dispatcher.FilterDispatcher.init(*
    FilterDispatcher.java:201*)
    
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(*
    ApplicationFilterConfig.java:275*)
    
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(*
    ApplicationFilterConfig.java:397*)
    
    at org.apache.catalina.core.ApplicationFilterConfig.(*
    ApplicationFilterConfig.java:108*)
    
    at org.apache.catalina.core.StandardContext.filterStart(*
    StandardContext.java:3693*)
    
    at org.apache.catalina.core.StandardContext.start(*StandardContext.java:4340
    *)
    
    at org.apache.catalina.core.ContainerBase.addChildInternal(*
    ContainerBase.java:791*)
    
    at org.apache.catalina.core.ContainerBase.addChild(*ContainerBase.java:771*)
    
    at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java:525*)
    
    at org.apache.catalina.startup.HostConfig.deployDirectory(*HostConfig.java
    :920*)
    
    at org.apache.catalina.startup.HostConfig.deployDirectories(*HostConfig.java
    :883*)
    
    at org.apache.catalina.startup.HostConfig.deployApps(*HostConfig.java:492*)
    
    at org.apache.catalina.startup.HostConfig.start(*HostConfig.java:1138*)
    
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(*HostConfig.java
    :311*)
    
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
    LifecycleSupport.java:117*)
    
    at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java:1053*)
    
    at org.apache.catalina.core.StandardHost.start(*StandardHost.java:719*)
    
    at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java:1045*)
    
    at org.apache.catalina.core.StandardEngine.start(*StandardEngine.java:443*)
    
    at org.apache.catalina.core.StandardService.start(*StandardService.java:516*
    )
    
    at org.apache.catalina.core.StandardServer.start(*StandardServer.java:710*)
    
    at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
    
    at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
    
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    
    at java.lang.reflect.Method.invoke(Unknown Source)
    
    at org.apache.catalina.startup.Bootstrap.start(*Bootstrap.java:288*)
    
    at org.apache.catalina.startup.Bootstrap.main(*Bootstrap.java:413*)
    
    Caused by: java.lang.NoClassDefFoundError: *ognl/OgnlException
    *
    
    at java.lang.Class.getDeclaredConstructors0(*Native Method*)
    
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    
    at java.lang.Class.getDeclaredConstructors(Unknown Source)
    
    at
    com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(*
    XmlConfigurationProvider.java:198*)
    
    ... 33 more
    
    Mar 21, 2008 2:58:10 PM org.apache.catalina.core.StandardContext start
    
    SEVERE: Error filterStart
    
    
    
    any pointer in this regard will be much appricated...
    
    
    
    --aum
    
    

      1   2   >