Re: [S2] actions responding only to POST/GET methods

2008-10-29 Thread Paweł Wielgus
Hi Hernán,

 Of course, you should never use GET when submitting a password, but that's a
 privacy concern you (developer) just deal when writing your jsp.

could You elaborate more about the reason why?

Best greetings,
Paweł Wielgus.


Re: @Result annotation - params field

2008-10-29 Thread Paweł Wielgus
Hi,

@Result (type=ServletActionRedirectResult.class, value = show,
params = {namespace, /wsp/boss/target, month, ${month},
year, ${year}})

You need to add getMonth() and getYear() in action that is calling this result.

Best greetings,
Paweł Wielgus.


2008/10/28 col_chappy [EMAIL PROTECTED]:

 Bump... with a little more info.

 Using struts 2.0.11.2. I have the annotation
 @Result(name=success, value=someaction, params={id, ${id}},
 type=ServletActionRedirectResult.class). There is a getter and setter for
 id on both action classes. Neither is called. Results are the same setting
 the second item in the array to a literal value. Has anyone had success with
 the action Result annotation and the params parameter?


 Ian Roughley wrote:

 Does anyone have a use case for the params field in the Result
 annotation?  Currently it's defined in the annotation as:

 String[] params() default {};

 which I'm not sure makes sense as a name and value was passed in the XML
 configuration.

 /Ian

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




 --
 View this message in context: 
 http://www.nabble.com/%40Result-annotation---params-field-tp9108077p20215952.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: SPAM WARNING!: RE: Struts2 : Calling AJAX function on button click(ONLY)

2008-10-29 Thread Steven Yang
Hi
on thing i noticed is that you have a notifyTopics attribute on you submit
tag which i dont think is necessary and used wrong.
i havent used dojo for a long time, so i am not sure if they changed any api
or settings.
but just a reminder you might need to take a look.

you dont have to specify href on your div.
you can change it or assign a href in your onclick function like
dojo.byId(resultDiv).href = /example/result.action;

see if this help


Re: Problem publishing/subcribing events with dojo and struts

2008-10-29 Thread Sergio Sánchez González
Thanks in advance for the feedback.

It's changed but doesn't work. This is the url tag and the link in the
ExpedientList.jsp

s:url id=viewLinesUrl action=showLines namespace=/expedient
s:param name=expedientId value=id /
/s:url

 s:a href=%{viewLinesUrl} theme=ajax
targets=expedientLines notifyTopics=/openLineListView All
Messages/s:a

And this is the div which receives the data in the Expedient.jsp:

s:url action=showLines id=listExpLinesUrl 
namespace=/expedient/

div id=expedientLinesWrapper style=width:
550px;border-style: solid; display:none
s:div id=expedientLines theme=ajax
href=%{listExpLinesUrl} loadingText=Loading...
listenTopics=/viewLines notifyTopics=/closeLineList/
/div

The response is ok, I mean, the data is retreived from de server side.
But the openLineList trigger fails. So I have no way to make visible
the expedientLinesWrapper div.



2008/10/28 Musachy Barroso [EMAIL PROTECTED]:
 Make sure that you updated the url tags(add or change namespace) used to
 build the url for the ajax request, in this case viewLinesUrl.

 musachy

 On Tue, Oct 28, 2008 at 12:28 PM, Sergio Sánchez González 
 [EMAIL PROTECTED] wrote:

 I'm using struts and dojo. My code works fine until I change the
 struts namespace.

 These are my actions:

   package name=expedient extends=struts-default

   action name=showExpedients
   resultpages/expedient/Expedient.jsp/result
   /action

   action name=listExpedients
 class=expedientController method=execute
   resultpages/expedient/ExpedientList.jsp/result
   /action

  action name=showLines class=expedientController
 method=getLines
  resultpages/expedient/ExpedientLinesList.jsp/result
   /action
   /package

   I have the main page Expedient.jsp, a page for listing expedients
 ExpedientsList.jsp and another one for listing the lines of the
 expedients ExpedientLinesList. This works fine, if I publish an event
 in ExpedientList.jsp it can be captured in Expedient.jsp.

   But when I change the struts namespace:

   package name=expedient extends=struts-default
 namespace=/expedient

   action name=showExpedients
   result/pages/expedient/Expedient.jsp/result
   /action

   action name=listExpedients
 class=expedientController method=execute
   result/pages/expedient/ExpedientList.jsp/result
   /action

 action name=showLines class=expedientController
 method=getLines

 result/pages/expedient/ExpedientLinesList.jsp/result
   /action
   /package

 the following notification inside ExpedientList.jsp doesn't call
 the subscription in Expedient.jsp

 notify code in ExpedientList.jsp:
 s:a href=%{viewLinesUrl} theme=ajax
 targets=expedientLines notifyTopics=/openLineListView All
 Messages/s:a

 subscrition code in Expedient.jsp:
   dojo.event.topic.subscribe(/openLineList,
 function(data, type, request){ my code...});

The only difference I see is that when the namespace is used in
 struts I have to write the absolute path in the result tags. But I
 don't fully understand how this affect the events in dojo and how to
 solve it. I don't see the light.

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




 --
 Hey you! Would you help me to carry the stone? Pink Floyd


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



selection of data from s:optiontransferselect/ tag to right side through javascript event handling

2008-10-29 Thread Naaag

Hi All,
 I am a new buddy to java development.
I have been assigned one task that is,
i have fileds in my UI one is   1 --select group---this is dropdown mwnu
2--- optiontransferselect  box
i have list of values in left side after prepare method is called.
no values in right side.
now if i select group name from select group box,all the devices related to
selected group has to be moved to right side from left side of
optiontransferselect  box.
i have tried , i am not getting proper idea to solve that.

please send me solution to that one.
-- 
View this message in context: 
http://www.nabble.com/selection-of-data-from-%3Cs%3Aoptiontransferselect-%3E-tag-to-right-side-through-javascript-event-handling-tp20223705p20223705.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: selection of data from s:optiontransferselect/ tag to right side through javascript event handling

2008-10-29 Thread Sébastien Domergue

hi,

the optiontransfertselect tag is build to display two select box where 
you can move items from one to other. In your example, your left box 
does not contain the data to add in your right box (am i right?). So i 
think that you can't use a tag out of the box.
In my mind, you could use a selectbox with your group names and add a 
javascript on onclick attribute. This javascript will have to add the 
items to another box.
If you want to keep the optiontransfertselect tag, i think you should 
add also a javascript in order to manipulate the groups. You can also 
suscribe to the event that is raised when you clic on the arrow to move 
items.


regards

Sébastien

Naaag a écrit :

Hi All,
 I am a new buddy to java development.
I have been assigned one task that is,
i have fileds in my UI one is   1 --select group---this is dropdown mwnu
2--- optiontransferselect  box
i have list of values in left side after prepare method is called.
no values in right side.
now if i select group name from select group box,all the devices related to
selected group has to be moved to right side from left side of
optiontransferselect  box.
i have tried , i am not getting proper idea to solve that.

please send me solution to that one.
  


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

Re: How to putt objects on the valuestack from INSIDE an action?

2008-10-29 Thread Alexander Baetz

I guess i should add explanation.

i want to save an object permanently on the value stack.
In my case this object holds many informations that configure my pages 
(loginuserid...). It is created inside my loginAction.
I can get it from an action with a get-Method, but this object is 
permanent and doesnt matter for any action beside login/logout. But the 
jsp uses it every time.


I could put this object into the session (which i currently do). But i 
like the value stack, and prefere lines like #Settings.loginUser.id 
instead of #session.settings.loginuser.id


Hope i could explain my problem

Greetings,
Laures

Sébastien Domergue schrieb:

Hi,

reading your mail, it seems to me that you want te redevelop what 
Struts 2 can already do. When you put a getter in your action, you can 
access to your attribute in the jsp like you seems to want to. I can't 
understand why you want to put another Interceptor. If it is to set 
always the same value, you could use hierarchy to have a class that 
deal with all of the common attributes and all of the others should 
inherit from it and implements their owns attributes.


If it is a misunderstand from me, sorry...

regards

Sébastien

Alexander Baetz a écrit :

Hi,

currently i'm trying to use my own Class to store configuration data 
for my application.
To access the options from within the jsp page i want to use the 
struts 2 value stack. I somehow like the stack more than i like the 
session.


My problem is the following:
i can put objects in the session, but how do i put one on the stack 
so i can find it with something like:

value=#mySettings ?

my current SettingsInterceptor looks like this (and doesnt work):

   // get the action on which the interceptor is fired
   Object action = actionInvocation.getAction();
   // get the value stack
   ValueStack stack = 
actionInvocation.getInvocationContext().getValueStack();

   // try to retrieve the bean
   SettingsBean settings = (SettingsBean) 
stack.findValue(mySettings);

   if (settings == null) {
   settings = new SettingsBean();
   stack.set(mySettings, settings);
   }
   try {
   ((SettingsBeanAware) action).setPageSettingsBean(settings);
   } catch (Exception e) {
   }
   return actionInvocation.invoke();

Greetings,
Alexander

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



Custom Exception Interceptor

2008-10-29 Thread Gundersen, Richard
Hi

I'm trying to override the default global exception handler, because I
need to remove a certain session attribute when an exception occurs. I
think I've done most of what's needed, it's just not being executed.

This is my struts.xml (I need my 'exception' to replace the one in the
default stack)

*
interceptors
interceptor name=exception
class=com.lsb.rwpayment.interceptors.LsbExceptionInterceptor/
/interceptors

default-interceptor-ref name=paramsPrepareParamsStack /
***



This is my interceptor:

public class LsbExceptionInterceptor extends ExceptionMappingInterceptor
{

public String intercept(ActionInvocation invocation) throws
Exception {
String result = super.intercept(invocation);
Map attibutes = ActionContext.getContext().getSession();
attibutes.remove(BaseAction.CURRENT_TRANSACTION);
return result;
}
}
***

Any ideas please?


Richard Gundersen
Java Developer
 
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS


As a responsible corporate citizen, London Scottish Bank plc asks you to 
consider the environment before printing this email.

*** Disclaimer *** 

This electronic communication is confidential and for the exclusive use of the 
addressee. It may contain private and confidential information. The 
information, attachments and opinions contained in this E-mail are those of its 
author only and do not necessarily represent those of London Scottish Bank PLC 
or any other members of the London Scottish Group. 

