What Do U think abt this feature

2003-10-19 Thread Puneet Agarwal
Struts Developers,
This is one of my first few mails to this forum. I have been using struts
for almost 2 years now.

In our applications we have been having a need to navigate from one page to
another in a cris-cross manner.
Say a screen J1 could have been called from number of screens J2 to Jn.

On the Page J1 there is a close button or return button which causes the
control to return to the Calling page.

So we need an intellegence in the application to remember the stack of
screens.
We have implemented this by overriding the processActionPerform method of
RequestProcessor Class. There we maintain a java.util.Stack of the
ActionForwards.

And we have also extended the DispatchAction Class, where we have provided
a metod named getCallingForward(). Which returns an actionForward of the
last element in Stack.

If you guys think it can of any use, I shall pass it across.


Regards,
Puneet Agarwal

Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1044)
FAX              : +91-120-246 1521

Struts ... Action ... Struts in Action ... Action in Struts ...
DISCLAIMER: The information contained in this message is intended only and
solely for the addressed individual or entity indicated in this message and
for the exclusive use of the said addressed individual or entity indicated
in this message (or responsible for delivery of the message to such person)
and may contain legally privileged and confidential information belonging
to Tata Consultancy Services. It must not be printed, read, copied,
disclosed, forwarded, distributed or used (in whatsoever manner) by any
person other than the addressee. Unauthorized use, disclosure or copying is
strictly prohibited and may constitute unlawful act and can possibly
attract legal action, civil and/or criminal. The contents of this message
need not necessarily reflect or endorse the views of Tata Consultancy
Services on any subject matter. Any action taken or omitted to be taken
based on this message is entirely at your risk and neither the originator
of this message nor Tata Consultancy Services takes any responsibility or
liability towards the same. Opinions, conclusions and any other information
contained in this message that do not relate to the official business of
Tata Consultancy Services shall be understood as neither given nor endorsed
by Tata Consultancy Services or any affiliate of Tata Consultancy Services.
If you have received this message in error, you should destroy this message
and may please notify the sender by e-mail. Thank you.


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



Re: Multiple form-beans and Action class

2003-10-19 Thread Ted Husted
The controller will only populate a single ActionForm for each 
ActionMapping. At least automatically. The HttpServerRequest is passed 
to your Action, so you could always populate some others if you like. 
See the code in the RequestProcessor to see how the controller does it.

Depending on your circumstances, another approach is to use a 
coarse-grained ActionForm class that uses all the properties your 
application (or module) uses at one time. You can then setup different 
form-bean names to specify different validations for various pageflows.

HTH, Ted.

[EMAIL PROTECTED] wrote:

Hi,

Is it possible to point multiple form beans to the same action within struts-config file? Kindly let me know using an example.

Cheers,
Nitin
Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

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

--
Ted Husted,
  Junit in Action  - http://www.manning.com/massol/,
  Struts in Action - http://husted.com/struts/book.html,
  JSP Site Design  - http://www.amazon.com/exec/obidos/ISBN=1861005512.
Get Ready, We're Moving Out!! - http://www.clark04.com



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


cvs commit: jakarta-struts/doc/userGuide preface.xml

2003-10-19 Thread husted
husted  2003/10/19 05:28:00

  Modified:doc  status.xml
   doc/news index.xml
   doc/resources extensions.xml related.xml resources.xml
utilities.xml
   doc/userGuide preface.xml
  Log:
  Routine updates.
  
  Revision  ChangesPath
  1.47  +2 -2  jakarta-struts/doc/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/status.xml,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- status.xml18 Oct 2003 02:45:52 -  1.46
  +++ status.xml19 Oct 2003 12:28:00 -  1.47
  @@ -443,7 +443,7 @@
   /section
   
   section
  -p class=versionWebsite updated from CVS: 2003 SEP 14 by husted./p
  +p class=versionWebsite updated from CVS: 2003 OCT 19 by husted./p
   p class=versionJavadocs updated from CVS: 2003 SEP 14 by husted./p
   /section
   
  
  
  
  1.33  +127 -0jakarta-struts/doc/news/index.xml
  
  Index: index.xml
  ===
  RCS file: /home/cvs/jakarta-struts/doc/news/index.xml,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- index.xml 15 Sep 2003 00:33:03 -  1.32
  +++ index.xml 19 Oct 2003 12:28:00 -  1.33
  @@ -65,6 +65,133 @@
   hr/
   --
   
  +h4 id=a2003101717 Oct 2003 - Spring Framework Integration Library for 
