Re: sorting problem with display tag: please help

2008-07-26 Thread dusty

So what the others are saying is that you should NEVER use chopsticks when
you are eating soup

No just kidding.  Depending on what version of struts you are using you
likely need a 
s:set name=listOfEmployee value=listOfEmployee/ before the display
tag.  

Otherwise your decorator could be messed up in which case you are back to
eating soup with chopsticks.



Varun Deep wrote:
 
 Hi 
  
 I am using the display tag for displaying the employee names . I want to
 short the names of the employee.
  
 Following is the code that is in .jsp file.
  
 %@ taglib prefix=display uri=http://displaytag.sf.net%
  
 display:table id=displaycolumn name=listOfEmployee
   pagesize=6 requestURI=searchEmployeeByDep.action
   decorator=com.unclejis.action.restaurant.DisplayDecorator
 align=left sort=external defaultsort=1 
  
   display:column property=name title=Name sortable=true /
 /display:table
  
  
  
 when I use the above code nothing is display. Can anyone please help me
 to solve this problem. I will be vary thankful.
  
 Thanks in advance
 varun
  
  
 
 

-- 
View this message in context: 
http://www.nabble.com/sorting-problem-with-display-tag%3A-please-help-tp18646452p18663908.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]



Data Leakage in Struts 2

2008-07-26 Thread Arun M

We are using struts 2.0.11

We have lots of action class. Say one of them is CustomerRegisterAction
(which extends ActionSupport  ) . When a say user  X registers himself on
the website; this CustomerRegisterAction is populated (using OGNL) and the
customer data is saved to DB. But after sometime some other user Y from some
other PCcomes and clicks the Register link, then the data entered by X is
prefilled now.
   I think the CustomerRegisterAction is reused, instead of creating new
instance every request.  we want to setup such that new
CustomerRegisterAction is created every httprequest, so that data is not
leaking between users. 

Please help us.
-- 
View this message in context: 
http://www.nabble.com/Data-Leakage-in-Struts-2-tp18669314p18669314.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: Data Leakage in Struts 2

2008-07-26 Thread Piero Sartini
Struts2 does create a new Action for every request.
Do you use Spring? I think you can configure it to reuse the beans...

Piero

Am Samstag, 26. Juli 2008 19:48:47 schrieb Arun M:
 We are using struts 2.0.11

 We have lots of action class. Say one of them is CustomerRegisterAction
 (which extends ActionSupport  ) . When a say user  X registers himself on
 the website; this CustomerRegisterAction is populated (using OGNL) and the
 customer data is saved to DB. But after sometime some other user Y from
 some other PCcomes and clicks the Register link, then the data entered by X
 is prefilled now.
I think the CustomerRegisterAction is reused, instead of creating new
 instance every request.  we want to setup such that new
 CustomerRegisterAction is created every httprequest, so that data is not
 leaking between users.

 Please help us.

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



Re: [S2] Form doesn't redirect

2008-07-26 Thread Dhiraj Thakur
r u getting any error?

Regards,
Dhiraj

On Fri, Jul 25, 2008 at 9:29 PM, Milan Milanovic
[EMAIL PROTECTED]wrote:


 Hi,

 I have two forms in my .jsp page which are connected to one Action class.
 They both works fine, but when user submit second form, method in action
 class
 is called, but no redirection to resulting .jsp page (as defined GOOD in
 struts.xml) is done ?

 This is my (second) form:

 s:form action=save validate=false
s:textfield id=value tabindex=1 label=Value name=value/
s:submit theme=ajax tabindex=2 cssStyle=submit
 cssClass=submit
 align=right value=Save/
 /s:form

 and this is from struts.xml:

 action name=save class=myActionClass method=save
result/pages/firstPage.jsp/result
 /action

 --
 Thx, Milan

 --
 View this message in context:
 http://www.nabble.com/-S2--Form-doesn%27t-redirect-tp18654630p18654630.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: Problem accessing iterated object (s:iterator)