If you are not the intended addressee, you are prohibited from any disclosure, 
distribution or further copying or use of this communication or the information 
in it or taking any action in reliance on it. If you have received this 
communication in error please notify the Information Security Manager at [EMAIL 
PROTECTED] as soon as possible and delete the message from all places in your 
computer where it is stored. 

We utilise virus scanning software but we cannot guarantee the security of 
electronic communications and you are advised to check any attachments for 
viruses. We do not accept liability for any loss resulting from any corruption 
or alteration of data or importation of any virus as a result of receiving this 
electronic communication. 

Replies to this E-mail may be monitored for operational or business reasons. 
London Scottish Bank PLC is authorised and regulated by the Financial Services 
Authority.


London Scottish Bank plc, Registered Office: 201 Deansgate, Manchester M3 3NW 
Registered Number 973008 England.

Subsidiary Companies:-

London Scottish Finance Limited, Registered Office: 201 Deansgate, Manchester 
M3 3NW Registered Number 233259 England.

London Scottish Broking Limited, Registered Office: 201 Deansgate, Manchester 
M3 3NW Registered Number 230110 England.

Robinson Way  Company Limited, Registered Office: 201 Deansgate, Manchester M3 
3NW Registered Number 885896 England.

__
This email has been scanned by the MessageLabs Email Security System.

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



Re: Freemarker (old version that struts2 uses) disappearing pages

2008-10-29 Thread Badgerman

You've probably fixed this now, but for the reference of future googlers, the
pom fix needs a slight change:

dependency
groupIdorg.apache.struts/groupId
artifactIdstruts2-core/artifactId
version2.0.11.2/version
exclusions
  exclusion
groupIdfreemarker/groupId
artifactIdfreemarker/artifactId
  /exclusion
/exclusions 
/dependency
dependency
groupIdorg.freemarker/groupId
artifactIdfreemarker/artifactId
version2.3.11/version
/dependency

And it should work. This is because the groupID for version 2.3.8 is just
'freemarker', whereas for 2.3.11 it is 'org.freemarker', so it wouldn't pick
up the exclusion for 'org.freemarker'.




Dustin S. wrote:
 
 The Maven dependency plugin may be useful to you as well.
 http://maven.apache.org/plugins/maven-dependency-plugin/index.html ,
 specifically the dependency:tree goal.
 
 On Fri, Apr 4, 2008 at 3:27 PM, Laurie Harper [EMAIL PROTECTED] wrote:
 
 Jonny Cavell wrote:

  I use Maven, and if you look at struts 2.0.11.1's dependencies
  (
 
 http://www.mvnrepository.com/artifact/org.apache.struts/struts2-core/2.0.11.1
  )
  you'll see that it's Freemarker version 2.3.8 it depends on. I can't
 

 2.0.11.1 != 2.1.1 :-)

  override this in Maven, even if I attempt to exclude it and force the
  latest
  version of Freemarker:
 
  .
 dependency
 groupIdorg.apache.struts/groupId
 artifactIdstruts2-core/artifactId
 version2.0.11/version
 exclusions
 exclusion

 groupIdorg.freemarker/groupId
 
   artifactIdfreemarker/artifactId
 /exclusion
 /exclusions
 /dependency
 dependency
 groupIdorg.freemarker/groupId
 artifactIdfreemarker/artifactId
 version2.3.12/version
 /dependency
 

 That ought to work, assuming those two stanzas are in their respective
 correct places within the pom. Check 'mvn X' output to make sure your
 excludes are correct with respect to the dependency graph.


 L.


  Cheers
 
  Jonny
 
 
  Jeromy Evans - Blue Sky Minds wrote:
 
   Jonny Cavell wrote:
  
I have a problem that seems to occur periodically.
   
My freemarker templates, served by struts2, stop appearing - I get
 a
blank
page. There are no useful messages in the logs, other than saying
that it
couldn't find the template (which it could find previously).
   
First question - does anybody know what this problem might be?
   
   
   
   No, other than a classpath/deployment problem.
  
I would like to upgrade to the latest version of Freemarker.
However,
Struts2 in its wisdom has locked me down to version 2.3.8, and this
was
released way back in 2006. Are there any plans to resolve this
issue?
   
   
   The 2.1.1 version of Struts uses FreeMarker 2.3.11   You may be able
   to replace the 2.3.8 jar with the 2.3.11 jar without problems.
  
   I doubt the problem is with FreeMarker.  It's more likely to be the
   FreeMarkerManager included with Struts 2 that's responsible for
 searching
   for templates in the classpath.
  
  
  
   -
   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]


 
 

-- 
View this message in context: 
http://www.nabble.com/Freemarker-%28old-version-that-struts2-uses%29-disappearing-pages-tp16467449p20225537.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 : Calling AJAX function on button click(ONLY)

2008-10-29 Thread Roger
On Tuesday 28 October 2008 20:01:41 Kanade, Sayali wrote:
 Thanks for your reply, but not sure it answers my question.

 My question is: How can I prevent a div from refreshing its contents on
 page load? The div should only be refreshed on button click.

 My problem is that, my div loads on page load. It also reloads on submit
 button click, but it should ONLY load on submit click, not on page load.

 The action that executes in my div has to be only executed after the user
 selects a checkbox and clicks submit.

 Please help, I have browsed for this answer for hours!!!


You could tryusing a Javascript function to set your div to display:none on 
page load and re-set it when you want to display it.

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



RE: Custom Exception Interceptor

2008-10-29 Thread Gundersen, Richard
Got it: redefine the whole stack with my custom interceptor

interceptors
interceptor name=exception
class=com.lsb.rwpayment.interceptors.LsbExceptionInterceptor/
interceptor-stack name=paramsPrepareParamsStack
interceptor-ref name=exception/
interceptor-ref name=alias/
interceptor-ref name=params/
interceptor-ref name=servletConfig/
interceptor-ref name=prepare/
interceptor-ref name=i18n/
interceptor-ref name=chain/
interceptor-ref name=modelDriven/
interceptor-ref name=fileUpload/
interceptor-ref name=checkbox/
interceptor-ref name=staticParams/
interceptor-ref name=params/
interceptor-ref name=conversionError/
interceptor-ref name=validation
param
name=excludeMethodsinput,back,cancel/param
/interceptor-ref
interceptor-ref name=workflow
param
name=excludeMethodsinput,back,cancel/param
/interceptor-ref
/interceptor-stack
/interceptors

default-interceptor-ref name=paramsPrepareParamsStack
/





Richard Gundersen
Java Developer
 
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS

-Original Message-
From: Gundersen, Richard [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2008 11:18 AM
To: Struts Users Mailing List
Subject: Custom Exception Interceptor

Hi

I'm trying to override the default global exception handler, because I
need to remove a certain session attribute when an exception occurs. I
think I've done most of what's needed, it's just not being executed.

This is my struts.xml (I need my 'exception' to replace the one in the
default stack)

*
interceptors
interceptor name=exception
class=com.lsb.rwpayment.interceptors.LsbExceptionInterceptor/
/interceptors

default-interceptor-ref name=paramsPrepareParamsStack /
***



This is my interceptor:

public class LsbExceptionInterceptor extends ExceptionMappingInterceptor
{

public String intercept(ActionInvocation invocation) throws
Exception {
String result = super.intercept(invocation);
Map attibutes = ActionContext.getContext().getSession();
attibutes.remove(BaseAction.CURRENT_TRANSACTION);
return result;
}
}
***

Any ideas please?


Richard Gundersen
Java Developer
 
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS


As a responsible corporate citizen, London Scottish Bank plc asks you to
consider the environment before printing this email.

*** Disclaimer *** 

This electronic communication is confidential and for the exclusive use
of the addressee. It may contain private and confidential information.
The information, attachments and opinions contained in this E-mail are
those of its author only and do not necessarily represent those of
London Scottish Bank PLC or any other members of the London Scottish
Group. 

If you are not the intended addressee, you are prohibited from any
disclosure, distribution or further copying or use of this communication
or the information in it or taking any action in reliance on it. If you
have received this communication in error please notify the Information
Security Manager at [EMAIL PROTECTED] as soon as possible and
delete the message from all places in your computer where it is stored. 

We utilise virus scanning software but we cannot guarantee the security
of electronic communications and you are advised to check any
attachments for viruses. We do not accept liability for any loss
resulting from any corruption or alteration of data or importation of
any virus as a result of receiving this electronic communication. 

Replies to this E-mail may be monitored for operational or business
reasons. London Scottish Bank PLC is authorised and regulated by the
Financial Services Authority.


London Scottish Bank plc, Registered Office: 201 Deansgate, Manchester
M3 3NW Registered Number 973008 England.

Subsidiary Companies:-

London Scottish Finance Limited, Registered Office: 201 Deansgate,
Manchester M3 3NW Registered Number 233259 England.

London Scottish Broking Limited, Registered Office: 201 Deansgate,
Manchester M3 3NW Registered Number 230110 England.

Robinson Way  Company Limited, Registered Office: 201 Deansgate,
Manchester M3 3NW Registered Number 885896 England.

__
This email has been scanned by the MessageLabs Email Security System.

-
To unsubscribe, 

How to recover the action's name executed

2008-10-29 Thread Juanjo Cuadrado
Hi,

I need to know how to recover (from the validation method) the name of de
action that has been invoked. I want to know the name of the method that
will be executed for this action (in the struts.xml I have put diferents
methods for the same action class).

Thanks.


Re: [S2] actions responding only to POST/GET methods

2008-10-29 Thread Wes Wannemacher
On a get request, the password would be present in the URL -

http://localhost:8080/yourApp/Login.action?username=usernamepassword=yourpassword

This is probably not a *huge* deal, but there are places where
requests might be logged... Proxy servers, etc.

-Wes

2008/10/29 Paweł Wielgus [EMAIL PROTECTED]:
 Hi Hernán,

 Of course, you should never use GET when submitting a password, but that's a
 privacy concern you (developer) just deal when writing your jsp.

 could You elaborate more about the reason why?

 Best greetings,
 Paweł Wielgus.




-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com


Re: Struts Factory

2008-10-29 Thread Adam Hardy
And you could automate that for all your actions by writing an interceptor for 
it. (assumption: googlecode EJB plugin doesn't contain one already).


esemba on 28/10/08 12:33, wrote:

DI by default doesn't work, because POJOs (S2 actions) are not
container-managed resources. 
You may use JNDI look

Annotate EJB @Stateless(mappedName=ejb/MyEJB) and in client(S2 action):
InitialContext c = new InitialContext();
MyEJBInterface o = (MyEJBInterface) c.lookup(ejb/MyEJB);

I have no experience with googlecode ejb plugin.



Ronaldo Rigoni ... wrote:

Yes, I need that the container injected the instance of EJB in
Action automatically. Sorry for my english.
Tanks.
Ronaldo


2008/10/28 esemba [EMAIL PROTECTED]


hi,
could u be more specific, what is your issue? what do you mean by struts
factory? you want to inject EJB into struts 2 action?



Ronaldo Rigoni ... wrote:

Hi all,
Can I create a Struts Factory managed in GlassFish?
Because I have a EJB in my action, and if the bean has created by
container
e EJB injection has automatic.



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



[S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath
Hi,
Does any have any idea how to disable multiple form submission?
I can not use disabling each button, just because of sheer number; I am
looking for something like an interceptor. Does any one have any idea?

I am using struts 2, I found some similar articles on struts 1 on base
of tokens or something like that.


Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE
Any comments or statements made in this email are not necessarily those of 
Tavant Technologies.
The information transmitted is intended only for the person or entity to which 
it is addressed and may 
contain confidential and/or privileged material. If you have received this in 
error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to 
Tavant Technologies 
may be subject to our monitoring procedures.


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



Re: Problem publishing/subcribing events with dojo and struts

2008-10-29 Thread Musachy Barroso
Overall it is not a good idea to link an anchor and a div and make it both
ajax-enabled. You can either publish a topic on the anchor and listen to
it on the div (without targets in the anchor), or make the div plain, and
use targets in the anchor.

musachy

On Wed, Oct 29, 2008 at 5:45 AM, Sergio Sánchez González [EMAIL PROTECTED]
 wrote:

 Thanks in advance for the feedback.

 It's changed but doesn't work. This is the url tag and the link in the
 ExpedientList.jsp

s:url id=viewLinesUrl action=showLines namespace=/expedient
s:param name=expedientId value=id /
/s:url

 s:a href=%{viewLinesUrl} theme=ajax
 targets=expedientLines notifyTopics=/openLineListView All
 Messages/s:a

 And this is the div which receives the data in the Expedient.jsp:

s:url action=showLines id=listExpLinesUrl
 namespace=/expedient/

div id=expedientLinesWrapper style=width:
 550px;border-style: solid; display:none
s:div id=expedientLines theme=ajax
 href=%{listExpLinesUrl} loadingText=Loading...
 listenTopics=/viewLines notifyTopics=/closeLineList/
/div

 The response is ok, I mean, the data is retreived from de server side.
 But the openLineList trigger fails. So I have no way to make visible
 the expedientLinesWrapper div.



 2008/10/28 Musachy Barroso [EMAIL PROTECTED]:
  Make sure that you updated the url tags(add or change namespace) used to
  build the url for the ajax request, in this case viewLinesUrl.
 
  musachy
 
  On Tue, Oct 28, 2008 at 12:28 PM, Sergio Sánchez González 
  [EMAIL PROTECTED] wrote:
 
  I'm using struts and dojo. My code works fine until I change the
  struts namespace.
 
  These are my actions:
 
package name=expedient extends=struts-default
 
action name=showExpedients
resultpages/expedient/Expedient.jsp/result
/action
 
action name=listExpedients
  class=expedientController method=execute
resultpages/expedient/ExpedientList.jsp/result
/action
 
   action name=showLines class=expedientController
  method=getLines
   resultpages/expedient/ExpedientLinesList.jsp/result
/action
/package
 
I have the main page Expedient.jsp, a page for listing expedients
  ExpedientsList.jsp and another one for listing the lines of the
  expedients ExpedientLinesList. This works fine, if I publish an event
  in ExpedientList.jsp it can be captured in Expedient.jsp.
 
But when I change the struts namespace:
 
package name=expedient extends=struts-default
  namespace=/expedient
 
action name=showExpedients
result/pages/expedient/Expedient.jsp/result
/action
 
action name=listExpedients
  class=expedientController method=execute
 
 result/pages/expedient/ExpedientList.jsp/result
/action
 
  action name=showLines class=expedientController
  method=getLines
 
  result/pages/expedient/ExpedientLinesList.jsp/result
/action
/package
 
  the following notification inside ExpedientList.jsp doesn't call
  the subscription in Expedient.jsp
 
  notify code in ExpedientList.jsp:
  s:a href=%{viewLinesUrl} theme=ajax
  targets=expedientLines notifyTopics=/openLineListView All
  Messages/s:a
 
  subscrition code in Expedient.jsp:
dojo.event.topic.subscribe(/openLineList,
  function(data, type, request){ my code...});
 
 The only difference I see is that when the namespace is used in
  struts I have to write the absolute path in the result tags. But I
  don't fully understand how this affect the events in dojo and how to
  solve it. I don't see the light.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Hey you! Would you help me to carry the stone? Pink Floyd
 

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




-- 
Hey you! Would you help me to carry the stone? Pink Floyd


RE: Struts2 : Calling AJAX function on button click(ONLY)

2008-10-29 Thread Kanade, Sayali
Thanks for all your help!
I tried changing the href of the div on button click but that doesn't
work. How I finally managed to do this was by passing a hidden form
field to action. The action only executes when the form field has a set
value. So on page load the Action doesn't get this value and the div jsp
doesn't get it and displays nothing.

What I was doing wrong was that my Form had a name parameter, the form
must have an id parameter to pass form fields. Also, my Action class
also behaves like a form bean, it needs to have a getter and setter for
the form fields.

As I said, new to Struts 2 and got all confused.

Thanks again,
Regards,
Sayali.
 
-Original Message-
From: Roger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2008 7:56 AM
To: Struts Users Mailing List
Subject: Re: Struts2 : Calling AJAX function on button click(ONLY)

On Tuesday 28 October 2008 20:01:41 Kanade, Sayali wrote:
 Thanks for your reply, but not sure it answers my question.

 My question is: How can I prevent a div from refreshing its contents
on
 page load? The div should only be refreshed on button click.

 My problem is that, my div loads on page load. It also reloads on
submit
 button click, but it should ONLY load on submit click, not on page
load.

 The action that executes in my div has to be only executed after the
user
 selects a checkbox and clicks submit.

 Please help, I have browsed for this answer for hours!!!


You could tryusing a Javascript function to set your div to
display:none on 
page load and re-set it when you want to display it.

-
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: [S2]Multiple Form Submission

2008-10-29 Thread hernan gonzalez
http://struts.apache.org/2.0.11.2/docs/token-interceptor.html
http://struts.apache.org/2.0.11.2/docs/token-session-interceptor.html
http://www.planetstruts.org/struts2-showcase/token/index.jsp


Hernán J. González
http://hjg.com.ar/

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



Re: How to recover the action's name executed

2008-10-29 Thread hernan gonzalez
If you need to execute different validation for each method, would'n
it  be more
pertinent to validate programatically, invoking the corresponding
validation method
from each action method ?


On Wed, Oct 29, 2008 at 10:55 AM, Juanjo Cuadrado [EMAIL PROTECTED] wrote:
 Hi,

 I need to know how to recover (from the validation method) the name of de
 action that has been invoked. I want to know the name of the method that
 will be executed for this action (in the struts.xml I have put diferents
 methods for the same action class).

 Thanks.




-- 
Hernán J. González
http://hjg.com.ar/

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



Re: [S2] actions responding only to POST/GET methods

2008-10-29 Thread Paweł Wielgus
Hi Wes,
thanks for the response,
i've been wondering myself where would be any difference,
but couldn't find any, from the server point of view.
Still the proxies logs are a real threat.
If some one else is reading it, don't think that POST is secure,
one can sniff anything from post.

Best greetings,
Paweł Wielgus.

2008/10/29 Wes Wannemacher [EMAIL PROTECTED]:
 On a get request, the password would be present in the URL -

 http://localhost:8080/yourApp/Login.action?username=usernamepassword=yourpassword

 This is probably not a *huge* deal, but there are places where
 requests might be logged... Proxy servers, etc.

 -Wes

 2008/10/29 Paweł Wielgus [EMAIL PROTECTED]:
 Hi Hernán,

 Of course, you should never use GET when submitting a password, but that's a
 privacy concern you (developer) just deal when writing your jsp.

 could You elaborate more about the reason why?

 Best greetings,
 Paweł Wielgus.




 --
 Wesley Wannemacher
 President, Head Engineer/Consultant
 WanTii, Inc.
 http://www.wantii.com



Re: How to recover the action's name executed

2008-10-29 Thread Juanjo Cuadrado
uuummm... yes... but.. how?

have you documentation this?

2008/10/29 hernan gonzalez [EMAIL PROTECTED]

 If you need to execute different validation for each method, would'n
 it  be more
 pertinent to validate programatically, invoking the corresponding
 validation method
 from each action method ?


 On Wed, Oct 29, 2008 at 10:55 AM, Juanjo Cuadrado [EMAIL PROTECTED]
 wrote:
  Hi,
 
  I need to know how to recover (from the validation method) the name of de
  action that has been invoked. I want to know the name of the method that
  will be executed for this action (in the struts.xml I have put diferents
  methods for the same action class).
 
  Thanks.
 



 --
 Hernán J. González
 http://hjg.com.ar/

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




Re: [S2] actions responding only to POST/GET methods

2008-10-29 Thread Wes Wannemacher
I guess I assumed that any Login (or any sensitive information) action
would be secured with SSL. If you have an SSL connection between you
and your server, any packets sniffed would at least be encrypted. The
URL would probably still show up in a log somewhere, which makes GET
requests over SSL sort of a waste, but at least POST requests will
have the form data encrypted.

Of course, if you are reading this and wondering about why anyone
would do a form submission over GET... I always think about users
wanting to bookmark a page. Think of a user wanting to bookmark the
results of a Google search.

Anyhow, the point I'm trying to make is that the choice between GET
and POST is more complex than flipping a coin :)

-Wes

2008/10/29 Paweł Wielgus [EMAIL PROTECTED]:
 Hi Wes,
 thanks for the response,
 i've been wondering myself where would be any difference,
 but couldn't find any, from the server point of view.
 Still the proxies logs are a real threat.
 If some one else is reading it, don't think that POST is secure,
 one can sniff anything from post.

 Best greetings,
 Paweł Wielgus.

 2008/10/29 Wes Wannemacher [EMAIL PROTECTED]:
 On a get request, the password would be present in the URL -

 http://localhost:8080/yourApp/Login.action?username=usernamepassword=yourpassword

 This is probably not a *huge* deal, but there are places where
 requests might be logged... Proxy servers, etc.

 -Wes

 2008/10/29 Paweł Wielgus [EMAIL PROTECTED]:
 Hi Hernán,

 Of course, you should never use GET when submitting a password, but that's 
 a
 privacy concern you (developer) just deal when writing your jsp.

 could You elaborate more about the reason why?

 Best greetings,
 Paweł Wielgus.




 --
 Wesley Wannemacher
 President, Head Engineer/Consultant
 WanTii, Inc.
 http://www.wantii.com





-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com


Query String limitation

2008-10-29 Thread Amir Jamak
Hello everyone,

I am using Struts 1.2.9, and this is my first post to this list. I was trying 
to find solution elsewhere without any success.
This is the problem, in the action form I have some sort of a collections which 
can grow in size.  I have observed that all of the items are listed in the 
query string. Once the collection reaches certain size, the page becomes white 
after form submission, and query string becomes more than 1500 characters long. 
I suppose that query string has some length limitation, therefore I should use 
POST instead of GET, but I don't know how. In the struts-config.xml file the 
action form is configured as follows:


    form-bean name=ActionForm 
   type=com.mycom.ActionForm /


    action input=/incl/somePage.jsp 
    type=com.mycom.Action
    path=/Action 
    parameter=method
    name=ActionForm 
    validate=true
    scope=session
    forward name=forward path=/incl/somePage.jsp/
    /action





  

Query String limitation

2008-10-29 Thread Amir Jamak
Hello everyone,

I am using Struts 1.2.9, and this is my first post to this list. I was trying 
to find solution elsewhere without any success.
This is the problem, in the action form I have some sort of a collections which 
can grow in size.  I have observed that all of the items are listed in the 
query string. Once the collection reaches certain size, the page becomes white 
after form submission, and query string becomes more than 1500 characters long. 
I suppose that query string has some length limitation, therefore I should use 
POST instead of GET, but I don't know how. In the struts-config.xml file the 
action form is configured as follows:

    form-bean name=ActionForm 
   type=com.mycom.ActionForm /

     

    action input=/incl/somePage.jsp 
    type=com.mycom.Action
    path=/Action 
    parameter=method
    name=ActionForm 
    validate=true
    scope=session
    forward name=forward path=/incl/somePage.jsp/
    /action

Any help is appreciated. Thanks in advance.

Amir



  

java.lang.NullPointerException: Module 'null' not found.

2008-10-29 Thread HarleyGuy

Forgive me for posting a topic that seems to be answered already in this
forum. I am not able to correct this fault using the information provided in
this form and FAQ sections.

This is a basic tutorial example of a struts project I have created. It
consist of one jsp, one Form and Action class. However, typing in the URL
http://localhost:8080/strutsproject I recieve the following fault:


[code]

java.lang.NullPointerException: Module 'null' not found.
org.apache.struts.taglib.TagUtils.getModuleConfig(TagUtils.java:755)

org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:364)

org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:285)