Struts/h4
  +p
  +This project integrates the Spring Framework's Inversion of Control 
(IoC)
  +into Struts 1.1+. It allows a Struts application to take advantage of 
IoC
  +with little or no references to Spring. Now, instead of relying on
  +singletons and static factories, Struts actions can have their
  +dependencies automatically resolved.
  +/p
  +
  +p
  +The integration uses Spring to create and populate Struts actions, using
  +IoC to resolve dependencies. It does NOT use a custom request processor
  +and therefore can be more easily used with existing web applications
  +and/or other Struts extensions.
  +/p
  +
  +p
  +To demonstrate the project, I modified the Struts-Example web app that 
is
  +distributed with Struts 1.1 to use Spring to resolve all UserDatabase
  +dependencies automatically. I invite any comments and suggestions.
  +/p
  +
  +p
  +Website:  a 
href=http://www.twdata.org/struts-spring;http://www.twdata.org/struts-spring/a
  +/p
  +p
  +   Download: a 
href=http://www.twdata.org/struts-spring/struts-spring-0.1.zip;http://www.twdata.org/struts-spring/struts-spring-0.1.zip/a
  +/p
  +p
  +Spring:   a 
href=http://www.springframework.org;http://www.springframework.org/a
  +/p
  +p
  +PS. This functionality adds under 100k to a Struts application
  +/p
  +hr/
  +
  +h4 id=a200310062003-10-06 - New Eclpse-based Struts Studio 5.0 - must 
see tool!/h4
  +p
  +Here is a good new plugin for Eclipse specially designed for Struts and 
JSP development.
  +/p
  +p
  +Key Features:
  +/p
  +ul
  +li
  +  Based on Eclipse Development Platform.
  +/lili
  +  Supports both Struts 1.1 (latest version) and Struts 1.0
  +/lili
  +  Allows viewing and editing Struts configuration files using Web Flow, 
a tool for the visual development of Web applications using a drag-and- connect 
metaphor
  +  /lili
  +  Includes a built-in JSP editor with syntax highlighting, and two-way 
coordination with Web Flow
  +  /lili
  +  Includes a one-click library of Struts-specific tags in the 
built-in JSP editor
  +  /lili
  +  Allows editing in Web Flow before finishing JSP coding
  +  /lili
  +  Integrates with Tomcat Servlet engines for easy preview and running 
of Struts applications
  +  /lili
  +  Integrates with Ant for easy project control
  +  /lili
  +  Allows to import of pre-existing Struts projects into Exadel Struts 
Studio with intelligent auto-placement of the components in Web Flow and without any 
modifications required for the existing code
  +  /lili
  +  Includes a Code Wizard that automatically creates stub code for 
Action, FormBean, Forward, and Exception classes
  +  /lili
  +  Includes standard skeleton templates for new projects
  +  /lili
  +  Ability to edit templates for new code generation
  +  /li
  +/ul
  +p
  

Bug report for Struts [2003/10/19]

