Author Login
Post Reply
user Digest 10 Jul 2009 16:34:21 -0000 Issue 8743
Topics (messages 200552 through 200577):
Re: <s:actionerrors> not displaying errors!
200552 by: Martin Gainty
Validation performance
200553 by: Mitch Claborn
Re: dynamic return when validation failed
200554 by: mailtolouis2020-struts.yahoo.com
200556 by: Martin Gainty
Stripping Out Characters
200555 by: Ratner Glenn A
Re: Ajax tags -- how to return a message to a specific DIV?
200557 by: fireapple
200568 by: Pawe³ Wielgus
Struts 2 Plug-in and JSP 404
200558 by: stanlick
200559 by: Dale Newfield
200560 by: stanlick
200561 by: Dale Newfield
200562 by: Musachy Barroso
200563 by: Musachy Barroso
200564 by: stanlick
200565 by: stanlick
Re: Getting OPTGROUP items to appear in the right order within a larger top-level SELECT list
200566 by: Oscar Alvarez
Struts, WebSphere, browser tabs
200567 by: jhi
Actions are not Garbage Collected
200569 by: Anselmo
200570 by: Musachy Barroso
200571 by: Musachy Barroso
200572 by: Dale Newfield
200577 by: Martin Gainty
Passing runtime exp into tag
200573 by: Peter Bliznak
Help with JSP and javascript
200574 by: Security Management
200575 by: Wes Wannemacher
preselect value for radio tag
200576 by: Bhaarat Sharma
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_200552.ezm (zipped)
if you could display the jsp we could see
the actual component for the HTML id="err"
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Thu, 9 Jul 2009 15:21:04 +0200
> From: rgw@(protected)
> To: user@(protected)
> Subject: Re: <s:actionerrors> not displaying errors!
>
> My first guess would be that you are not properly dispatching back to
> your input page. A closer look at your struts.xml would clarify this,
> though.
>
> Robert
>
> Kavita Mehta schrieb:
> > Hi,
> > I am using Struts 2.0 and I am not able to display the action errors in
> > my JSP.
> >
> > Action class code :
> >
> > if( ( getSelectedlocation() == null ) || getSelectedlocation().compareTo(
> > "" ) == 0
> > && ( (getLocation() == null ) ||(
> > getLocation().compareTo( "" ) == 0 )))
> > {
> > mLog.warn( "Location not
> > specified. Added Error message" );
> > addActionError( "Please specify a
> > Location for the message . " );
> > }
> >
> >
> > JSP code :
> >
> > <tr>
> > <td align="left" valign="top"><p><s:actionerror id="err" /></p></td>
> > </tr>
> >
> >
> > The error is added successfully as i can see from the logs but it is not
> > getting displayed on the JSP ..any pointers ?
> >
> >
> > Thanks,
> > Kavita
> >
> >
> >
> >
> >
> > *****************************************************DISCLAIMER*****************************************************
> >
> > This message and/or attachment(s) contained here are confidential, proprietary to HUGHES SYSTIQUE and its customers.
> > Contents may be privileged or otherwise protected by law. The information is solely intended for the entity it is
> > addressed to. If you are not the intended recipient of this message, it is strictly prohibited to read, forward,
> > print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error,
> > please notify the sender immediately and delete the message.
> >
> > ********************************************************************************************************************
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

Attachment:
user_200553.ezm (zipped)Is there any performance difference between defining validations in an
xml file (ActionName-validation.xml) or as annotations within the
Action? Is one method preferred over the other?
Mitch

Attachment:
user_200554.ezm (zipped)> <result name="input">/xxx/MyWizardPage${page}.jsp</result>
oh yes, this does the trick! Thanks!
I just found another problem when using xml based validation. In struts1, there is a page attribute, which can tell the validator to validate certain fields which belong to that page, but this useful feature is not in struts2, is there any replacement for that?
________________________________
From: Greg Lindholm <greg.lindholm@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, July 9, 2009 2:32:17 PM
Subject: Re: dynamic return when validation failed
>
>
> >
> > Well, if I remove my validation code in the validate() method and put it
> > into execute() method, then I can easily control which logical name to be
> > return, but I thought that is not a good way to do that right?
> >
>
> While this might not be a "good way to do that," it's what I would do and
> in
> fact have done.
> --
> Jim Kiley
> Senior Technical Consultant | Summa
> [p] 412.258.3346
> http://www.summa-tech.com
>
I occasionally have to do validation in the execute() method but always
prefer to do declarative validation with annotations wherever possible since
it is so much simpler and cleaner. This means all my actions have to be able
to handle an 'input' result. Since 'input' result is the standard for
validation errors you should be prepared for it as the next programmer who
works on your code may add a validation() method or add validation
annotations.
@OP: If you know which page# in a wizard sequence to return to and use that
page# in the jsp name then you can make that page# available with a
getPage() method and do this:
<result name="input">/xxx/MyWizardPage${page}.jsp</result>
It does mean you would need to have a jsp page naming convention that
includes the page#.

Attachment:
user_200556.ezm (zipped)check your web.xml to see if your filtering thru SiteMesh e.g.
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>
com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
where
com.opensymphony.module.sitemesh.filter.PageFilter contains parsePage method
protected
com.opensymphony.module.sitemesh.Page parsePage(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException
{
try
{
PageResponseWrapper pageResponse = new PageResponseWrapper(response, factory);
chain.doFilter(request, pageResponse);
// check if another servlet or filter put a page object to the request
Page result = (Page)request.getAttribute(PAGE);
//MG: THIS IS the page you want
if (result == null) {
// parse the page
result = pageResponse.getPage();
}
request.setAttribute(USING_STREAM, new Boolean(pageResponse.isUsingStream()));
return result;
}
//once you have the Page you can do page.getTitle() and then
//map Title to Page Number
//the other way is to modify protected
com.opensymphony.module.sitemesh.Page //for accessor and mutator for pageNumber
did you ask wes?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Thu, 9 Jul 2009 07:36:58 -0700
> From: mailtolouis2020-struts@(protected)
> Subject: Re: dynamic return when validation failed
> To: user@(protected)
>
> > <result name="input">/xxx/MyWizardPage${page}.jsp</result>
>
> oh yes, this does the trick! Thanks!
>
> I just found another problem when using xml based validation. In struts1, there is a page attribute, which can tell the validator to validate certain fields which belong to that page, but this useful feature is not in struts2, is there any replacement for that?
>
>
>
>
>
> ________________________________
> From: Greg Lindholm <greg.lindholm@(protected)>
> To: Struts Users Mailing List <user@(protected)>
> Sent: Thursday, July 9, 2009 2:32:17 PM
> Subject: Re: dynamic return when validation failed
>
> >
> >
> > >
> > > Well, if I remove my validation code in the validate() method and put it
> > > into execute() method, then I can easily control which logical name to be
> > > return, but I thought that is not a good way to do that right?
> > >
> >
> > While this might not be a "good way to do that," it's what I would do and
> > in
> > fact have done.
> > --
> > Jim Kiley
> > Senior Technical Consultant | Summa
> > [p] 412.258.3346
> > http://www.summa-tech.com
> >
>
> I occasionally have to do validation in the execute() method but always
> prefer to do declarative validation with annotations wherever possible since
> it is so much simpler and cleaner. This means all my actions have to be able
> to handle an 'input' result. Since 'input' result is the standard for
> validation errors you should be prepared for it as the next programmer who
> works on your code may add a validation() method or add validation
> annotations.
>
> @OP: If you know which page# in a wizard sequence to return to and use that
> page# in the jsp name then you can make that page# available with a
> getPage() method and do this:
>
> <result name="input">/xxx/MyWizardPage${page}.jsp</result>
>
> It does mean you would need to have a jsp page naming convention that
> includes the page#.
_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009

Attachment:
user_200555.ezm (zipped)I'm new to struts and work on an application with existing struts code.
I have a text field in a .jsp and when doing the post struts seems to be
automatically removing certain special characters from the string in the
text field.
In particular, it's removing these non-alpha characters: "(" and ")"
Is there some configuration at the struts level to declare which
characters to allow or not allow? I searched but could not find any
info.
Thanks,
Glenn
The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. If you are not the intended recipient please return the e-mail to the sender and delete it from your computer. Although we attempt to sweep e-mail and attachments for viruses, we do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of viruses.
Please refer to http://disclaimer.bnymellon.com/eu.htm for certain disclosures relating to European legal entities.

Attachment:
user_200557.ezm (zipped)
I wonder if this is durable with S2:
JSP form:
this form has a button FINALIZE, if all goes well - the result SUCCESS
should be seen in placeA on the page and if it fails the result FAILURE
should be seen in placeB (a different place on the page);
the SUCCESS/FAILURE are just messages but they must be seen on different
places on the page.
(note that the page is using AJAX tags)
<code>
<s:submit value="finalize" action="test_ finalize" theme="ajax"
targets="target_id_success, target_id_failure" showLoadingText="false"
indicator="loadingImage"/>
.
.
<!-- placeA -->
<s:div id="target_id_success" theme="ajax">
</div>
.
.
<!-- placeB -->
<s:div id="target_id_failure" theme="ajax">
</div>
</code>
So, say the end user clicks the finalize button and activates the
finalize-action-method. How can I instruct in the action that for if all
goes well - show the success message on DIV target_id_success,
and if something went wrong - show the FAILURE message on DIV:
target_id_failure.
<code>
public String finalize()
{
//something went wrong
addActionError("error...sorry"); //this error should be seen only in
DIV target_id_failure
return "error-message";
//if all is OK
addActionMessage("good job"); //this message should be seen only on
DIV target_id_success
return "success-message";
}
</code>
Many thanks!
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_200568.ezm (zipped)Hi fireapple,
as for me You should not do it in action,
precisely action should not decide what div to be updated,
just perform action and return some result - success or error.
What i would do is to place this logic inside $ajax(...) call from
jquery [which i use]
so that other programmers could read it when they will change that
behaviour on the page or in js file.
But that is just my opinion.
Best greetings,
Paweł Wielgus.
2009/7/9 fireapple <taizhang1981@(protected)>:
>
> I wonder if this is durable with S2:
>
> JSP form:
> this form has a button FINALIZE, if all goes well - the result SUCCESS
> should be seen in placeA on the page and if it fails the result FAILURE
> should be seen in placeB (a different place on the page);
> the SUCCESS/FAILURE are just messages but they must be seen on different
> places on the page.
> (note that the page is using AJAX tags)
>
> <code>
> <s:submit value="finalize" action="test_ finalize" theme="ajax"
> targets="target_id_success, target_id_failure" showLoadingText="false"
> indicator="loadingImage"/>
> .
> .
>
> <!-- placeA -->
> <s:div id="target_id_success" theme="ajax">
> </div>
> .
> .
> <!-- placeB -->
> <s:div id="target_id_failure" theme="ajax">
> </div>
> </code>
>
> So, say the end user clicks the finalize button and activates the
> finalize-action-method. How can I instruct in the action that for if all
> goes well - show the success message on DIV target_id_success,
> and if something went wrong - show the FAILURE message on DIV:
> target_id_failure.
>
> <code>
> public String finalize()
> {
>
> //something went wrong
> addActionError("error...sorry"); //this error should be seen only in
> DIV target_id_failure
> return "error-message";
>
> //if all is OK
> addActionMessage("good job"); //this message should be seen only on
> DIV target_id_success
> return "success-message";
> }
> </code>
>
> Many thanks!
>
> --
> View this message in context: http://www.nabble.com/S2%3A-Ajax-tags----how-to-return-a-message-to-a-specific-DIV--tp24412933p24412933.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_200558.ezm (zipped)
I am working on a plug-in that needs to display a JSP. I have the plug-in
packaged with the following struts-plugin.xml, however, rather than the
/pages/config.jsp page appearing, I get a 404! The folder "pages" is in the
root of my config-plugin.jar file and I have changed the result by both
including and omitting the leading slash and I get a 404 either way. My
action is returning SUCCESS as verified through the debugger. Does anyone
see anything glaringly wrong?
<struts>
<package name="config" namespace="/config" extends="struts-default">
<action name="maintainConfig_*"
class="com.erac.wsf.action.ConfigAction" method="{1}">
<result>/pages/config.jsp</result>
<result name="error">/pages/config.jsp</result>
</action>
</package>
</struts>
Peace,
Scott
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_200559.ezm (zipped)stanlick wrote:
> I am working on a plug-in that needs to display a JSP.
> The folder "pages" is in the root of my config-plugin.jar
I believe jsp files must be in the file system, not in jars.
-Dale

Attachment:
user_200560.ezm (zipped)
Thanks Dale --
I hear what you are saying, and this seemed a little foreign to me too!
However, for a plug-in to be a drop-n-go deal, I sort of think the goods
should all be in the plug-in jar itself? Make sense? I was looking at this
article, and it appears this cat has a JSP working in his plug-in?
http://www.struts2.org/category/struts2-plugins/
http://www.struts2.org/category/struts2-plugins/
The reason for this plug-in is to eliminate a couple pages of configuration
steps for the adopter of my application. I'd rather not say just drop the
plug-in in your WEB-INF/lib folder and then copy JSP files here...
Peace,
Scott
DNewfield wrote:
>
> stanlick wrote:
>> I am working on a plug-in that needs to display a JSP.
>
>> The folder "pages" is in the root of my config-plugin.jar
>
> I believe jsp files must be in the file system, not in jars.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_200561.ezm (zipped)stanlick wrote:
> However, for a plug-in to be a drop-n-go deal, I sort of think the goods
> should all be in the plug-in jar itself? Make sense?
Agreed, but I believe I've been told that can't be done with jsp
templates. This is why plugins that I've seen have been implemented in
freemarker.
> I was looking at this
> article, and it appears this cat has a JSP working in his plug-in?
>
> http://www.struts2.org/category/struts2-plugins/
I downloaded that zip, and looked inside the .jars: no .jsps.
> The reason for this plug-in is to eliminate a couple pages of configuration
> steps for the adopter of my application. I'd rather not say just drop the
> plug-in in your WEB-INF/lib folder and then copy JSP files here...
I'm simply reporting hear-say here, but I believe you've already hit the
roadblock that'll prevent you from getting farther w/o using a different
template engine.
-Dale

Attachment:
user_200562.ezm (zipped)It is a limitation on the JSP API, you can't embed them. You will have
to use FreeMarker or Velocity or any other decent template lib.
musachy
On Thu, Jul 9, 2009 at 12:47 PM, stanlick<stanlick@(protected):
>
> Thanks Dale --
>
> I hear what you are saying, and this seemed a little foreign to me too!
> However, for a plug-in to be a drop-n-go deal, I sort of think the goods
> should all be in the plug-in jar itself? Make sense? I was looking at this
> article, and it appears this cat has a JSP working in his plug-in?
>
> http://www.struts2.org/category/struts2-plugins/
> http://www.struts2.org/category/struts2-plugins/
>
> The reason for this plug-in is to eliminate a couple pages of configuration
> steps for the adopter of my application. I'd rather not say just drop the
> plug-in in your WEB-INF/lib folder and then copy JSP files here...
>
> Peace,
> Scott
>
>
>
> DNewfield wrote:
>>
>> stanlick wrote:
>>> I am working on a plug-in that needs to display a JSP.
>>
>>> The folder "pages" is in the root of my config-plugin.jar
>>
>> I believe jsp files must be in the file system, not in jars.
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Struts-2-Plug-in-and-JSP-404-tp24415564p24416650.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_200563.ezm (zipped)Or if you are very brave, and using java 6, you can use jasper to
compile the jsp to java, then use the java api compile to compile to a
class file, load it and then execute it, but yeah FreeMarker would be
easier :)
musachy
On Thu, Jul 9, 2009 at 1:06 PM, Dale Newfield<dale@(protected):
> stanlick wrote:
>>
>> However, for a plug-in to be a drop-n-go deal, I sort of think the goods
>> should all be in the plug-in jar itself? Make sense?
>
> Agreed, but I believe I've been told that can't be done with jsp templates.
> This is why plugins that I've seen have been implemented in freemarker.
>
>> I was looking at this
>> article, and it appears this cat has a JSP working in his plug-in?
>>
>> http://www.struts2.org/category/struts2-plugins/
>
> I downloaded that zip, and looked inside the .jars: no .jsps.
>
>> The reason for this plug-in is to eliminate a couple pages of
>> configuration
>> steps for the adopter of my application. I'd rather not say just drop the
>> plug-in in your WEB-INF/lib folder and then copy JSP files here...
>
> I'm simply reporting hear-say here, but I believe you've already hit the
> roadblock that'll prevent you from getting farther w/o using a different
> template engine.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_200564.ezm (zipped)
Thanks brother! Do you know of a decent JSP ---> Freemarker converter? I
sort of wondered why the config-browser plug in was using Freemarker. It
really sucks when something like this rears it ugly head and brings
productivity to a screeching halt!
P.S. And I really thought I was going to have time this evening for that
Harley ride up the river road!
Peace,
Scott
DNewfield wrote:
>
> stanlick wrote:
>> However, for a plug-in to be a drop-n-go deal, I sort of think the goods
>> should all be in the plug-in jar itself? Make sense?
>
> Agreed, but I believe I've been told that can't be done with jsp
> templates. This is why plugins that I've seen have been implemented in
> freemarker.
>
>> I was looking at this
>> article, and it appears this cat has a JSP working in his plug-in?
>>
>> http://www.struts2.org/category/struts2-plugins/
>
> I downloaded that zip, and looked inside the .jars: no .jsps.
>
>> The reason for this plug-in is to eliminate a couple pages of
>> configuration
>> steps for the adopter of my application. I'd rather not say just drop
>> the
>> plug-in in your WEB-INF/lib folder and then copy JSP files here...
>
> I'm simply reporting hear-say here, but I believe you've already hit the
> roadblock that'll prevent you from getting farther w/o using a different
> template engine.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
:rules::rules:%-|%-|%-|
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_200565.ezm (zipped)
Please tell me it isn't the little woman that has you talking all crazy bro!
P.S. You failed to mention the option about just writing the response with
print statements from the action!
Peace,
Scott
Musachy Barroso wrote:
>
> Or if you are very brave, and using java 6, you can use jasper to
> compile the jsp to java, then use the java api compile to compile to a
> class file, load it and then execute it, but yeah FreeMarker would be
> easier :)
>
> musachy
>
> On Thu, Jul 9, 2009 at 1:06 PM, Dale Newfield<dale@(protected):
>> stanlick wrote:
>>>
>>> However, for a plug-in to be a drop-n-go deal, I sort of think the goods
>>> should all be in the plug-in jar itself? Make sense?
>>
>> Agreed, but I believe I've been told that can't be done with jsp
>> templates.
>> This is why plugins that I've seen have been implemented in freemarker.
>>
>>> I was looking at this
>>> article, and it appears this cat has a JSP working in his plug-in?
>>>
>>> http://www.struts2.org/category/struts2-plugins/
>>
>> I downloaded that zip, and looked inside the .jars: no .jsps.
>>
>>> The reason for this plug-in is to eliminate a couple pages of
>>> configuration
>>> steps for the adopter of my application. I'd rather not say just drop
>>> the
>>> plug-in in your WEB-INF/lib folder and then copy JSP files here...
>>
>> I'm simply reporting hear-say here, but I believe you've already hit the
>> roadblock that'll prevent you from getting farther w/o using a different
>> template engine.
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_200566.ezm (zipped)Have you try to put lists in lists???
may be it works...
another way can be if you put every item as a s:optgroup
HTH
2009/7/2 mlevin <marshall_levin@(protected)>
>
> ** Many apologies if this goes through twice -- I posted a few hours ago
> and
> didn't see my own post show up yet **
>
> Hi folks,
>
> I'm having some trouble getting my SELECT menu to appear the way I want it
> in a new Struts 2 project.
>
> What I want is something like this:
>
> Apple
> Banana
> Cookies
> Chocolate Chip
> Oatmeal
> Peanut Butter
> Drinks
> Coke
> Sprite
> Falafel
> Gumdrops
>
> In my code I have something like this:
>
> <s:select name="choices" list="topLevelList" size="11" multiple="true">
> <s:optgroup label="Cookies" list="cookieList"/>
> <s:optgroup label="Drinks" list="drinkList"/>
> </s:select>
>
> topLevelList contains Apple, Banana, Falafel, Gumdrops
> cookieList contains Chocolate Chip, Oatmeal, Peanut Butter
> drinkList contains Coke, Sprite
>
> But Struts is putting the OPTGROUP items at the end, so the list comes out
> like:
>
> Apple
> Banana
> Falafel
> Gumdrops
> Cookies
> Chocolate Chip
> Oatmeal
> Peanut Butter
> Drinks
> Coke
> Sprite
>
> How can I get it to put the OPTGROUP things in the middle so I can keep my
> list in the order I want? I want to intersperse some OPTGROUP choices
> within
> a larger list of top-level choices.
>
> Is there any way to do this?
>
> Thanks!
> --
> View this message in context:
> http://www.nabble.com/Getting-OPTGROUP-items-to-appear-in-the-right-order-within-a-larger-top-level-SELECT-list-tp24311086p24311086.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Atentamente
Óscar Álvarez Vielma
(09) 8416 4052

Attachment:
user_200567.ezm (zipped)
Hi. (sorry for my bad English :blush: )
I am very new Struts user, so my problem is maybe some basic stuff.. But
please help me someone, if you know the answer.
I'm developing a large application which uses Struts 1.x- and EJB3-
frameworks and Web Sphere 7.x application server. I should make application
use only one tab or window. If user open some page in new tab, application
should view login screen. How this could be done in Struts?
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_200569.ezm (zipped)
I started to profile my app with YourKit and JMeter, because of increasing
request times.
Obviously Actions in my app are not garbage collected until a major
collection when the heap is full.
This also happens with the showcase app from struts.
Any idea which objects still reference the Actions or why they are not
garbage collected after the request has finished.
Thanks in advance
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_200570.ezm (zipped)"Obviously Actions in my app are not garbage collected until a major
collection when the heap is full."
If they are garbage collected, then it is ok, the GC has a mind of its
own. If your actions are singletons (and they shouldn't be!) then they
are not likely to be collected.
musachy
On Fri, Jul 10, 2009 at 3:41 AM, Anselmo<anselm.bauer@(protected):
>
> I started to profile my app with YourKit and JMeter, because of increasing
> request times.
>
> Obviously Actions in my app are not garbage collected until a major
> collection when the heap is full.
>
> This also happens with the showcase app from struts.
>
> Any idea which objects still reference the Actions or why they are not
> garbage collected after the request has finished.
>
> Thanks in advance
> --
> View this message in context: http://www.nabble.com/Actions-are-not-Garbage-Collected-tp24425128p24425128.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_200571.ezm (zipped)On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<musachy@(protected):
> If your actions are singletons (and they shouldn't be!) then they
> are not likely to be collected.
because a reference to them will be held by spring, or whatever
container you are using.

Attachment:
user_200572.ezm (zipped)Musachy Barroso wrote:
> On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<musachy@(protected):
>> If your actions are singletons (and they shouldn't be!) then they
>> are not likely to be collected.
>
> because a reference to them will be held by spring, or whatever
> container you are using.
Or maybe clickstream? http://www.opensymphony.com/clickstream
A brief look at the source
https://svn.opensymphony.com/svn/clickstream/trunk appears to indicate
that it only saves stuff extracted from the request object, but maybe I
missed where it's also saving a reference to the request (and therefore
the action) itself?
-Dale

Attachment:
user_200577.ezm (zipped)web.xml configuration for Spring
/* The ContextLoaderListener listener should be registered after
Log4jConfigListener
in web.xml, if the latter is used.
*/
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
once thats configured you'll want to use MethodInvokingFactoryBean for FactoryBean which returns a value which is the result of a static or instance
method invocation
http://static.springsource.org/spring/docs/1.2.x/api/org/springframework/beans/factory/config/MethodInvokingFactoryBean.html
as mentioned singleton="true" assures you will load,instantiate and store a cached bean
static factory methods:
An example (in an XML based bean factory definition) of a bean definition
which uses this class to call a STATIC factory method:
<bean id="myObject" class="
org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod"><value>com.whatever.MyClassFactory.getInstance</value></property>
</bean>
<!-- this example will acquire a (target) instance specific version of System defined (version) property -->
<bean id="sysProps" class="
org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass"><value>
java.lang.System</value></property>
<property name="targetMethod"><value>getProperties</value></property>
</bean>
<bean id="javaVersion" class="
org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject"><ref local="sysProps"/></property>
<property name="targetMethod"><value>getProperty</value></property>
<property name="arguments">
<list>
<value>java.version</value>
</list>
</property>
</bean>Since your question addresses GarbageCollection it would be good to know the difference
between Spring's Beans loader between ApplicationContext (a load class which implements ApplicationContextAware) and BeanFactory (a class which implements BeanFactoryAware)
BeanFactory:
1a)Container locates beans definition (usually derivation of *beans.xml)
1b)Container Loads beans into Container
2)is instantiated LATER with getBean() method
ApplicationContext:
1a)Container locates beans definition depeding on invoking class
-ClassPathXMLApplicationContext-Loads XML from Classpath
-FileSystemXMLApplicationContext-Loads context from XML file in filesystem
-XMLWebApplicationContext-Loads Context from XML(beans.xml/ApplicationContext.xml) contained with webApplication
1b)Container loads and instantiates all beans into Container
so if you see alot of GC activity from jheap or J2EE Server logs you will probably want to consider using BeanFactoryAware implementor class instead of default ApplicationContextAware implementor class
hope this helps
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Date: Fri, 10 Jul 2009 11:10:17 -0400
> From: dale@(protected)
> To: user@(protected)
> Subject: Re: Actions are not Garbage Collected
>
> Musachy Barroso wrote:
> > On Fri, Jul 10, 2009 at 7:53 AM, Musachy Barroso<musachy@(protected):
> >> If your actions are singletons (and they shouldn't be!) then they
> >> are not likely to be collected.
> >
> > because a reference to them will be held by spring, or whatever
> > container you are using.
>
> Or maybe clickstream? http://www.opensymphony.com/clickstream
>
> A brief look at the source
> https://svn.opensymphony.com/svn/clickstream/trunk appears to indicate
> that it only saves stuff extracted from the request object, but maybe I
> missed where it's also saving a reference to the request (and therefore
> the action) itself?
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290