org.apache.struts.taglib.logic.RedirectTag.generateRedirectURL(RedirectTag.java:289)

org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:268)

org.apache.jsp.index_jsp._jspx_meth_logic_005fredirect_005f0(index_jsp.java:115)
org.apache.jsp.index_jsp._jspService(index_jsp.java:87)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


[/code]



What I have done to correct this problem myself:

1. Verify all the dependent jar files are in the lib directory within the
war file.
2. I reviewed the struts-config.xml file.


Here is my struts 1.3.8 config file.


[code]
?xml version=1.0 encoding=UTF-8?
!DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts
Configuration 1.3//EN
http://struts.apache.org/dtds/struts-config_1_3.dtd;

struts-config
form-beans
form-bean name=addPersonForm 
type=russ.home.struts.AddPersonForm
/form-bean
/form-beans
global-exceptions /
global-forwards /
action-mappings
action path=/addPerson.do 
type=russ.home.struts.AddPersonAction
name=addPersonForm input=/addPerson.jsp 
scope=request 
forward name=success path=/success.html /
forward name=failure path=/failure.html /
/action
/action-mappings
message-resources parameter=russ.home.struts.MessageResources /
/struts-config


[/code]



This is my addPerson JSP

[code]
%@ page language=java contentType=text/html pageEncoding=ISO-8859-1%

%@ taglib uri=http://struts.apache.org/tags-bean; prefix=bean%
%@ taglib uri=http://struts.apache.org/tags-html; prefix=html%
%@ taglib uri=http://struts.apache.org/tags-logic; prefix=logic%
%@ taglib uri=http://struts.apache.org/tags-tiles; prefix=tiles%

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html:html
  head
html:base /

titleSubmit Example/title
meta http-equiv=pragma content=no-cache
meta http-equiv=cache-control content=no-cache
meta http-equiv=expires content=0
meta http-equiv=keywords content=keyword1,keyword2,keyword3
meta http-equiv=description content=This is my page
!--
link rel=stylesheet type=text/css href=styles.css
--
  /head

  body bgcolor=white
logic:notPresent name=org.apache.struts.action.MESSAGE
scope=application
ERROR:  Application resources not loaded -- check servlet container
logs for error messages.
/logic:notPresent
  
html:form action=/addPerson.do method=post focus=lastName
table border=0
thead
tr align=center
td colspan=6strongExample Submit 
Page/strong/td
/tr
/thead
tbody
tr align=left
td align=right colspan=1Last 
Name:/td
td align=left colspan=1 
html:text property=lastName //td
td align=right 
colspan=1html:errors property=lnameErrors
//td
td align=right colspan=1First 
Name:/td
td align=left colspan=1html:text 
property=firstName //td
td colspan=2html:errors 
property=fnameErrors //td
/tr
tr
td align=right 
colspan=1Address:/td
td align=left 
colspan=2html:textarea property=address //td
td align=left 
colspan=2html:errors property=addressErrors
//td
/tr
 

Re: Query String limitation

2008-10-29 Thread Paweł Wielgus
Hi Amir,
i have completly no idea what Your problem is, but maybe this will help:
use form action=myaction/form instead of a
href=myaction.../a on the jsp where this action is triggered,
also pay attention to not to add method=get inside form tag.
If You would provide more details about what You want to do it would
be simpler to answear.

Best greetings,
Paweł Wielgus.



2008/10/29 Amir Jamak [EMAIL PROTECTED]:
 Hello everyone,

 I am using Struts 1.2.9, and this is my first post to this list. I was trying 
 to find solution elsewhere without any success.
 This is the problem, in the action form I have some sort of a collections 
 which can grow in size.  I have observed that all of the items are listed in 
 the query string. Once the collection reaches certain size, the page becomes 
 white after form submission, and query string becomes more than 1500 
 characters long. I suppose that query string has some length limitation, 
 therefore I should use POST instead of GET, but I don't know how. In the 
 struts-config.xml file the action form is configured as follows:

 form-bean name=ActionForm
type=com.mycom.ActionForm /

 

 action input=/incl/somePage.jsp
 type=com.mycom.Action
 path=/Action
 parameter=method
 name=ActionForm
 validate=true
 scope=session
 forward name=forward path=/incl/somePage.jsp/
 /action

 Any help is appreciated. Thanks in advance.

 Amir






Re: How to putt objects on the valuestack from INSIDE an action?

2008-10-29 Thread hernan gonzalez
A suggestion, which might or not be adequate for your case:
If  every action/jsp of your webapplication share that behaviour, and
if your actions
presently just extend ActionSupport, you might want to change that so that they
extend instead a MySiteAction class (which extends ActionSupport and implements
ServletRequestAware) with a getter for that object kept in the session.

Hernán J. González
http://hjg.com.ar/


On Wed, Oct 29, 2008 at 8:46 AM, Alexander Baetz
[EMAIL PROTECTED] wrote:
 I guess i should add explanation.

 i want to save an object permanently on the value stack.
 In my case this object holds many informations that configure my pages
 (loginuserid...). It is created inside my loginAction.
 I can get it from an action with a get-Method, but this object is permanent
 and doesnt matter for any action beside login/logout. But the jsp uses it
 every time.

 I could put this object into the session (which i currently do). But i like
 the value stack, and prefere lines like #Settings.loginUser.id instead of
 #session.settings.loginuser.id

 Hope i could explain my problem

 Greetings,
 Laures

 Sébastien Domergue schrieb:


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



Re: Query String limitation

2008-10-29 Thread Amir Jamak
Thanks a lot Paweł I think you have solved my problem. In fact I didn't know 
how to change from get to post. :-)
Thanks again.

Amir

--- On Wed, 10/29/08, Paweł Wielgus [EMAIL PROTECTED] wrote:
From: Paweł Wielgus [EMAIL PROTECTED]
Subject: Re: Query String limitation
To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED]
Date: Wednesday, October 29, 2008, 11:40 PM

Hi Amir,
i have completly no idea what Your problem is, but maybe this will help:
use form action=myaction/form instead of a
href=myaction.../a on the jsp where this action is
triggered,
also pay attention to not to add method=get inside form tag.
If You would provide more details about what You want to do it would
be simpler to answear.

Best greetings,
Paweł Wielgus.



2008/10/29 Amir Jamak [EMAIL PROTECTED]:
 Hello everyone,

 I am using Struts 1.2.9, and this is my first post to this list. I was
trying to find solution elsewhere without any success.
 This is the problem, in the action form I have some sort of a collections
which can grow in size.  I have observed that all of the items are listed in the
query string. Once the collection reaches certain size, the page becomes white
after form submission, and query string becomes more than 1500 characters long.
I suppose that query string has some length limitation, therefore I should use
POST instead of GET, but I don't know how. In the struts-config.xml file the
action form is configured as follows:

 form-bean name=ActionForm
type=com.mycom.ActionForm /

 

 action input=/incl/somePage.jsp
 type=com.mycom.Action
 path=/Action
 parameter=method
 name=ActionForm
 validate=true
 scope=session
 forward name=forward