2003-10-19 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  866|New|Enh|2001-03-06|Clean Way to Add Parameters to Redirecting Forward|
| 3202|Opn|Enh|2001-08-21|OptionsTag.doEndTag - calls method to populate se|
| 5395|Opn|Enh|2001-12-12|ActionContext class   |
| 5566|New|Enh|2001-12-21|html:link bug |
| 5739|Opn|Enh|2002-01-08|Struts fails silently in too many places  |
| 5937|New|Enh|2002-01-21|html:form trims all extensions|
| 6686|New|Enh|2002-02-26|make action attribute of html:form tag optional |
| 6847|Opn|Enh|2002-03-04|Multiple file upload not possible due to MultiPart|
| 7062|Opn|Enh|2002-03-12|nested:iterate and logic:iterate -- add odd/even a|
| 7892|Opn|Enh|2002-04-09|Using Multiple Resource Bundles for an Application|
| 7902|Opn|Enh|2002-04-10|The exception handling declaration in the DTD does|
| 9088|Opn|Enh|2002-05-15|FormTag.getActionMappingURL() assumes 1 servlet ma|
| 9616|New|Enh|2002-06-05|Some more Struts docs |
| 9748|New|Enh|2002-06-10|attribute labelKeyProperty for Options tag|
| 9949|Opn|Enh|2002-06-18|Suggest, a 'multiple' attribute for the logic:pre|
|10027|Opn|Enh|2002-06-19|Locked file struts.jar after Tomcat manager/stop a|
|10550|New|Enh|2002-07-08|Delegate path-management to ActionForwards|
|10551|Opn|Enh|2002-07-08|Allow a struts-config element to extend another   |
|10552|New|Enh|2002-07-08|create helper objects in struts-config|
|10867|Opn|Enh|2002-07-16|Add indexedProperty attribute in html taglibs |
|11154|Opn|Enh|2002-07-25|html:link tag extension for multiple parameters   |
|11402|Opn|Enh|2002-08-02|Add enhanced support for multiple parameters to th|
|11733|Opn|Enh|2002-08-15|Make error keys more specific |
|12170|Opn|Enh|2002-08-29|Added functionality when extending another definit|
|12301|Opn|Enh|2002-09-04|nested:messages Tag does not work as expected |
|12313|Opn|Enh|2002-09-04|Chaining of RequestProcessors--contribution   |
|12342|New|Enh|2002-09-05|Add default exception handler attribute to global|
|12600|New|Enh|2002-09-12|html:form tag always prepends context path to acti|
|13125|Opn|Enh|2002-09-30|Lack of character-set while using  html:html  ta|
|13521|New|Enh|2002-10-11|CombinedDispatchAction|
|13544|Opn|Enh|2002-10-11|[exception] support contextRelative paths |
|13565|Opn|Enh|2002-10-12|To errors, add prefix, suffix, header, footer at|
|13638|Opn|Enh|2002-10-15|add Config Factory|
|13809|Opn|Enh|2002-10-21|Struts configuration is not validated after use   |
|14068|Opn|Enh|2002-10-29|Why can't I use forwards with exception elements i|
|14071|Opn|Enh|2002-10-29|Need clear info on which Struts attributes produce|
|14183|New|Enh|2002-11-01|html:img does not support forward attribute   |
|14471|Opn|Nor|2002-11-12|validator-rules.xml JavaScript fails when field no|
|14749|Opn|Enh|2002-11-21|Action input not starting with '/' and not a val|
|15023|Opn|Enh|2002-12-03|Use attribute 'id' instead of 'name' in html:form-|
|15188|Opn|Enh|2002-12-09|roles attribute of tags and definitions only allow|
|15422|Opn|Enh|2002-12-17|Form Tag exportFormName  attribute|
|15805|Opn|Enh|2003-01-05|Enhance ModuleException to allow getting chained E|
|15912|Opn|Enh|2003-01-09|Client-side validation fails if not all form-field|
|15921|Opn|Enh|2003-01-09|Allow relative actions in struts-config.xml   |
|16074|New|Enh|2003-01-14|html:form uses 'action' not 'input' to select mapp|
|16401|New|Enh|2003-01-24|ActionValidatorUtil   |
|16603|Opn|Enh|2003-01-30|controller forwardPattern should support differe|
|16634|New|Enh|2003-01-31|reuiredif ignores missing property|
|16708|New|Enh|2003-02-03|I18N on ActionForwards|
|16783|Opn|Nor|2003-02-04|stop and start ( restart) application |

Re: What Do U think abt this feature

2003-10-19 Thread john sessler
Hello Puneet,
Your extension looks useful to me. Thats just my opinion; others will decide whether 
your ideas and code become part of Struts.
 
If your design includes a new request processor then it should work for
anyone needing your functionality and not needing the functionality provided by some 
other request processor. This can be a go or no go decision for some applications.
 
I see that you have overriden the processActionPerform method of the
request processor. There is ongoing work and discussion, much of it recent, on how to 
best facilitate action invocation and control flow within the Struts environment. I 
would be interested in seeing your implementation of the processActionPerform method 
but, again, only from a curiosity standpoint.
 
John A. Sessler

Puneet Agarwal [EMAIL PROTECTED] wrote:
Struts Developers,
This is one of my first few mails to this forum. I have been using struts
for almost 2 years now.

In our applications we have been having a need to navigate from one page to
another in a cris-cross manner.
Say a screen J1 could have been called from number of screens J2 to Jn.

On the Page J1 there is a close button or return button which causes the
control to return to the Calling page.

So we need an intellegence in the application to remember the stack of
screens.
We have implemented this by overriding the processActionPerform method of
RequestProcessor Class. There we maintain a java.util.Stack of the
ActionForwards.

And we have also extended the DispatchAction Class, where we have provided
a metod named getCallingForward(). Which returns an actionForward of the
last element in Stack.

If you guys think it can of any use, I shall pass it across.


Regards,
Puneet Agarwal

Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1044)
FAX  : +91-120-246 1521