2008-07-26 Thread Dhiraj Thakur
try using jstl


c:forEach items=${lawDraft} var=document
c:out value=${document.title}/c:out
/c:forEach


Regards,
Dhiraj

On Wed, Jul 23, 2008 at 9:50 PM, Lukasz Lenart [EMAIL PROTECTED]
 wrote:

  I don't think the var will work always, ie I am using struts 2.0.6
  The webworl.tld does not contain the var.

 var was introduced with Struts 2.1 and id was depreacted


 Regards
 --
 Lukasz
 http://www.lenart.org.pl/

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




[struts2] tabbedpanel bug? Remote content retrieved 2/3 times

2008-07-26 Thread Bruyn, Bill
Using Struts 2.0.11, the following markup causes goodbyeWorld's execute
method to be called twice:

sx:tabbedpanel id=tabContainer  

   s:url action=goodbyeWorld id=url/
   sx:div label=Tab 1 href=%{#url}Remote Tab/sx:div   

   sx:div label=Tab 2Local Tab/sx:div 
/sx:tabbedpanel

When the remote content follows the local content (Tab 1 is placed after
Tab 2), it's called just once.

Switch out the libraries and change the tags accordingly to use 2.1.2
syntax, and I think you'll find that remote content on tab 1 calls the
action 3 times.  Remote content on tab 2 is called twice.


Bill
-
Win XP
IE6/FF2/Safari 3.1
Tomcat 6.0.16
JDK 1.5.0_06
Struts 2.0.11 / 2.1.2 (binary)


?xml version=1.0 encoding=UTF-8?
web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns=http://java.sun.com/xml/ns/javaee;
xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; id=WebApp_ID
version=2.5
  display-namehello/display-name
  filter
filter-namestruts2/filter-name
 
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-cla
ss
  /filter
  filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
  /filter-mapping
/web-app



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

struts
package name=base-package namespace=/ extends=struts-default
action name=helloWorld class=hello.HelloWorld
resulthelloWorld.jsp/result
/action
action name=goodbyeWorld class=goodbye.GoodbyeWorld
resultgoodbyeWorld.jsp/result
/action
/package
/struts



package hello;

import com.opensymphony.xwork2.ActionSupport;

public class HelloWorld extends ActionSupport {

private String message = Hello World!;

public String getMessage() {
return message;
}

@Override
public String execute() throws Exception {
System.out.println(message);
return SUCCESS;
}
}



%@ taglib prefix=s uri=/struts-tags %
%@ taglib prefix=sx uri=/struts-dojo-tags %
html
head
sx:head debug=true/
/head
body

sx:tabbedpanel id=tabContainer  

   sx:div label=Local
s:property value=message/
   /sx:div 

   s:url action=goodbyeWorld id=url/
   sx:div label=Remote href=%{#url}/   
 
/sx:tabbedpanel

/body 
/html



package goodbye;

import com.opensymphony.xwork2.ActionSupport;

public class GoodbyeWorld extends ActionSupport {

private String message = Goodbye, World!;

public String getMessage() {
return message;
}

@Override
public String execute() throws Exception {

System.out.println(message);
return super.execute();
}
}



%@ taglib prefix=s uri=/struts-tags %
html
head/
body
s:property value=message/
/body
/html

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



RE: website link info

2008-07-26 Thread Martin Gainty

which version of struts are you working with..?

Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 25 Jul 2008 10:55:00 -0500
 From: [EMAIL PROTECTED]
 To: user@struts.apache.org
 Subject: Re: website link info
 
 Thanks,
 
 Jeromy Evans wrote:
  Fini Decima wrote:
  I'm posting here because I could not find a Web Master contact info:
 
  I'll like to know when the Reporting Security Issues link was added 
  to the Struts home page.The link is under Support. Is it a recent 
  addition or has it been there for some time?
 
  Subversion shows the link and page were added on 27 August 2007.
 
 
  -
  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]
 

_
With Windows Live for mobile, your contacts travel with you.
http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072008

RE: website link info

2008-07-26 Thread Dave Newton
--- On Sat, 7/26/08, Martin Gainty [EMAIL PROTECTED] wrote:
 which version of struts are you working with..?

I'm not sure that it matters; it's a link on the Struts home page.

Dave

  Jeromy Evans wrote:
   Fini Decima wrote:
   I'm posting here because I could not find
 a Web Master contact info:
  
   I'll like to know when the
 Reporting Security Issues link was added 
   to the Struts home page.The link is under
 Support. Is it a recent 
   addition or has it been there for some time?
  
   Subversion shows the link and page were added on
 27 August 2007.
  
  
  
 -
   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]
  
 
 _
 With Windows Live for mobile, your contacts travel with
 you.
 http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072008

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