path=/incl/somePage.jsp/
 /action

 Any help is appreciated. Thanks in advance.

 Amir







  

Which is Best book for Struts 1.2.9??

2008-10-29 Thread Casinova

I am using net beans 6.1 and they have provided strut 1.2.9 . so i m
searching a good book for 1.2.9 .
Please suggest me book and link where can i download?


Thanks in advance


-- 
View this message in context: 
http://www.nabble.com/Which-is-Best-book-for-Struts-1.2.9---tp20229400p20229400.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: How to recover the action's name executed

2008-10-29 Thread hernan gonzalez
I wrote  validate programatically, it's rather trivial, though
perhaps does not mix well with
declarative validation, if you are using it. For example


public class MyAction extends ActionSupport implements Validateable  {

  public String method1() throws Exception  {
   validate1();
   if(hasErrors()) return INPUT;
   ... // real method1 work
  }

  public String method2() throws Exception  {
   validate2();
   if(hasErrors()) return INPUT;
   ... // real method1 work
  }


  public void validate1() {
 ...
  }

  public void validate2() {
 ...
  }

  public void validate () {
 // common validation for every method
  }

}


On Wed, Oct 29, 2008 at 11:52 AM, Juanjo Cuadrado [EMAIL PROTECTED] wrote:
 uuummm... yes... but.. how?

 have you documentation this?

 2008/10/29 hernan gonzalez [EMAIL PROTECTED]

 If you need to execute different validation for each method, would'n
 it  be more
 pertinent to validate programatically, invoking the corresponding
 validation method
 from each action method ?


 On Wed, Oct 29, 2008 at 10:55 AM, Juanjo Cuadrado [EMAIL PROTECTED]
 wrote:
  Hi,
 
  I need to know how to recover (from the validation method) the name of de
  action that has been invoked. I want to know the name of the method that
  will be executed for this action (in the struts.xml I have put diferents
  methods for the same action class).
 
  Thanks.
 



 --
 Hernán J. González
 http://hjg.com.ar/

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






-- 
Hernán J. González
http://hjg.com.ar/

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



java black belt ANNOUNCEMENTS

2008-10-29 Thread SAKHO Meissa (EXT)
Hi all,

The java black belt community is proud to ANNOUNCE the release of the
struts2 exam.
You can take a beta exam (needs free registration), vote or add
contribution questions. 

The struts2 exam is accessible here:
http://www.javablackbelt.com/QuestionnaireDefDisplay.wwa?questPublicId=1
617


http://www.javablackbelt.com/

Meissa

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



RE: Which is Best book for Struts 1.2.9??

2008-10-29 Thread Gundersen, Richard
If you're starting from scratch, why not use Struts 2 instead? I used
'Practical Struts 2: Web 2.0 Projects' by Ian Roughly (who wrote a lot
of Struts 2 I think??) to get to grips with the basics. 

It's easy to read and flows nicely, building an app step by step (as
opposed to the Spring docs which are good but jump around all over the
place!)

Don't know about books for 1.2.9 sorry

Richard Gundersen
Java Developer
 
Email: [EMAIL PROTECTED]
Phone: 01618302398
Fax: 01618342536
London Scottish Bank plc
24 Mount Street
Manchester
M2 3LS

-Original Message-
From: Casinova [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2008 3:21 PM
To: user@struts.apache.org
Subject: Which is Best book for Struts 1.2.9??


I am using net beans 6.1 and they have provided strut 1.2.9 . so i m
searching a good book for 1.2.9 .
Please suggest me book and link where can i download?


Thanks in advance


-- 
View this message in context:
http://www.nabble.com/Which-is-Best-book-for-Struts-1.2.9---tp20229400p2
0229400.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]


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__

As a responsible corporate citizen, London Scottish Bank plc asks you to 
consider the environment before printing this email.

*** Disclaimer *** 

This electronic communication is confidential and for the exclusive use of the 
addressee. It may contain private and confidential information. The 
information, attachments and opinions contained in this E-mail are those of its 
author only and do not necessarily represent those of London Scottish Bank PLC 
or any other members of the London Scottish Group. 

If you are not the intended addressee, you are prohibited from any disclosure, 
distribution or further copying or use of this communication or the information 
in it or taking any action in reliance on it. If you have received this 
communication in error please notify the Information Security Manager at [EMAIL 
PROTECTED] as soon as possible and delete the message from all places in your 
computer where it is stored. 

We utilise virus scanning software but we cannot guarantee the security of 
electronic communications and you are advised to check any attachments for 
viruses. We do not accept liability for any loss resulting from any corruption 
or alteration of data or importation of any virus as a result of receiving this 
electronic communication. 

Replies to this E-mail may be monitored for operational or business reasons. 
London Scottish Bank PLC is authorised and regulated by the Financial Services 
Authority.


London Scottish Bank plc, Registered Office: 201 Deansgate, Manchester M3 3NW 
Registered Number 973008 England.

Subsidiary Companies:-

London Scottish Finance Limited, Registered Office: 201 Deansgate, Manchester 
M3 3NW Registered Number 233259 England.

London Scottish Broking Limited, Registered Office: 201 Deansgate, Manchester 
M3 3NW Registered Number 230110 England.

Robinson Way  Company Limited, Registered Office: 201 Deansgate, Manchester M3 
3NW Registered Number 885896 England.

__
This email has been scanned by the MessageLabs Email Security System.

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



struts 2.0.14

2008-10-29 Thread David Harland
Hi,

Is there any chance of getting a 2.0.14 build please.

Thanks

Dave.


  

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



Re: How to recover the action's name executed [SOLVED]

2008-10-29 Thread Juanjo Cuadrado
It works!!!

Thanks.

2008/10/29 hernan gonzalez [EMAIL PROTECTED]

 I wrote  validate programatically, it's rather trivial, though
 perhaps does not mix well with
 declarative validation, if you are using it. For example


 public class MyAction extends ActionSupport implements Validateable  {

  public String method1() throws Exception  {
   validate1();
   if(hasErrors()) return INPUT;
   ... // real method1 work
  }

  public String method2() throws Exception  {
   validate2();
   if(hasErrors()) return INPUT;
   ... // real method1 work
  }


  public void validate1() {
 ...
  }

  public void validate2() {
 ...
  }

  public void validate () {
 // common validation for every method
   }

 }


 On Wed, Oct 29, 2008 at 11:52 AM, Juanjo Cuadrado [EMAIL PROTECTED]
 wrote:
  uuummm... yes... but.. how?
 
  have you documentation this?
 
  2008/10/29 hernan gonzalez [EMAIL PROTECTED]
 
  If you need to execute different validation for each method, would'n
  it  be more
  pertinent to validate programatically, invoking the corresponding
  validation method
  from each action method ?
 
 
  On Wed, Oct 29, 2008 at 10:55 AM, Juanjo Cuadrado [EMAIL PROTECTED]
 
  wrote:
   Hi,
  
   I need to know how to recover (from the validation method) the name of
 de
   action that has been invoked. I want to know the name of the method
 that
   will be executed for this action (in the struts.xml I have put
 diferents
   methods for the same action class).
  
   Thanks.
  
 
 
 
  --
  Hernán J. González
  http://hjg.com.ar/
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 



 --
 Hernán J. González
 http://hjg.com.ar/

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




RE: [S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath

Hi,
Thanks for the reply but I tried it out but got this error.
In my stack I added 
interceptor-ref name=token-session/
I have a list of interceptors stacks, I added to them


HTTP ERROR: 404

No result defined for action com.neolivz.sandbox.action.IndexAction and result 
invalid.token

RequestURI=/WebSandbox/index.action
Caused by:

No result defined for action com.neolivz.sandbox.action.IndexAction and result 
invalid.token - action - 
file:/D:/Work/TWMS/WebSandbox/target/classes/struts.xml:12:71
at 
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:345)
at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at 
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at 
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
at 
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

Powered by Jetty://

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: hernan gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2008 7:04 PM
To: Struts Users Mailing List
Subject: Re: [S2]Multiple Form Submission

http://struts.apache.org/2.0.11.2/docs/token-interceptor.html
http://struts.apache.org/2.0.11.2/docs/token-session-interceptor.html
http://www.planetstruts.org/struts2-showcase/token/index.jsp


Hernán J. González
http://hjg.com.ar/

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

Any comments or statements made in this email are not necessarily those of 
Tavant Technologies.
The information transmitted is intended only for the person or entity to which 
it is addressed and may 
contain confidential and/or privileged material. If you have received this in 
error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to 
Tavant Technologies 
may be subject to our monitoring procedures.


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



Re: [S2]Multiple Form Submission

2008-10-29 Thread hernan gonzalez
Take a look at the documentation. The  message is quite clear:

No result defined for action com.neolivz.sandbox.action.IndexAction
and result invalid.token

The Tokeninterceptor  throw a special result  invalid.token when the
token is invalid (what usually
means a double submit). Hence, you should configure specify a jsp for
that result in your action mapping
(for that action, and/or globally).

Take a look also to the token-session-interceptor.html which has a
(perhaps) more interesting behaviuor.
You might also buy the struts2 in action book.

Regards

Hernán J. González
http://hjg.com.ar/



On Wed, Oct 29, 2008 at 2:54 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:

 Hi,
Thanks for the reply but I tried it out but got this error.
 In my stack I added
interceptor-ref name=token-session/
 I have a list of interceptors stacks, I added to them


 HTTP ERROR: 404

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token

 RequestURI=/WebSandbox/index.action
 Caused by:

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token - action - 
 file:/D:/Work/TWMS/WebSandbox/target/classes/struts.xml:12:71
at 
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:345)
at 
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at 
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at 
 org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
at 
 org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

 Powered by Jetty://

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 7:04 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 http://struts.apache.org/2.0.11.2/docs/token-interceptor.html
 http://struts.apache.org/2.0.11.2/docs/token-session-interceptor.html
 http://www.planetstruts.org/struts2-showcase/token/index.jsp


 Hernán J. González
 http://hjg.com.ar/

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

 Any comments or statements made in this email are not necessarily those of 
 Tavant Technologies.
 The information transmitted is intended only for the person or entity to 
 which it is addressed and may
 contain confidential and/or privileged material. If you have received this in 
 error, please contact the
 sender and delete the material from any computer. All e-mails sent from or to 
 Tavant Technologies
 may be subject to our monitoring procedures.


 