Attachment:
user_200573.ezm (zipped)Hi all,
translating portion of old code which was using S1 and Tiles and
ran into problem.
There is one tile representing form which is being used on almost all screens.
One doesn't want to write same tile over and over again since only name
of the action differs.
Existing code used this:
// define name of the action to be a passed from parent tile
<tiles:useAttribute name="formAction" />
then it was used like this:
<html:form action="<%= formAction.toString() %>" ......
I've changed this to use S2 tags:
<s:form action="<%= formAction.toString() %>" .........
and jsp compilers complains:
JSPG0227E: Exception caught while translating /layout/formLayout.jsp:
/layout/formLayout.jsp(11,1) --> JSPG0124E: Custom tag attribute action
cannot be runtime expression. value: "[%= formAction.toString() %]"
Any ideas how to solve it?
Thanks,
Peter.

Attachment:
user_200574.ezm (zipped)Can someone suggest a way to do this:
<s:submit type="image" alt="Unlocked" src="%{unlocked_image}"
onclick='$("<s:property value="#foo"/>").request(); return false;'/>
I have tried a bunch of ways, but always wind up with the <s:property...
in the resulting HTML, rather than '$("form1").submit()' like I need.
Thanks

Attachment:
user_200575.ezm (zipped)On Friday 10 July 2009 11:49:04 Security Management wrote:
> Can someone suggest a way to do this:
>
> <s:submit type="image" alt="Unlocked" src="%{unlocked_image}"
> onclick='$("<s:property value="#foo"/>").request(); return false;'/>
>
> I have tried a bunch of ways, but always wind up with the <s:property...
> in the resulting HTML, rather than '$("form1").submit()' like I need.
>
> Thanks
>
Try this -
<s:submit type="image" alt="Unlocked" src="%{unlocked_image}"
onclick="%{'$(' + #foo + ').request(); return false;}'}"/>
--
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

Attachment:
user_200576.ezm (zipped)I have a very simple radio tag like following
<s:radio label="correctOption" name="correctAnswer" id="correctOption"
list=" #{'1':'1','2':'2','3':'3','4':'4'}"
value="questionVo.correctAnswer"/>
questionVo.correctAnswer returns 2. So I want the second radio button to be
preselected but it is not happening. I even tried:
<s:radio label="correctOption" name="correctAnswer" id="correctOption"
list=" #{'1':'1','2':'2','3':'3','4':'4'}" value="%{1}"/>
but that does not work either.
what am I doing wrong?