struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paweł Wielgus <poulw...@gmail.com>
Subject Re: Cleaner way to create this page?
Date Tue, 28 Jul 2009 06:05:45 GMT
Hi,
or use logic:equals, and as David stated put
RoutingEnginePropertiesMgr.getInstance() in form,
there is no client side in struts, page is rendered to html on the
server side and travels from server to client as pure html.

Best greetings,
Paweł Wielgus.

2009/7/27 Musachy Barroso <musachy@gmail.com>:
> add RoutingEnginePropertiesMgr.getInstance() to the request attributes
> map, and use jstl or struts tags in the jsp:
>
> <c:if test="${rte.useCaptcha}">
> ...
> </c:if>
>
> Dare to stay away from scriptlets ;)
>
> musachy
>
> On Mon, Jul 27, 2009 at 9:35 AM, laredotornado<laredotornado@gmail.com> wrote:
>>
>> A couple of things ...
>>
>> 1. Struts tag libraries wouldn't apply here, right?  I'm trying to do some
>> conditional if logic and I don't see which of the Struts libraries would
>> fit.  I'm using Struts 1.3.
>>
>> 2. You mention to put this, "<%= rePropMgr.getCaptchaPublicKey() %>" in the
>> ActionForm, but I need this output to the client side because the script src
>> requires that information.  Knowing that, any other advice there?
>>
>> Thanks , - Dave
>>
>>
>>
>> Kawczynski, David wrote:
>>>
>>> Write a taglib or put a getCaptchaPublicKey() method in the
>>> ActionForm, and use struts taglibs.
>>>
>>>> -----Original Message-----
>>>> From: laredotornado [mailto:laredotornado@gmail.com]
>>>> Sent: Monday, July 27, 2009 11:51 AM
>>>> To: user@struts.apache.org
>>>> Subject: Cleaner way to create this page?
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I'm using Struts 1.3.  I have this in my JSP page ...
>>>>
>>>> <%
>>>>      final RoutingEnginePropertiesMgr rePropMgr =
>>>> RoutingEnginePropertiesMgr.getInstance();
>>>>      if (rePropMgr.isUseCaptcha()) {
>>>> %>
>>>>              <script type="text/javascript"
>>>> src="https://api-secure.recaptcha.net/challenge?k=<%=
>>>> rePropMgr.getCaptchaPublicKey() %>"></script>
>>>> <%
>>>>      }   // if
>>>> %>
>>>>
>>>> Is there a cleaner way to write this that avoids using scriptlets?
>>>>
>>>> Thanks for any advice, - Dave
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683
>>> 147p24683147.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>> Notice:  This e-mail message, together with any attachments, contains
>>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>>> New Jersey, USA 08889), and/or its affiliates (which may be known
>>> outside the United States as Merck Frosst, Merck Sharp & Dohme or
>>> MSD and in Japan, as Banyu - direct contact information for affiliates is
>>> available at http://www.merck.com/contact/contacts.html) that may be
>>> confidential, proprietary copyrighted and/or legally privileged. It is
>>> intended solely for the use of the individual or entity named on this
>>> message. If you are not the intended recipient, and have received this
>>> message in error, please notify us immediately by reply e-mail and
>>> then delete it from your system.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683147p24683970.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Mime
View raw message