Re: Data Leakage in Struts 2

2008-07-26 Thread Richard Yee

Why don't you post your code. It seems that it might have a threading issue.

-R

Arun M wrote:

We are using struts 2.0.11

We have lots of action class. Say one of them is CustomerRegisterAction
(which extends ActionSupport  ) . When a say user  X registers himself on
the website; this CustomerRegisterAction is populated (using OGNL) and the
customer data is saved to DB. But after sometime some other user Y from some
other PCcomes and clicks the Register link, then the data entered by X is
prefilled now.
   I think the CustomerRegisterAction is reused, instead of creating new
instance every request.  we want to setup such that new
CustomerRegisterAction is created every httprequest, so that data is not
leaking between users. 


Please help us.
  



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



Re: Data Leakage in Struts 2

2008-07-26 Thread Arun M

Yes , we are using spring and hibernate also along with struts.
Could you suggest us, where to configure to resue the beans ??


Piero Sartini-3 wrote:
 
 Struts2 does create a new Action for every request.
 Do you use Spring? I think you can configure it to reuse the beans...
 
   Piero
 
 Am Samstag, 26. Juli 2008 19:48:47 schrieb Arun M:
 We are using struts 2.0.11

 We have lots of action class. Say one of them is CustomerRegisterAction
 (which extends ActionSupport  ) . When a say user  X registers himself on
 the website; this CustomerRegisterAction is populated (using OGNL) and
 the
 customer data is saved to DB. But after sometime some other user Y from
 some other PCcomes and clicks the Register link, then the data entered by
 X
 is prefilled now.
I think the CustomerRegisterAction is reused, instead of creating new
 instance every request.  we want to setup such that new
 CustomerRegisterAction is created every httprequest, so that data is not
 leaking between users.

 Please help us.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Data-Leakage-in-Struts-2-tp18669314p18673188.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: Data Leakage in Struts 2

2008-07-26 Thread Miguel
Be shure that your web beans are marked scope=propotype in the
spring configuration files; that makes spring create a new bean each
time you need one instead of providing a pointer to the existing
instance.
Spring defaults to singletons so don't mark prototype things like DAOs
or service classes that don't have persistence state between methods.


Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco S.



On Sat, Jul 26, 2008 at 23:04, Arun M [EMAIL PROTECTED] wrote:

 Yes , we are using spring and hibernate also along with struts.
 Could you suggest us, where to configure to resue the beans ??


 Piero Sartini-3 wrote:

 Struts2 does create a new Action for every request.
 Do you use Spring? I think you can configure it to reuse the beans...

   Piero

 Am Samstag, 26. Juli 2008 19:48:47 schrieb Arun M:
 We are using struts 2.0.11

 We have lots of action class. Say one of them is CustomerRegisterAction
 (which extends ActionSupport  ) . When a say user  X registers himself on
 the website; this CustomerRegisterAction is populated (using OGNL) and
 the
 customer data is saved to DB. But after sometime some other user Y from
 some other PCcomes and clicks the Register link, then the data entered by
 X
 is prefilled now.
