Re: autocompleter struts2 onchange parameter not working

2011-11-16 Thread vivek jaiswal


 
thanks a lot it's working properly


with regards,

VIVEK KUMAR JAISWAL





From: Martin Gainty 
To: Struts Users Mailing List 
Sent: Thursday, 17 November 2011 6:26 AM
Subject: RE: autocompleter struts2 onchange parameter not working


autocompleter contains a mechanism that triggers javascript function when value 
of monitored list changes e.g. Mit Freundlichen 
Gruben
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

> Date: Wed, 16 Nov 2011 10:57:09 +0530
> From: vivek_jaiswa...@yahoo.com
> Subject: autocompleter struts2 onchange parameter not working
> To: user@struts.apache.org
> 
> 
> 
>  
> Dear All,
> 
> 
> 
> I want to apply onchange parameter in  onchange="testjavscriptmethod" />
> 
> 
> function testjavscriptmethod()
> {
> alert('Hi');
> }
> 
> 
> but the method is not call why?
> plz help me
> 
> with regards,
> 
> VIVEK KUMAR JAISWAL

[S2] Displaying user entered values after failed type conversion while using getText()?

2011-11-16 Thread Burton Rhodes
I am having an issue with displaying the original value entered on a
form after failed type conversion.  This "bug" is caused by my use of
getText() in the form value fields.  I'm curious how one solves this
issue for making sure the field is formatted correctly upon display,
but also making sure the users see the orignal malformed entry after
failed type conversion.  I have a few examples below.  The last one
displays works the way it should.  The top two only present an empty
field upon failed type conversion.

[code snippets]










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



Re: object set in session in interceptor not available to JSP for first launch.

2011-11-16 Thread Jyothrilinga Rao
Oh, when you said implement PreResultListener  the way I tried it out was