RE: [S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath
Hi, 
I read that part, 
First thing I used token session interceptor, it says it will block 
subsequent requests until the first request is complete, and then instead of 
returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
added this interceptor.

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: hernan gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2008 11:26 PM
To: Struts Users Mailing List
Subject: Re: [S2]Multiple Form Submission

Take a look at the documentation. The  message is quite clear:

No result defined for action com.neolivz.sandbox.action.IndexAction
and result invalid.token

The Tokeninterceptor  throw a special result  invalid.token when the
token is invalid (what usually
means a double submit). Hence, you should configure specify a jsp for
that result in your action mapping
(for that action, and/or globally).

Take a look also to the token-session-interceptor.html which has a
(perhaps) more interesting behaviuor.
You might also buy the struts2 in action book.

Regards

Hernán J. González
http://hjg.com.ar/



On Wed, Oct 29, 2008 at 2:54 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:

 Hi,
Thanks for the reply but I tried it out but got this error.
 In my stack I added
interceptor-ref name=token-session/
 I have a list of interceptors stacks, I added to them


 HTTP ERROR: 404

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token

 RequestURI=/WebSandbox/index.action
 Caused by:

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token - action - 
 file:/D:/Work/TWMS/WebSandbox/target/classes/struts.xml:12:71
at 
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:345)
at 
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at 
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at 
 org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
at 
 org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

 Powered by Jetty://

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 7:04 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 http://struts.apache.org/2.0.11.2/docs/token-interceptor.html
 http://struts.apache.org/2.0.11.2/docs/token-session-interceptor.html
 

Re: struts 2.0.14

2008-10-29 Thread Rene Gielen

David,

the latest problem with conversion errors not being copied to the safe 
stack is fixed in xwork svn, and we need it to be released before we 
could promote a 2.0.14 build.


For now, you could check out the current xwork 2.0.x branch and build a 
jar which you could use as a drop in replacement for the xwork 2.0.6 jar 
 provided with the 2.0.13 test build.


We're working on a solution to get a full release out, but any feedback 
from users whether our problems are fixed with the current codebase 
would be really helpful!


Sorry for the inconvenience,
Rene

David Harland schrieb:

Hi,

Is there any chance of getting a 2.0.14 build please.

Thanks

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: [S2]Multiple Form Submission

2008-10-29 Thread Wes Wannemacher
Can you copy/paste some of your action/jsp/configuration code.

Are you using the s:token / tag in your form?

-Wes

On Wed, Oct 29, 2008 at 2:09 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:
 Hi,
I read that part,
First thing I used token session interceptor, it says it will block 
 subsequent requests until the first request is complete, and then instead of 
 returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
 added this interceptor.

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:26 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Take a look at the documentation. The  message is quite clear:

 No result defined for action com.neolivz.sandbox.action.IndexAction
 and result invalid.token

 The Tokeninterceptor  throw a special result  invalid.token when the
 token is invalid (what usually
 means a double submit). Hence, you should configure specify a jsp for
 that result in your action mapping
 (for that action, and/or globally).

 Take a look also to the token-session-interceptor.html which has a
 (perhaps) more interesting behaviuor.
 You might also buy the struts2 in action book.

 Regards

 Hernán J. González
 http://hjg.com.ar/



 On Wed, Oct 29, 2008 at 2:54 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:

 Hi,
Thanks for the reply but I tried it out but got this error.
 In my stack I added
interceptor-ref name=token-session/
 I have a list of interceptors stacks, I added to them


 HTTP ERROR: 404

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token

 RequestURI=/WebSandbox/index.action
 Caused by:

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token - action - 
 file:/D:/Work/TWMS/WebSandbox/target/classes/struts.xml:12:71
at 
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:345)
at 
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at 
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at 
 org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
at 
 org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at 
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at 
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at 
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at 
 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at 
 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at 
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at 
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at 
 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at 
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at 
 org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

 Powered by Jetty://

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 7:04 PM
 To: Struts Users Mailing List
 Subject: 

RE: [S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath
Hi Wes,
I was not using s:token /
But after your mail I just added that, and tried
I have an empty jsp

%@ taglib prefix=s uri=/struts-tags %
%@ taglib prefix=t uri=/test %
html
head
titleIndex/title
s:head theme=ajax/

/head
body
s:token/
/body
/html

This jsp is mapped in index.action

In struts.xml I have the action mapped which refers to the following 
interceptor stack
interceptor-stack name=paramsPrepare
interceptor-ref name=token-session/
interceptor-ref name=exception /
interceptor-ref name=alias /
interceptor-ref name=checkbox /
interceptor-ref name=params /
interceptor-ref name=servlet-config /
interceptor-ref name=prepare /
interceptor-ref name=conversionError /
/interceptor-stack

And action map is like this
action name=index 
class=com.neolivz.sandbox.action.IndexAction
interceptor-ref name=paramsPrepare/
result/jsp/index.jsp/result
/action

And ;) it does work without the token-session interceptor :D

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2008 11:47 PM
To: Struts Users Mailing List
Subject: Re: [S2]Multiple Form Submission

Can you copy/paste some of your action/jsp/configuration code.

Are you using the s:token / tag in your form?

-Wes

On Wed, Oct 29, 2008 at 2:09 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:
 Hi,
I read that part,
First thing I used token session interceptor, it says it will block 
 subsequent requests until the first request is complete, and then instead of 
 returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
 added this interceptor.

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:26 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Take a look at the documentation. The  message is quite clear:

 No result defined for action com.neolivz.sandbox.action.IndexAction
 and result invalid.token

 The Tokeninterceptor  throw a special result  invalid.token when the
 token is invalid (what usually
 means a double submit). Hence, you should configure specify a jsp for
 that result in your action mapping
 (for that action, and/or globally).

 Take a look also to the token-session-interceptor.html which has a
 (perhaps) more interesting behaviuor.
 You might also buy the struts2 in action book.

 Regards

 Hernán J. González
 http://hjg.com.ar/



 On Wed, Oct 29, 2008 at 2:54 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:

 Hi,
Thanks for the reply but I tried it out but got this error.
 In my stack I added
interceptor-ref name=token-session/
 I have a list of interceptors stacks, I added to them


 HTTP ERROR: 404

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token

 RequestURI=/WebSandbox/index.action
 Caused by:

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token - action - 
 file:/D:/Work/TWMS/WebSandbox/target/classes/struts.xml:12:71
at 
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:345)
at 
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at 
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at 
 org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
at 
 org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at 
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 

Re: [S2]Multiple Form Submission

2008-10-29 Thread hernan gonzalez
The s:token / should be in the jsp that creates the form that is
submitted to the action (not in the result jsp!), so that the action
can
check for its existence. And the stack with the token interceptor
should be applied only to that action/method.

Hernán J. González
http://hjg.com.ar/


On Wed, Oct 29, 2008 at 4:38 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:
 Hi Wes,
I was not using s:token /
 But after your mail I just added that, and tried
 I have an empty jsp

 %@ taglib prefix=s uri=/struts-tags %
 %@ taglib prefix=t uri=/test %
 html
 head
titleIndex/title
s:head theme=ajax/

 /head
 body
s:token/
 /body
 /html

 This jsp is mapped in index.action

 In struts.xml I have the action mapped which refers to the following 
 interceptor stack
interceptor-stack name=paramsPrepare
interceptor-ref name=token-session/
interceptor-ref name=exception /
interceptor-ref name=alias /
interceptor-ref name=checkbox /
interceptor-ref name=params /
interceptor-ref name=servlet-config /
interceptor-ref name=prepare /
interceptor-ref name=conversionError /
/interceptor-stack

 And action map is like this
action name=index 
 class=com.neolivz.sandbox.action.IndexAction
interceptor-ref name=paramsPrepare/
result/jsp/index.jsp/result
/action

 And ;) it does work without the token-session interceptor :D

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:47 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Can you copy/paste some of your action/jsp/configuration code.

 Are you using the s:token / tag in your form?

 -Wes

 On Wed, Oct 29, 2008 at 2:09 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:
 Hi,
I read that part,
First thing I used token session interceptor, it says it will block 
 subsequent requests until the first request is complete, and then instead of 
 returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
 added this interceptor.

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:26 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Take a look at the documentation. The  message is quite clear:

 No result defined for action com.neolivz.sandbox.action.IndexAction
 and result invalid.token

 The Tokeninterceptor  throw a special result  invalid.token when the
 token is invalid (what usually
 means a double submit). Hence, you should configure specify a jsp for
 that result in your action mapping
 (for that action, and/or globally).

 Take a look also to the token-session-interceptor.html which has a
 (perhaps) more interesting behaviuor.
 You might also buy the struts2 in action book.

 Regards

 Hernán J. González
 http://hjg.com.ar/



 On Wed, Oct 29, 2008 at 2:54 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:

 Hi,
Thanks for the reply but I tried it out but got this error.
 In my stack I added
interceptor-ref name=token-session/
 I have a list of interceptors stacks, I added to them


 HTTP ERROR: 404

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token

 RequestURI=/WebSandbox/index.action
 Caused by:

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token - action - 
 file:/D:/Work/TWMS/WebSandbox/target/classes/struts.xml:12:71
at 
 com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:345)
at 
 com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
at 
 org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)
at 
 org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)
at 
 org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)
at 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at 
 org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at 
 

RE: [S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath
Hi,
:) Thanks Henan, At least something came up,
It was my mistake I was doing it in all interceptor, now I have to 
extend that interceptor to ignore the values if the session does not exist. It 
ok :)

And they call getters every time also, that also I have to worry, any way 
thanks very much. I really appreciate it :)

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: hernan gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 12:24 AM
To: Struts Users Mailing List
Subject: Re: [S2]Multiple Form Submission

The s:token / should be in the jsp that creates the form that is
submitted to the action (not in the result jsp!), so that the action
can
check for its existence. And the stack with the token interceptor
should be applied only to that action/method.

Hernán J. González
http://hjg.com.ar/


On Wed, Oct 29, 2008 at 4:38 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:
 Hi Wes,
I was not using s:token /
 But after your mail I just added that, and tried
 I have an empty jsp

 %@ taglib prefix=s uri=/struts-tags %
 %@ taglib prefix=t uri=/test %
 html
 head
titleIndex/title
s:head theme=ajax/

 /head
 body