I think the CustomerRegisterAction is reused, instead of creating new
 instance every request.  we want to setup such that new
 CustomerRegisterAction is created every httprequest, so that data is not
 leaking between users.

 Please help us.

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




 --
 View this message in context: 
 http://www.nabble.com/Data-Leakage-in-Struts-2-tp18669314p18673188.html
 Sent from the Struts - User mailing list archive at Nabble.com.


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



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



Re: Data Leakage in Struts 2

2008-07-26 Thread Piero Sartini
Am Sonntag, 27. Juli 2008 06:04:46 schrieb Arun M:
 Yes , we are using spring and hibernate also along with struts.
 Could you suggest us, where to configure to resue the beans ??

The spring plugin is described in detail at 
http://struts.apache.org/2.x/docs/spring-plugin.html
I am not using spring and do not know it very well.

If you do not create your action with struts2 but with Spring, try s.th. like
bean id=bar class=com.my.BarAction singleton=false/
oin your applicationContext.xml

Piero

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



Re: Data Leakage in Struts 2

2008-07-26 Thread Miguel
Well, the question is if you are using Spring 1.x or 2.x and creating
spring beans (using the spring plugin and in your struts.xml using the
spring bean name instead of the full class name):
If you are using the 1.x version, do as said by Piero Sartini
(singleton=false) in your application-context.xml
If you are using the 2.x version use scope=prototype in your
application-context.xml

If you are not using the spring plugin or using the spring object
factory to autowire the beans (via the autowire by name or type of the
spring plugin configured in struts.xml), you can allways create a
preparable bean (implements Preparable) and in the prepare() method,
clear what you need; or you can additionally use the
ParamsPrepareParams stack to do more complicated stuff.

Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco S.



On Sat, Jul 26, 2008 at 23:21, Piero Sartini [EMAIL PROTECTED] wrote:
 Am Sonntag, 27. Juli 2008 06:04:46 schrieb Arun M:
 Yes , we are using spring and hibernate also along with struts.
 Could you suggest us, where to configure to resue the beans ??

 The spring plugin is described in detail at
 http://struts.apache.org/2.x/docs/spring-plugin.html
 I am not using spring and do not know it very well.

 If you do not create your action with struts2 but with Spring, try s.th. like
 bean id=bar class=com.my.BarAction singleton=false/
 oin your applicationContext.xml

Piero

 -
 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: Data Leakage in Struts 2

2008-07-26 Thread dusty

I think you need to post the relevant section from struts.xml so we can see
how you declare the action as well as your spring configuration files.

-D


Miguel-55 wrote:
 
 Well, the question is if you are using Spring 1.x or 2.x and creating
 spring beans (using the spring plugin and in your struts.xml using the
 spring bean name instead of the full class name):
 If you are using the 1.x version, do as said by Piero Sartini
 (singleton=false) in your application-context.xml
 If you are using the 2.x version use scope=prototype in your
 application-context.xml
 
 If you are not using the spring plugin or using the spring object
 factory to autowire the beans (via the autowire by name or type of the
 spring plugin configured in struts.xml), you can allways create a
 preparable bean (implements Preparable) and in the prepare() method,
 clear what you need; or you can additionally use the
 ParamsPrepareParams stack to do more complicated stuff.
 
 Si quieres ser más positivo, pierde un electrón
 Miguel Ruiz Velasco S.
 
 
 
 On Sat, Jul 26, 2008 at 23:21, Piero Sartini [EMAIL PROTECTED]
 wrote:
 Am Sonntag, 27. Juli 2008 06:04:46 schrieb Arun M:
 Yes , we are using spring and hibernate also along with struts.
 Could you suggest us, where to configure to resue the beans ??

 The spring plugin is described in detail at
 http://struts.apache.org/2.x/docs/spring-plugin.html
 I am not using spring and do not know it very well.

 If you do not create your action with struts2 but with Spring, try s.th.
 like
 bean id=bar class=com.my.BarAction singleton=false/
 oin your applicationContext.xml

Piero

 -
 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/Data-Leakage-in-Struts-2-tp18669314p18673505.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]