Struts ... Action ... Struts in Action ... Action in Struts ...
DISCLAIMER: The information contained in this message is intended only and
solely for the addressed individual or entity indicated in this message and
for the exclusive use of the said addressed individual or entity indicated
in this message (or responsible for delivery of the message to such person)
and may contain legally privileged and confidential information belonging
to Tata Consultancy Services. It must not be printed, read, copied,
disclosed, forwarded, distributed or used (in whatsoever manner) by any
person other than the addressee. Unauthorized use, disclosure or copying is
strictly prohibited and may constitute unlawful act and can possibly
attract legal action, civil and/or criminal. The contents of this message
need not necessarily reflect or endorse the views of Tata Consultancy
Services on any subject matter. Any action taken or omitted to be taken
based on this message is entirely at your risk and neither the originator
of this message nor Tata Consultancy Services takes any responsibility or
liability towards the same. Opinions, conclusions and any other information
contained in this message that do not relate to the official business of
Tata Consultancy Services shall be understood as neither given nor endorsed
by Tata Consultancy Services or any affiliate of Tata Consultancy Services.
If you have received this message in error, you should destroy this message
and may please notify the sender by e-mail. Thank you.


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


-
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

DO NOT REPLY [Bug 23924] New: - Enhanced performance for TagUtils.filter()

2003-10-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924

Enhanced performance for TagUtils.filter()

   Summary: Enhanced performance for TagUtils.filter()
   Product: Struts
   Version: Nightly Build
  Platform: All
OS/Version: All
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Custom Tags
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The TagUtils.filter() method, which replaces certain characters with
corresponding XML entity references, can be easily enhanced to run much faster
and require less memory.

To summarize it can be made faster in two ways:

* Instead of building up the escape string character by character, with a call
to StringBuffer.append() for each character, it can be rewritten to copy chunks
of input at a time, avoiding many method calls, which is most of the overhead of
this method.

* In fact the method does not even need to allocate a StringBuffer until it
knows that some character in the input must be escaped. In the common case where
the input has no such characters, this avoids allocating any additional memory
at all.

Performance improvements is large when the string has no characters to be
escaped -- 1000% or more on the small and medium-sized strings I tested on. It
offers more modest improvement when the string has some escapable characters --
50-100% on small and medium-sized strings. It is only slower in contrived cases
like .

While it is a small method, it is called many times by the Struts framework.
This is an easy and reliable change to squeeze out a little better performance
in time and memory for all applications.

Note that I created a JUnit test for this change (included) in order to verify
that the new method works as well as the current one.

Please find attached files which implement this enhancement:
* TagUtils.patchfile.txt
  Patch against the 10/19/2003 nightly build to implement the change to filter()
* TestTagUtils
  A new JUnit test case covering the filter() method
* build-test.xml.patchfile.txt
  Patch against the 10/19/2003 build-test.xml file to invoke TestTagUtils

I posted this change to the list once before with no result -- I hope this even
better version, with unit test this time, can be considered for inclusion in
Struts -- thanks!

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



DO NOT REPLY [Bug 23924] - Enhanced performance for TagUtils.filter()

2003-10-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924

Enhanced performance for TagUtils.filter()





--- Additional Comments From [EMAIL PROTECTED]  2003-10-19 19:39 ---
Created an attachment (id=8624)
Performance enhancement for TagUtils.filter()

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



DO NOT REPLY [Bug 23924] - Enhanced performance for TagUtils.filter()

2003-10-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924

Enhanced performance for TagUtils.filter()





--- Additional Comments From [EMAIL PROTECTED]  2003-10-19 19:39 ---
Created an attachment (id=8625)
New unit test for TagUtils.filter()

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



DO NOT REPLY [Bug 23924] - Enhanced performance for TagUtils.filter()

2003-10-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924

Enhanced performance for TagUtils.filter()





--- Additional Comments From [EMAIL PROTECTED]  2003-10-19 19:40 ---
Created an attachment (id=8626)
Patch for build-tests.xml to invoke new TestTagUtils unit test

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



HOWTO for Dispatch and Validator

2003-10-19 Thread Afshartous, Nick
Title: HOWTO for Dispatch and Validator






In discussion of this enhancement


 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17306.


it was suggested that someone write a HOWTO for using the
DispatchAction and Validator together. 


I gave it a go and the HOWTO is attached.


--
 Nick






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

DO NOT REPLY [Bug 23924] - Enhanced performance for TagUtils.filter()

2003-10-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924