s:token/
 /body
 /html

 This jsp is mapped in index.action

 In struts.xml I have the action mapped which refers to the following 
 interceptor stack
interceptor-stack name=paramsPrepare
interceptor-ref name=token-session/
interceptor-ref name=exception /
interceptor-ref name=alias /
interceptor-ref name=checkbox /
interceptor-ref name=params /
interceptor-ref name=servlet-config /
interceptor-ref name=prepare /
interceptor-ref name=conversionError /
/interceptor-stack

 And action map is like this
action name=index 
 class=com.neolivz.sandbox.action.IndexAction
interceptor-ref name=paramsPrepare/
result/jsp/index.jsp/result
/action

 And ;) it does work without the token-session interceptor :D

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:47 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Can you copy/paste some of your action/jsp/configuration code.

 Are you using the s:token / tag in your form?

 -Wes

 On Wed, Oct 29, 2008 at 2:09 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:
 Hi,
I read that part,
First thing I used token session interceptor, it says it will block 
 subsequent requests until the first request is complete, and then instead of 
 returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
 added this interceptor.

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:26 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Take a look at the documentation. The  message is quite clear:

 No result defined for action com.neolivz.sandbox.action.IndexAction
 and result invalid.token

 The Tokeninterceptor  throw a special result  invalid.token when the
 token is invalid (what usually
 means a double submit). Hence, you should configure specify a jsp for
 that result in your action mapping
 (for that action, and/or globally).

 Take a look also to the token-session-interceptor.html which has a
 (perhaps) more interesting behaviuor.
 You might also buy the struts2 in action book.

 Regards

 Hernán J. González
 http://hjg.com.ar/



 On Wed, Oct 29, 2008 at 2:54 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:

 Hi,
Thanks for the reply but I tried it out but got this error.
 In my stack I added
interceptor-ref name=token-session/
 I have a list of interceptors stacks, I added to them


 HTTP ERROR: 404

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token

 RequestURI=/WebSandbox/index.action
 Caused by:

 No result defined for action com.neolivz.sandbox.action.IndexAction and 
 result invalid.token - action - 
 file:/D:/Work/TWMS/WebSandbox/target/classes/struts.xml:12:71
at 
 

Struts 2 + Tiles 2

2008-10-29 Thread Carlos Curotto
Hi everyone,

I am trying to configure Struts 2 version 2.0.12 and Tiles 2.

When i call an action that uses tiles, i am getting this exception:

javax.servlet.ServletException: Error including path
'/WEB-INF/layout/common.jsp'. org/apache/tiles/ListAttribute

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)


common.jsp is the file that contains the tiles tamplate, here is that file:

%@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %

?xml version=1.0 encoding=UTF-8?

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN 
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;

html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en
body
table
tr
td
tiles:insertAttribute name=header /
/td
/tr
tr
td
tiles:insertAttribute name=body /
/td
/tr
tr
td
tiles:insertAttribute name=footer /
/td
/tr
/table
/body
/html

also, here is my tiles.xml

?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE tiles-definitions PUBLIC
   -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
   http://jakarta.apache.org/struts/dtds/tiles-config_2_0.dtd;

tiles-definitions
definition name=home.layout template=/WEB-INF/layout/common.jsp
put name=title value=Panorama Grid Console/
put name=header value=/WEB-INF/layout/header.jsp/
put name=body value=/WEB-INF/view/home.jsp/
put name=footer value=/WEB-INF/layout/footer.jsp/
/definition
/tiles-definitions

i have tried with put and put-attribute and i am getting the same exception
for both of them.

Finally, here is my web.xml

web-app id=PanoramaGridConsole version=2.4 xmlns=
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;

!-- Struts 2 Filter --
filter
filter-namestruts2/filter-name

filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class
/filter

!-- Struts 2 Filter Mapping --
filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping

!-- Struts 2 Tiles Listener --
listener

listener-classorg.apache.struts2.tiles.StrutsTilesListener/listener-class
/listener

/web-app

Am i missing something? is this a bug related to struts 2??? Anyone have
seen this before?

Thanks in advance,

-- 
Carlos Curotto


RE: [S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath
Hey Henan,
In some case I am getting 
Map session = ActionContext.getContext().getSession();
And the session contains a key called 
org.apache.struts2.util.InvocationSessionStore.invocationMap
and the value is Another SessionMap,
whose key value is correct struts.token
and value is the SESSION.

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 1:15 AM
To: Struts Users Mailing List
Subject: RE: [S2]Multiple Form Submission

Hi,
:) Thanks Henan, At least something came up,
It was my mistake I was doing it in all interceptor, now I have to 
extend that interceptor to ignore the values if the session does not exist. It 
ok :)

And they call getters every time also, that also I have to worry, any way 
thanks very much. I really appreciate it :)

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: hernan gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 12:24 AM
To: Struts Users Mailing List
Subject: Re: [S2]Multiple Form Submission

The s:token / should be in the jsp that creates the form that is
submitted to the action (not in the result jsp!), so that the action
can
check for its existence. And the stack with the token interceptor
should be applied only to that action/method.

Hernán J. González
http://hjg.com.ar/


On Wed, Oct 29, 2008 at 4:38 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:
 Hi Wes,
I was not using s:token /
 But after your mail I just added that, and tried
 I have an empty jsp

 %@ taglib prefix=s uri=/struts-tags %
 %@ taglib prefix=t uri=/test %
 html
 head
titleIndex/title
s:head theme=ajax/

 /head
 body
s:token/
 /body
 /html

 This jsp is mapped in index.action

 In struts.xml I have the action mapped which refers to the following 
 interceptor stack
interceptor-stack name=paramsPrepare
interceptor-ref name=token-session/
interceptor-ref name=exception /
interceptor-ref name=alias /
interceptor-ref name=checkbox /
interceptor-ref name=params /
interceptor-ref name=servlet-config /
interceptor-ref name=prepare /
interceptor-ref name=conversionError /
/interceptor-stack

 And action map is like this
action name=index 
 class=com.neolivz.sandbox.action.IndexAction
interceptor-ref name=paramsPrepare/
result/jsp/index.jsp/result
/action

 And ;) it does work without the token-session interceptor :D

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:47 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Can you copy/paste some of your action/jsp/configuration code.

 Are you using the s:token / tag in your form?

 -Wes

 On Wed, Oct 29, 2008 at 2:09 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:
 Hi,
I read that part,
First thing I used token session interceptor, it says it will block 
 subsequent requests until the first request is complete, and then instead of 
 returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
 added this interceptor.

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: hernan gonzalez [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:26 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Take a look at the documentation. The  message is quite clear:

 No result defined for action com.neolivz.sandbox.action.IndexAction
 and result invalid.token

 The Tokeninterceptor  throw a special result  invalid.token when the
 token is invalid (what usually
 means a double submit). Hence, you should configure specify a jsp for
 that result in your action mapping
 (for that action, and/or globally).

 Take a look also to the token-session-interceptor.html which has a
 (perhaps) more interesting behaviuor.
 You might also buy the struts2 in action book.

 Regards

 Hernán J. González
 

Blank Application struts2-blank-2.0.12. /example/HelloWorld.action - is not doing internationalization

2008-10-29 Thread Ambar Méndez
Hi ...

I got struts2-blank-2.0.12.war from download of Struts homepage and
probed it on apache-tomcat-6.0.16.

It only displays in Spanish but when I'm testing this same example on
http://struts.apache.org/2.x/docs/tutorials.html in Examples' section,
it works fine.

I tried to add localization to it by adding the intereceptor-ref tag
(name=i18n) and it didn't work, so added interceptor-ref tag
(name=i18nStack) and it didn't work. Then, I added into struts.xml
the property struts.custom.i18n.resources but it didn't work.

what I'm doing wrong? Do I need something more to make it work properly?

Thanks!

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



Re: Struts 2 + Tiles 2

2008-10-29 Thread Márcio Gurgel
Hi Carlos,

I guess that you forgot to put a tiles result type in your struts.xml.
Check if adding this (in your struts.xml) works:

package name=tiles-result extends=struts-default
result-types
result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult /
/result-types
/package

*To return a tiles result use this sintax:*

action name=abrirPesquisa method=abrirPesquisa
class=br.com.sgvdba.actions.pedido.PedidoPesquisaAction
result name=success
type=tilesdefault.pedidoPesquisa/result
/action


*My tiles.xml*

!DOCTYPE tiles-definitions PUBLIC
-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
http://tiles.apache.org/dtds/tiles-config_2_0.dtd;

tiles-definitions
definition name=default
template=/template/tiles/DefaultTemplate.jsp
put-attribute name=title value=SGVDBA type=string /
put-attribute name=top
value=/template/tiles/DefaultTop.jsp/
put-attribute name=menu
value=/template/tiles/DefaultMenu.jsp/
/definition

definition name=default.home extends=default
put-attribute name=body value=/view/Home.jsp /
/definition

!-- USUÁRIO --
definition name=default.usu extends=default
put-attribute name=body
value=/view/usuario/UsuDadosGerais.jsp /
/definition

definition name=default.usuPesquisa extends=default
put-attribute name=body
value=/view/usuario/UsuPesquisa.jsp /
/definition

!-- CLIENTE --
definition name=default.clienteJur extends=default
put-attribute name=body
value=/view/cliente/ClienteJur.jsp /
/definition

definition name=default.clienteFsc extends=default
put-attribute name=body
value=/view/cliente/ClienteFsc.jsp /
/definition

definition name=default.clientePesquisa extends=default
put-attribute name=body
value=/view/cliente/ClientePesquisa.jsp /
/definition

!-- FORNECEDOR --
definition name=default.fornecedor extends=default
put-attribute name=body
value=/view/fornecedor/Fornecedor.jsp /
/definition

definition name=default.fornecedorPesquisa extends=default
put-attribute name=body
value=/view/fornecedor/FornecedorPesquisa.jsp /
/definition

!-- PRODUTO --
definition name=default.produto extends=default
put-attribute name=body
value=/view/produto/Produto.jsp /
/definition

definition name=default.produtoPesquisa extends=default
put-attribute name=body
value=/view/produto/ProdutoPesquisa.jsp /
/definition

!-- NFE --
definition name=default.fornecedorNfePesquisa extends=default
put-attribute name=body
value=/view/fornecedor/FornecedorNfePesquisa.jsp /
/definition
!-- PEDIDO --
definition name=default.pedidoPesquisa extends=default
put-attribute name=body
value=/view/pedido/PedidoPesquisa.jsp /
/definition
!-- FINANCEIRO --
definition name=default.pedidoFaturaPesquisa extends=default
put-attribute name=body
value=/view/financeiro/PedidoFaturaPesquisa.jsp /
/definition
definition name=default.pedidoFatura extends=default
put-attribute name=body
value=/view/financeiro/PedidoFatura.jsp /
/definition

!-- PORTAL --
definition name=default.portalPedido extends=default
put-attribute name=body
value=/view/portal/Pedidos.jsp /
/definition
definition name=default.portalProduto extends=default
put-attribute name=body
value=/view/portal/Produtos.jsp /
/definition
definition name=default.portalNfe extends=default
put-attribute name=body value=/view/portal/Nfes.jsp
/
/definition

/tiles-definitions



Sorry about non-english code /:

Márcio Gurgel

2008/10/29 Carlos Curotto [EMAIL PROTECTED]

 Hi everyone,

 I am trying to configure Struts 2 version 2.0.12 and Tiles 2.

 When i call an action that uses tiles, i am getting this exception:

 javax.servlet.ServletException: Error including path
 '/WEB-INF/layout/common.jsp'. org/apache/tiles/ListAttribute

 org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)


 org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)


 common.jsp is the file that contains the tiles tamplate, here is that file:

 %@ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %

 ?xml version=1.0 encoding=UTF-8?

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN 
 http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;

 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en