public class MenuInterceptor implements Interceptor, PreResultListener {
public String intercept(ActionInvocation actionInvocation) throws Exception
{
  ActionContext ac = actionInvocation.getInvocationContext();
  String result = actionInvocation.invoke();

  LOG.debug("menu from session at end of intercept is:
"+ac.getSession().get("menu"));
  return result;
}

@Override
public void beforeResult(ActionInvocation actionInvocation, String arg1) {
  ActionContext ac = actionInvocation.getInvocationContext();
   if( null==ac.getSession().get("menu")){
  menu = parser.getMenu();
  ac.getSession().put("menu", menu);
   }
 }
}

I was hoping beforeResult would be invoked by the framework which did not.
Glad that it is working now.
Thank you.

Regards,
JK

On Wed, Nov 16, 2011 at 2:43 PM, Dave Newton  wrote:

> That's what implementing a PreResultListener means; it's an interface, you
> implement one.
>
> I still think the whole PreResultListener thing is a bit opaque, I wrote up
> something about that a couple of years ago--I need to dig that up.
>
> Dave
>
> On Wed, Nov 16, 2011 at 5:38 PM, Jyothrilinga Rao  >wrote:
>
> > if my action determines that what is present in session is no more valid,
> > then it would clear this object from session. My interceptor has to check
> > and set the correct object in session after action has returned.
> >
> > The setting in session has to happen after action invocation and before
> JSP
> > rendering.
> >
> > Interceptor implementing PreResultListener did not work for me.
> >
> > I could get it working with the following snippet.
> > invocation.addPreResultListener(new PreResultListener() {
> > });
> >
> > Thank you,
> > JK.
> >
> > On Wed, Nov 16, 2011 at 11:45 AM, Dave Newton 
> > wrote:
> >
> > > I think the goal was to do the check after the action executes,
> > though--if
> > > not, then yep, just doing it before the invocation is enough.
> > >
> > > If the check needs to happen between action invocation and the JSP
> > > rendering, then the interceptor should implement a PreResultListener,
> > which
> > > is called after invocation, but before JSP rendering.
> > >
> > > Dave
> > >
> > > On Wed, Nov 16, 2011 at 2:41 PM, Bruno Klava  wrote:
> > >
> > > > How about setting your object in session before the action
> invocation,
> > > > i.e, before actionInvocation.invoke()?
> > > >
> > > > Bruno
> > > >
> > > > On Wed, Nov 16, 2011 at 4:09 PM, Jyothrilinga Rao <
> jyoth...@gmail.com>
> > > > wrote:
> > > > > Hi,
> > > > >
> > > > > I have the following configuration snippet in my struts.xml:
> > > > >
> > > > >
> > > > >  extends=*"struts-default"*>
> > > > >  
> > > > >> > > >class="com.abc.interceptors.MenuInterceptor">
> > > > >   
> > > > >   
> > > > >
> > > > > true
> > > > > ERROR
> > > > >
> > > > >
> > > > >   
> > > > >  
> > > > >  
> > > > >
> > > > > i.e I have a interceptor which I am calling after the defaultStack
> > > > executes.
> > > > >
> > > > > My MenuInterceptor has the following code fragment in my intercept
> > > method
> > > > > of MenuInterceptor
> > > > >
> > > > > ActionContext ac = actionInvocation.getInvocationContext();
> > > > > String result = actionInvocation.invoke();
> > > > >
> > > > >  if( null==ac.getSession().get("menu")){
> > > > >menu = parser.getMenu();
> > > > >ac.getSession().put("menu", menu);
> > > > >  }
> > > > > LOG.debug("menu from session at end of intercept is:
> > > > > "+ac.getSession().get("menu"));
> > > > > return result;
> > > > >
> > > > > i.e after the action logic executes, I am checking if the sesssion
> > has
> > > > the
> > > > > object. if the object is not present I am populating it and storing
> > in
> > > > the
> > > > > session.
> > > > > my LOG outputs valid object in the first launch also.
> > > > >
> > > > > When I execute for the first time, the menu object is not available
> > in
> > > > the
> > > > > JSP, however if I refresh the page, the menu object is available in
> > the
> > > > JSP.
> > > > > I could not have my custom interceptor to execute after the default
> > > > > interceptors stack as the result already gets comitted and I cannot
> > put
> > > > > object in my session.
> > > > > I suspect there is something done by some interceptor in the
> default
> > > > stack
> > > > > which I am missing.
> > > > >
> > > > > Could you please let me know how I can set something in session in
> > > > > Interceptor and have it available in my JSP.
> > > > >
> > > > > Thanks,
> > > > > JK
> > > >
> > > > -
> > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > > For additional commands, e-mail: user-h...@struts.apache.org
> > > >
> > > >
> > >
> >
>


RE: autocompleter struts2 onchange parameter not working

2011-11-16 Thread Martin Gainty

autocompleter contains a mechanism that triggers javascript function when value 
of monitored list changes e.g. Mit Freundlichen 
Gruben
Martin 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.

 > Date: Wed, 16 Nov 2011 10:57:09 +0530
> From: vivek_jaiswa...@yahoo.com
> Subject: autocompleter struts2 onchange parameter not working
> To: user@struts.apache.org
> 
> 
> 
>  
> Dear All,
> 
> 
> 
> I want to apply onchange parameter in  onchange="testjavscriptmethod" />
> 
> 
> function testjavscriptmethod()
> {
> alert('Hi');
> }
> 
> 
> but the method is not call why?
> plz help me
> 
> with regards,
> 
> VIVEK KUMAR JAISWAL
  

Re: object set in session in interceptor not available to JSP for first launch.

2011-11-16 Thread Dave Newton
That's what implementing a PreResultListener means; it's an interface, you
implement one.

I still think the whole PreResultListener thing is a bit opaque, I wrote up
something about that a couple of years ago--I need to dig that up.

Dave

On Wed, Nov 16, 2011 at 5:38 PM, Jyothrilinga Rao wrote:

> if my action determines that what is present in session is no more valid,
> then it would clear this object from session. My interceptor has to check
> and set the correct object in session after action has returned.
>
> The setting in session has to happen after action invocation and before JSP
> rendering.
>
> Interceptor implementing PreResultListener did not work for me.
>
> I could get it working with the following snippet.
> invocation.addPreResultListener(new PreResultListener() {
> });
>
> Thank you,
> JK.
>
> On Wed, Nov 16, 2011 at 11:45 AM, Dave Newton 
> wrote:
>
> > I think the goal was to do the check after the action executes,
> though--if
> > not, then yep, just doing it before the invocation is enough.
> >
> > If the check needs to happen between action invocation and the JSP
> > rendering, then the interceptor should implement a PreResultListener,
> which
> > is called after invocation, but before JSP rendering.
> >
> > Dave
> >
> > On Wed, Nov 16, 2011 at 2:41 PM, Bruno Klava  wrote:
> >
> > > How about setting your object in session before the action invocation,
> > > i.e, before actionInvocation.invoke()?
> > >
> > > Bruno
> > >
> > > On Wed, Nov 16, 2011 at 4:09 PM, Jyothrilinga Rao 
> > > wrote:
> > > > Hi,
> > > >
> > > > I have the following configuration snippet in my struts.xml:
> > > >
> > > >
> > > > 
> > > >  
> > > >> > >class="com.abc.interceptors.MenuInterceptor">
> > > >   
> > > >   
> > > >
> > > > true
> > > > ERROR
> > > >
> > > >
> > > >   
> > > >  
> > > >  
> > > >
> > > > i.e I have a interceptor which I am calling after the defaultStack
> > > executes.
> > > >
> > > > My MenuInterceptor has the following code fragment in my intercept
> > method
> > > > of MenuInterceptor
> > > >
> > > > ActionContext ac = actionInvocation.getInvocationContext();
> > > > String result = actionInvocation.invoke();
> > > >
> > > >  if( null==ac.getSession().get("menu")){
> > > >menu = parser.getMenu();
> > > >ac.getSession().put("menu", menu);
> > > >  }
> > > > LOG.debug("menu from session at end of intercept is:
> > > > "+ac.getSession().get("menu"));
> > > > return result;
> > > >
> > > > i.e after the action logic executes, I am checking if the sesssion
> has
> > > the
> > > > object. if the object is not present I am populating it and storing
> in
> > > the
> > > > session.
> > > > my LOG outputs valid object in the first launch also.
> > > >
> > > > When I execute for the first time, the menu object is not available
> in
> > > the
> > > > JSP, however if I refresh the page, the menu object is available in
> the
> > > JSP.
> > > > I could not have my custom interceptor to execute after the default
> > > > interceptors stack as the result already gets comitted and I cannot
> put
> > > > object in my session.
> > > > I suspect there is something done by some interceptor in the default
> > > stack
> > > > which I am missing.
> > > >
> > > > Could you please let me know how I can set something in session in
> > > > Interceptor and have it available in my JSP.
> > > >
> > > > Thanks,
> > > > JK
> > >
> > > -
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > >
> >
>


Re: object set in session in interceptor not available to JSP for first launch.

2011-11-16 Thread Jyothrilinga Rao
if my action determines that what is present in session is no more valid,
then it would clear this object from session. My interceptor has to check
and set the correct object in session after action has returned.

The setting in session has to happen after action invocation and before JSP
rendering.

Interceptor implementing PreResultListener did not work for me.

I could get it working with the following snippet.
invocation.addPreResultListener(new PreResultListener() {
});

Thank you,
JK.

On Wed, Nov 16, 2011 at 11:45 AM, Dave Newton  wrote:

> I think the goal was to do the check after the action executes, though--if
> not, then yep, just doing it before the invocation is enough.
>
> If the check needs to happen between action invocation and the JSP
> rendering, then the interceptor should implement a PreResultListener, which
> is called after invocation, but before JSP rendering.
>
> Dave
>
> On Wed, Nov 16, 2011 at 2:41 PM, Bruno Klava  wrote:
>
> > How about setting your object in session before the action invocation,
> > i.e, before actionInvocation.invoke()?
> >
> > Bruno
> >
> > On Wed, Nov 16, 2011 at 4:09 PM, Jyothrilinga Rao 
> > wrote:
> > > Hi,
> > >
> > > I have the following configuration snippet in my struts.xml:
> > >
> > >
> > > 
> > >  
> > >> >class="com.abc.interceptors.MenuInterceptor">
> > >   
> > >   
> > >
> > > true
> > > ERROR
> > >
> > >
> > >   
> > >  
> > >  
> > >
> > > i.e I have a interceptor which I am calling after the defaultStack
> > executes.
> > >
> > > My MenuInterceptor has the following code fragment in my intercept
> method
> > > of MenuInterceptor
> > >
> > > ActionContext ac = actionInvocation.getInvocationContext();
> > > String result = actionInvocation.invoke();
> > >
> > >  if( null==ac.getSession().get("menu")){
> > >menu = parser.getMenu();
> > >ac.getSession().put("menu", menu);
> > >  }
> > > LOG.debug("menu from session at end of intercept is:
> > > "+ac.getSession().get("menu"));
> > > return result;
> > >
> > > i.e after the action logic executes, I am checking if the sesssion has
> > the
> > > object. if the object is not present I am populating it and storing in
> > the
> > > session.
> > > my LOG outputs valid object in the first launch also.
> > >
> > > When I execute for the first time, the menu object is not available in
> > the
> > > JSP, however if I refresh the page, the menu object is available in the
> > JSP.
> > > I could not have my custom interceptor to execute after the default
> > > interceptors stack as the result already gets comitted and I cannot put
> > > object in my session.
> > > I suspect there is something done by some interceptor in the default
> > stack
> > > which I am missing.
> > >
> > > Could you please let me know how I can set something in session in
> > > Interceptor and have it available in my JSP.
> > >
> > > Thanks,
> > > JK
> >
> > -
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>


Re: object set in session in interceptor not available to JSP for first launch.

2011-11-16 Thread Dave Newton
I think the goal was to do the check after the action executes, though--if
not, then yep, just doing it before the invocation is enough.

If the check needs to happen between action invocation and the JSP
rendering, then the interceptor should implement a PreResultListener, which
is called after invocation, but before JSP rendering.

Dave

On Wed, Nov 16, 2011 at 2:41 PM, Bruno Klava  wrote:

> How about setting your object in session before the action invocation,
> i.e, before actionInvocation.invoke()?
>
> Bruno
>
> On Wed, Nov 16, 2011 at 4:09 PM, Jyothrilinga Rao 
> wrote:
> > Hi,
> >
> > I have the following configuration snippet in my struts.xml:
> >
> >
> > 
> >  
> >>class="com.abc.interceptors.MenuInterceptor">
> >   
> >   
> >
> > true
> > ERROR
> >
> >
> >   
> >  
> >  
> >
> > i.e I have a interceptor which I am calling after the defaultStack
> executes.
> >
> > My MenuInterceptor has the following code fragment in my intercept method
> > of MenuInterceptor
> >
> > ActionContext ac = actionInvocation.getInvocationContext();
> > String result = actionInvocation.invoke();
> >
> >  if( null==ac.getSession().get("menu")){
> >menu = parser.getMenu();
> >ac.getSession().put("menu", menu);
> >  }
> > LOG.debug("menu from session at end of intercept is:
> > "+ac.getSession().get("menu"));
> > return result;
> >
> > i.e after the action logic executes, I am checking if the sesssion has
> the
> > object. if the object is not present I am populating it and storing in
> the
> > session.
> > my LOG outputs valid object in the first launch also.
> >
> > When I execute for the first time, the menu object is not available in
> the
> > JSP, however if I refresh the page, the menu object is available in the
> JSP.
> > I could not have my custom interceptor to execute after the default
> > interceptors stack as the result already gets comitted and I cannot put
> > object in my session.
> > I suspect there is something done by some interceptor in the default
> stack
> > which I am missing.
> >
> > Could you please let me know how I can set something in session in
> > Interceptor and have it available in my JSP.
> >
> > Thanks,
> > JK
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: object set in session in interceptor not available to JSP for first launch.

2011-11-16 Thread Bruno Klava
How about setting your object in session before the action invocation,
i.e, before actionInvocation.invoke()?

Bruno

On Wed, Nov 16, 2011 at 4:09 PM, Jyothrilinga Rao  wrote:
> Hi,
>
> I have the following configuration snippet in my struts.xml:
>
>
> 
>  
>       class="com.abc.interceptors.MenuInterceptor">
>   
>   
>    
>     true
>     ERROR
>    
>    
>   
>  
>  
>
> i.e I have a interceptor which I am calling after the defaultStack executes.
>
> My MenuInterceptor has the following code fragment in my intercept method
> of MenuInterceptor
>
> ActionContext ac = actionInvocation.getInvocationContext();
> String result = actionInvocation.invoke();
>
>  if( null==ac.getSession().get("menu")){
>    menu = parser.getMenu();
>    ac.getSession().put("menu", menu);
>  }
> LOG.debug("menu from session at end of intercept is:
> "+ac.getSession().get("menu"));
> return result;
>
> i.e after the action logic executes, I am checking if the sesssion has the
> object. if the object is not present I am populating it and storing in the
> session.
> my LOG outputs valid object in the first launch also.
>
> When I execute for the first time, the menu object is not available in the
> JSP, however if I refresh the page, the menu object is available in the JSP.
> I could not have my custom interceptor to execute after the default
> interceptors stack as the result already gets comitted and I cannot put
> object in my session.
> I suspect there is something done by some interceptor in the default stack
> which I am missing.
>
> Could you please let me know how I can set something in session in
> Interceptor and have it available in my JSP.
>
> Thanks,
> JK

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



Re: provide Helloworld application in Struts2.0

2011-11-16 Thread bphill...@ku.edu
You may want to read the tutorials here: 
http://struts.apache.org/2.2.3.1/docs/getting-started.html

There are detailed examples applications that you can download and run in
Tomcat.

--
View this message in context: 
http://struts.1045723.n5.nabble.com/provide-Helloworld-application-in-Struts2-0-tp4988490p4998645.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



RE: provide Helloworld application in Struts2.0

2011-11-16 Thread Ilya Kazakevich
>> javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
 
1) what is your java version?
2) what is your tomcat version?
3) struts version?
4) do you have any jars inside "endorsed" folder of your tomcat? If so --
what versions are they? (see META-INF/MANIFEST.MF)
 
Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com  
"Develop with pleasure!"




object set in session in interceptor not available to JSP for first launch.

2011-11-16 Thread Jyothrilinga Rao
Hi,

I have the following configuration snippet in my struts.xml:



  
   
   
   

 true
 ERROR


   
  
  

i.e I have a interceptor which I am calling after the defaultStack executes.

My MenuInterceptor has the following code fragment in my intercept method
of MenuInterceptor

ActionContext ac = actionInvocation.getInvocationContext();
String result = actionInvocation.invoke();

  if( null==ac.getSession().get("menu")){
menu = parser.getMenu();
ac.getSession().put("menu", menu);
  }
LOG.debug("menu from session at end of intercept is:
"+ac.getSession().get("menu"));
return result;

i.e after the action logic executes, I am checking if the sesssion has the
object. if the object is not present I am populating it and storing in the
session.
my LOG outputs valid object in the first launch also.

When I execute for the first time, the menu object is not available in the
JSP, however if I refresh the page, the menu object is available in the JSP.
I could not have my custom interceptor to execute after the default
interceptors stack as the result already gets comitted and I cannot put
object in my session.
I suspect there is something done by some interceptor in the default stack
which I am missing.

Could you please let me know how I can set something in session in
Interceptor and have it available in my JSP.

Thanks,
JK


Re: provide Helloworld application in Struts2.0

2011-11-16 Thread Dave Newton
What libraries are you deploying in your WEB-INF/lib?

Dave

On Wed, Nov 16, 2011 at 1:06 PM, Praveen Jain <
jain_praveen_mail...@yahoo.com> wrote:

> Dear   *Ilya Kazakevich* ,
>
>
> I have tried to put hello.html in the root of my aplication  and put the
> URL as you suggest
>
>
> http://localhost:8080/HelloWorldStruts2/hello.html
>
>
> But now I am getting error message as under.
>
>
> *The requested resource (/HelloWorldStruts2/hello.html) is not available.*
>
> *
> *
>
> *
> *
>
> *
> *
>
> *Please find my Log  status as you require as an attached file.
> *
>
> *
> *
>
> *Thanks
> *
>
> *Praveen Jain
> *
>
> *
> *
>
> *
> *
>
> *
> *
>
> *
> *
>
>
>
> --- On *Tue, 11/15/11, Ilya Kazakevich *wrote:
>
>
> From: Ilya Kazakevich 
> Subject: RE: provide Helloworld application in Struts2.0
> To: "'Struts Users Mailing List'" 
> Date: Tuesday, November 15, 2011, 11:29 AM
>
> Does your context works?
> Try to put "hello.html" file in the root of your .war file
>
> Then open it: /HelloWorldStruts2/hello.html
>
> Show us your logs please
>
>
>
> Ilya Kazakevich,
> Developer
> JetBrains Inc
> http://www.jetbrains.com
> "Develop with pleasure!"
>
> -Original Message-
> From: Praveen Jain 
> [mailto:jain_praveen_mail...@yahoo.com]
>
> Sent: Tuesday, November 15, 2011 11:14 PM
> To: Struts Users Mailing List
> Subject: RE: provide Helloworld application in Struts2.0
>
> On using it is showing the error as follows
>
> HTTP Status 404 - /HelloWorldStruts2/HelloWorldAction.actiontype Status
> reportmessage /HelloWorldStruts2/HelloWorldAction.actiondescription The
> requested resource (/HelloWorldStruts2/HelloWorldAction.action) is not
> available.
>
>
> Thanks, Praveen Jain
>
>
>
>
> --- On Tue, 11/15/11, Ilya Kazakevich 
> http://mc/compose?to=ilya.kazakev...@jetbrains.com>>
> wrote:
>
> From: Ilya Kazakevich 
> http://mc/compose?to=ilya.kazakev...@jetbrains.com>
> >
> Subject: RE: provide Helloworld application in Struts2.0
> To: "'Struts Users Mailing List'" 
> http://mc/compose?to=user@struts.apache.org>
> >
> Date: Tuesday, November 15, 2011, 10:31 AM
>
> What URL do you use?
>
> Struts uses ".action" extension by default.
>
> Try /HelloWorldStruts2/HelloWorldAction.action if HelloWorldStruts2 is your
> .war file name
>
>
>
>
>
> Ilya Kazakevich,
> Developer
> JetBrains Inc
> http://www.jetbrains.com
> "Develop with pleasure!"
>
> -Original Message-
> From: Praveen Jain 
> [mailto:jain_praveen_mail...@yahoo.com]
>
> Sent: Tuesday, November 15, 2011 9:52 PM
> To: Struts Users Mailing List
> Subject: Re: provide Helloworld application in Struts2.0
>
> Dear Demo, Still it is not running and following error message is
> occurring
>
> HTTP Status 404 - /HelloWorldStruts2/
>
>
> type Status report
> message /HelloWorldStruts2/
> description The requested resource (/HelloWorldStruts2/) is not
> available.
>
>
> Apache Tomcat/5.0.28
>
>
> Thanks Praveen Jain
>
> --- On Mon, 11/14/11, Damian Krawcewicz 
> http://mc/compose?to=dkrawcew...@gmail.com>>
> wrote:
>
> From: Damian Krawcewicz 
> http://mc/compose?to=dkrawcew...@gmail.com>
> >
> Subject: Re: provide Helloworld application in Struts2.0
> To: "Struts Users Mailing List" 
> http://mc/compose?to=user@struts.apache.org>
> >
> Date: Monday, November 14, 2011, 8:58 AM
>
> For starters, this line:
> 
>
> either remove "struts-default" or change it to: extends="struts-default"
>
> Damo
>
> On 14 November 2011 16:53, Praveen Jain
> http://mc/compose?to=jain_praveen_mail...@yahoo.com>
> >wrote:
>
> > Yes I made a Simple hello application in Servlet and it is running fine.
> > But my hello world application in struts  is not running please find the
> > four files which compose the application i have made 4 files index.jsp ,
> > Helloworld.jsp , web.xml , struts.xml
> >
> > Please go through the code and help me out to run the application.
> > code for index.jsp
> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> >pageEncoding="ISO-8859-1"%>
> > <%@taglib prefix="s" uri="/struts-tags" %>
> >  > http://www.w3.org/TR/html4/loose.dtd";>
> > 
> > 
> > 
> > Hello World
> > 
> > 
> > Hello World fron struts 2  
> > 
> >   Please enter ur name
> > 
> > 
> > 
> > 
> >  Code for Helloworld.jsp
> > <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
> >pageEncoding="ISO-8859-1"%>
> > <%@taglib prefix="s" uri="/struts-tags" %>
> >  > http://www.w3.org/TR/html4/loose.dtd";>
> > 
> > 
> > 
> > Hello World JSP
> > 
> >
> > 
> > Hello world,
> >
> > 
> > 
> >
> >
> >
> >  Code for Web.xml
> > 
> > http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> > http://java.sun.com/xml/ns/j2ee
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> >
> >HelloWorldStruts2
> >
> >index.jsp
> >
> >
> >Strut

RE: provide Helloworld application in Struts2.0

2011-11-16 Thread Praveen Jain
Dear  
Ilya Kazakevich , 
I have tried to put hello.html in the root of my aplication  and put the URL as 
you suggest 

http://localhost:8080/HelloWorldStruts2/hello.html 
But now I am getting error message as under.  

The requested resource (/HelloWorldStruts2/hello.html) is not available.



Please find my Log  status as you require as an attached file. 

Thanks 
Praveen Jain






--- On Tue, 11/15/11, Ilya Kazakevich  wrote:

From: Ilya Kazakevich 
Subject: RE: provide Helloworld application in Struts2.0
To: "'Struts Users Mailing List'" 
Date: Tuesday, November 15, 2011, 11:29 AM

Does your context works?
Try to put "hello.html" file in the root of your .war file

Then open it: /HelloWorldStruts2/hello.html

Show us your logs please
 


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"

-Original Message-
From: Praveen Jain [mailto:jain_praveen_mail...@yahoo.com] 
Sent: Tuesday, November 15, 2011 11:14 PM
To: Struts Users Mailing List
Subject: RE: provide Helloworld application in Struts2.0

On using it is showing the error as follows 

HTTP Status 404 - /HelloWorldStruts2/HelloWorldAction.actiontype Status
reportmessage /HelloWorldStruts2/HelloWorldAction.actiondescription The
requested resource (/HelloWorldStruts2/HelloWorldAction.action) is not
available.


Thanks, Praveen Jain




--- On Tue, 11/15/11, Ilya Kazakevich  wrote:

From: Ilya Kazakevich 
Subject: RE: provide Helloworld application in Struts2.0
To: "'Struts Users Mailing List'" 
Date: Tuesday, November 15, 2011, 10:31 AM

 What URL do you use?

Struts uses ".action" extension by default. 

Try /HelloWorldStruts2/HelloWorldAction.action if HelloWorldStruts2 is your
.war file name


 


Ilya Kazakevich,
Developer
JetBrains Inc
http://www.jetbrains.com
"Develop with pleasure!"

-Original Message-
From: Praveen Jain [mailto:jain_praveen_mail...@yahoo.com] 
Sent: Tuesday, November 15, 2011 9:52 PM
To: Struts Users Mailing List
Subject: Re: provide Helloworld application in Struts2.0

Dear Demo, Still it is not running and following error message is occurring 

HTTP Status 404 - /HelloWorldStruts2/


type Status report
message /HelloWorldStruts2/
description The requested resource (/HelloWorldStruts2/) is not 
available.


Apache Tomcat/5.0.28


Thanks Praveen Jain 

--- On Mon, 11/14/11, Damian Krawcewicz  wrote:

From: Damian Krawcewicz 
Subject: Re: provide Helloworld application in Struts2.0
To: "Struts Users Mailing List" 
Date: Monday, November 14, 2011, 8:58 AM

For starters, this line:


either remove "struts-default" or change it to: extends="struts-default"

Damo

On 14 November 2011 16:53, Praveen Jain
wrote:

> Yes I made a Simple hello application in Servlet and it is running fine.
> But my hello world application in struts  is not running please find the
> four files which compose the application i have made 4 files index.jsp ,
> Helloworld.jsp , web.xml , struts.xml
>
> Please go through the code and help me out to run the application.
> code for index.jsp
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>    pageEncoding="ISO-8859-1"%>
> <%@taglib prefix="s" uri="/struts-tags" %>
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> Hello World
> 
> 
> Hello World fron struts 2  
> 
>       Please enter ur name
> 
> 
> 
> 
>  Code for Helloworld.jsp
> <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
>    pageEncoding="ISO-8859-1"%>
> <%@taglib prefix="s" uri="/struts-tags" %>
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> Hello World JSP
> 
>
> 
> Hello world,
>
> 
> 
>
>
>
>  Code for Web.xml
> 
> http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
>
>        HelloWorldStruts2
>        
>                index.jsp
>        
>        
>                Struts2
>
> 
org.apache.struts2.dispatcher.FilterDispatcher
>        
>
>        
>                                        Struts2
>                                        /*
>
>        
>
> 
>
> Code for Struts.xml
>
> 
>    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>   "http://struts.apache.org/dtds/struts-2.0.dtd";>
> 
> 
>   
>             class="Struts2.HelloWorldAction" method="execute">
>            Helloworld.jsp
>             
>   
> 
>
>
>
>
>
>
>
>
>
>
>
> --- On Sun, 11/13/11, Ilya Kazakevich 
> wrote:
>
> From: Ilya Kazakevich 
> Subject: RE: provide Helloworld application in Struts2.0
> To: "'Struts Users Mailing List'" 
> Date: Sunday, November 13, 2011, 10:07 AM
>
> You probably need to familiarize yourself with concepts of servlet and
> context.
>
> Please read servlet specification (at least "Overview" chapter) and tomcat
> context manual http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
>
> Try to write and deploy simple servlet then that does nothing but writes
> "hello" to th

using xwork validator programatically?

2011-11-16 Thread Josep García
Is there any documentation on how to call xwork validation programatically?

The context: I have a dynamic form, which is a freemarker template, which
can have any fields that are then saved as xml in my Struts action.
I would like to have the possibility to call validation with a specific
*-validation.xml, defined at runtime, associated to the freemarker
template, so that I can apply xml defined validators against my action
context value stack. Is that possible?

Cheers,
Josep


Message lookup (from key) in Test

2011-11-16 Thread Miguel Almeida
Dear all,

I am unit-testing an application under the skin using
SpringStrutsTestCase as base (actually, things are a bit more
complicated because I'm doing it from Cucumber, but that's another
story).

How do you get the value of your message from within the test? The
assertion I'm trying is:

assertEquals(expectedMessage,
action.getActionErrors().iterator().next());

But actionErrors() contains the key (error.authorisation) and not the
value ("you cannot do this"). What's the cleanest way to retrieve the
value from the test?


Cheers,

Miguel Almeida