Enhanced performance for TagUtils.filter()

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2003-10-20 03:30 ---
Sean, thanks for the patches. I definitely appreciate the way you presented your
case. 

I ran some benchmarks of my own and while your version is certainly quicker, I
don't think that the existing version is so slow that it causes any problems in
a real-world application. I would prefer to keep the existing version, because
it is simpler and therefore easier to understand and maintain.

If you can demonstrate how this would make a difference in a practical
situation, please re-open this ticket, but for now I wouldn't want to make the
change.

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



Re: What Do U think abt this feature

2003-10-19 Thread Puneet Agarwal

Hi John,
Find below the code snippet(Please ignore mistakes, I am a novice...), that
you have desired,
I agree that some people may require this and some may not, and thanks for
your motivating gesture.


I have added following lines of code in the end of processActionPerform, (
after calling super.processActionPerform)
We maintain an object named UserContext in the session scope. here it has
been obtained with the name uc

 ActionForward af = super.processActionPerform(request, response, action,
form, mapping);
 Stack fwdStack = uc.getActionFwdStack();
if ( fwdStack.size() == 0 )
{
  fwdStack.push(af.getPath());
}
  else if (!((String)fwdStack.lastElement()).equals(af.getPath()))
{
  fwdStack.push(af.getPath());
}



I have provided following method in the overridden DispatchAction class.

  public ActionForward getCallingForward(HttpServletRequest request)
  {
UserContext uc = getUserContext(request);
Stack fwdStack   = uc.getActionFwdStack();
if ( fwdStack.size()  0 )
{
  fwdStack.pop();
}
String stPath= (String)fwdStack.peek();
ActionForward af = new ActionForward(CallingPage, stPath, false);
return af;
  }

Regards,
Puneet Agarwal

Tata Consultancy Services,
C-56, Phase - II, NOIDA 201305 (India)
Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1044)
FAX              : +91-120-246 1521

Struts ... Action ... Struts in Action ... Action in Struts ...


   

john sessler   

jqualityone@To: Struts Developers List [EMAIL 
PROTECTED]
yahoo.com   cc:   

 Subject: Re: What Do U think abt this 
feature 
10/19/03   

10:13 PM   

Please 

respond to 

Struts

Developers 

List  

   

   





Hello Puneet,
Your extension looks useful to me. Thats just my opinion; others will
decide whether your ideas and code become part of Struts.

If your design includes a new request processor then it should work for
anyone needing your functionality and not needing the functionality
provided by some other request processor. This can be a go or no go
decision for some applications.

I see that you have overriden the processActionPerform method of the
request processor. There is ongoing work and discussion, much of it recent,
on how to best facilitate action invocation and control flow within the
Struts environment. I would be interested in seeing your implementation of
the 

DO NOT REPLY [Bug 23924] - Enhanced performance for TagUtils.filter()

2003-10-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23924

Enhanced performance for TagUtils.filter()

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |



--- Additional Comments From [EMAIL PROTECTED]  2003-10-20 05:19 ---
Thanks a lot for your consideration and feedback -- this is my first attempt to 
contribute. As per 
your message, let me risk being a bother and just present an argument that the benefit 
is non-
trivial, and re-open this. If you still disagree then please re-close it with my 
apologies.

I think the new method is still pretty straightforward and maintainable -- after all I 
included unit 
tests to verify any changes. So, I don't necessarily see that as a problem; if these 
ekes out even a 
little bit more performance, automatically for any Struts app, then I think it's worth 
doing (but of 
course I think that, or I wouldn't have bothered).

If anything it is the memory allocation, actually. How about this back-of-the-envelope 
calculation 
-- this method is called by bean:write and most HTML form tags (including 
html:options, mind). In 
a medium-sized Struts app maybe this translates into 20-50 calls to this method 
averaged over all 
pages? (On this Bugzilla bug page, it would be over 200, with all the select inputs.)

The allocation per method that can almost always be avoided amounts to 3 objects and 
70 bytes in 
total, at minimum.

So the avoidable overhead is maybe 1.4-3.5kbytes per page view? A moderately busy site 
might 
get 400 page views per minute? So we're looking at avoiding allocation of maybe 
0.5-1.5MB per 
minute, 24,000-72,000 objects? Sure, less for small apps but more for large enterprise 
apps.

That's not big and basically all can be GC'ed, but not trivial. But from the user's 
perspective -- 
would you like your Struts app to be automatically a very little bit faster and use a 
little less 
memory? Is it worth us reliably optimizing one method? I'd say so, but leave it to you 
to decide 
whether that's so.

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