body
table
tr
td
tiles:insertAttribute name=header /
/td
/tr
tr
td

Struts 2.0.12 - XML Validation with Websphere 6.1

2008-10-29 Thread Struts Developer
There was a know issue with struts 2.0.11.2 that the integrated XWork 2.0.5
jar may cause problems when used in a combination of WebSphere 6.1 runtime
environments with validation configuration via XML file.

Is this fixed with struts 2.0.12?. I do not see any information on the
apache website.


RE: [S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath
OOPS!!! 
I made a little mistake in last explanation, I just found out
When ever Struts execute a valid token they actually call 
InvocationSessionStore.storeInvocation(key, token, invocation);
Which intern crates a map and adds the map to session with the key
org.apache.struts2.util.InvocationSessionStore.invocationMap.

Now problem is still there, it does not have struts.token when I double post, I 
still don't understand where did it disappear to?
Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 3:36 AM
To: Struts Users Mailing List
Subject: RE: [S2]Multiple Form Submission

Hey Henan,
In some case I am getting 
Map session = ActionContext.getContext().getSession();
And the session contains a key called 
org.apache.struts2.util.InvocationSessionStore.invocationMap
and the value is Another SessionMap,
whose key value is correct struts.token
and value is the SESSION.

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 1:15 AM
To: Struts Users Mailing List
Subject: RE: [S2]Multiple Form Submission

Hi,
:) Thanks Henan, At least something came up,
It was my mistake I was doing it in all interceptor, now I have to 
extend that interceptor to ignore the values if the session does not exist. It 
ok :)

And they call getters every time also, that also I have to worry, any way 
thanks very much. I really appreciate it :)

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: hernan gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 12:24 AM
To: Struts Users Mailing List
Subject: Re: [S2]Multiple Form Submission

The s:token / should be in the jsp that creates the form that is
submitted to the action (not in the result jsp!), so that the action
can
check for its existence. And the stack with the token interceptor
should be applied only to that action/method.

Hernán J. González
http://hjg.com.ar/


On Wed, Oct 29, 2008 at 4:38 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:
 Hi Wes,
I was not using s:token /
 But after your mail I just added that, and tried
 I have an empty jsp

 %@ taglib prefix=s uri=/struts-tags %
 %@ taglib prefix=t uri=/test %
 html
 head
titleIndex/title
s:head theme=ajax/

 /head
 body
s:token/
 /body
 /html

 This jsp is mapped in index.action

 In struts.xml I have the action mapped which refers to the following 
 interceptor stack
interceptor-stack name=paramsPrepare
interceptor-ref name=token-session/
interceptor-ref name=exception /
interceptor-ref name=alias /
interceptor-ref name=checkbox /
interceptor-ref name=params /
interceptor-ref name=servlet-config /
interceptor-ref name=prepare /
interceptor-ref name=conversionError /
/interceptor-stack

 And action map is like this
action name=index 
 class=com.neolivz.sandbox.action.IndexAction
interceptor-ref name=paramsPrepare/
result/jsp/index.jsp/result
/action

 And ;) it does work without the token-session interceptor :D

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:47 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Can you copy/paste some of your action/jsp/configuration code.

 Are you using the s:token / tag in your form?

 -Wes

 On Wed, Oct 29, 2008 at 2:09 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:
 Hi,
I read that part,
First thing I used token session interceptor, it says it will block 
 subsequent requests until the first request is complete, and then instead of 
 returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
 added this interceptor.

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 

RE: Struts 2.0.12 - XML Validation with Websphere 6.1

2008-10-29 Thread Jishnu Viswanath
Does this help?
https://issues.apache.org/struts/browse/WW-2653

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Struts Developer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 5:22 AM
To: user@struts.apache.org
Subject: Struts 2.0.12 - XML Validation with Websphere 6.1

There was a know issue with struts 2.0.11.2 that the integrated XWork
2.0.5
jar may cause problems when used in a combination of WebSphere 6.1
runtime
environments with validation configuration via XML file.

Is this fixed with struts 2.0.12?. I do not see any information on the
apache website.
Any comments or statements made in this email are not necessarily those of 
Tavant Technologies.
The information transmitted is intended only for the person or entity to which 
it is addressed and may 
contain confidential and/or privileged material. If you have received this in 
error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to 
Tavant Technologies 
may be subject to our monitoring procedures.


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



RE: [S2]Multiple Form Submission

2008-10-29 Thread Jishnu Viswanath
HI,
Did any one worked with s:head theme= and  token-session interceptor?

I mean, in the head.ftl where ever we have @s.url it stops excution of s:head 
there,
This happens only when I try to retrieve back previously executed result

There are 2 things I noticed,
1. If you add s:url in the the jsp it picks up fine, only the @s.url 
is the culprit
@s.property is working fine
2. URLTag never gets called when I load a url @s.url in ftlbut it gets 
called s:url from jsp why is this so? Then how is it getting executed?

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 3:36 AM
To: Struts Users Mailing List
Subject: RE: [S2]Multiple Form Submission

Hey Henan,
In some case I am getting 
Map session = ActionContext.getContext().getSession();
And the session contains a key called 
org.apache.struts2.util.InvocationSessionStore.invocationMap
and the value is Another SessionMap,
whose key value is correct struts.token
and value is the SESSION.

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 1:15 AM
To: Struts Users Mailing List
Subject: RE: [S2]Multiple Form Submission

Hi,
:) Thanks Henan, At least something came up,
It was my mistake I was doing it in all interceptor, now I have to 
extend that interceptor to ignore the values if the session does not exist. It 
ok :)

And they call getters every time also, that also I have to worry, any way 
thanks very much. I really appreciate it :)

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-Original Message-
From: hernan gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 30, 2008 12:24 AM
To: Struts Users Mailing List
Subject: Re: [S2]Multiple Form Submission

The s:token / should be in the jsp that creates the form that is
submitted to the action (not in the result jsp!), so that the action
can
check for its existence. And the stack with the token interceptor
should be applied only to that action/method.

Hernán J. González
http://hjg.com.ar/


On Wed, Oct 29, 2008 at 4:38 PM, Jishnu Viswanath
[EMAIL PROTECTED] wrote:
 Hi Wes,
I was not using s:token /
 But after your mail I just added that, and tried
 I have an empty jsp

 %@ taglib prefix=s uri=/struts-tags %
 %@ taglib prefix=t uri=/test %
 html
 head
titleIndex/title
s:head theme=ajax/

 /head
 body
s:token/
 /body
 /html

 This jsp is mapped in index.action

 In struts.xml I have the action mapped which refers to the following 
 interceptor stack
interceptor-stack name=paramsPrepare
interceptor-ref name=token-session/
interceptor-ref name=exception /
interceptor-ref name=alias /
interceptor-ref name=checkbox /
interceptor-ref name=params /
interceptor-ref name=servlet-config /
interceptor-ref name=prepare /
interceptor-ref name=conversionError /
/interceptor-stack

 And action map is like this
action name=index 
 class=com.neolivz.sandbox.action.IndexAction
interceptor-ref name=paramsPrepare/
result/jsp/index.jsp/result
/action

 And ;) it does work without the token-session interceptor :D

 Regards,

 Jishnu Viswanath

 Software Engineer

 *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

 Tavant Technologies Inc.,

 www.tavant.com

 PEOPLE :: PASSION :: EXCELLENCE


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2008 11:47 PM
 To: Struts Users Mailing List
 Subject: Re: [S2]Multiple Form Submission

 Can you copy/paste some of your action/jsp/configuration code.

 Are you using the s:token / tag in your form?

 -Wes

 On Wed, Oct 29, 2008 at 2:09 PM, Jishnu Viswanath
 [EMAIL PROTECTED] wrote:
 Hi,
I read that part,
First thing I used token session interceptor, it says it will block 
 subsequent requests until the first request is complete, and then instead of 
 returning the invalid.token code
Second there was no double post,  none of my pages are loading when I 
 added this interceptor.

 Regards,

 Jishnu Viswanath

 Software Engineer

 

Re: Struts 2.1.2 client side validation doesn't get generated

2008-10-29 Thread Adam Ruggles

Anyone?  The server side validation works fine, when I post the form it comes
back with the correct validation but the client side is not being generated
because the performValidation is being set to false.

The obvious work around is to edit the form-close-validate.ftl and remove
(parameters.performValidation?default(false) == true), but why does this
performValidation there?  Especially since the form-validate doesn't make
the same check and generates the return function.

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1.2-client-side-validation-doesn%27t-get-generated-tp20221161p20240335.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.1.2 client side validation doesn't get generated

2008-10-29 Thread Adam Ruggles

It looks like this is a Google Guice issue.  When I swapped the guice plugin
for the spring plugin everything worked as expected.
-- 
View this message in context: 
http://www.nabble.com/Struts-2.1.2-client-side-validation-doesn%27t-get-generated-tp20221161p20240986.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]