You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by JOSE L MARTINEZ-AVIAL <jl...@gmail.com> on 2012/07/24 07:00:55 UTC

Tag s:textfield does not parse OGNL expressions for dynamic attributes

Hi,
 I have the following textfield:
       <s:textfield autocomplete="off"
           name="userLoginName" theme="simple"
           id="userLoginName"
           maxLength="20"
           regExp="^\w{6,20}$"
           trim="true"
           uppercase="true"
           dojoType="dijit.form.ValidationTextBox"
           required="true"
           intermediateChanges=false
           invalidMessage="%{getText('UserLoginNameStrength.label')}" />

The OGNL expression in the invalidMessage attribute is not been parsed, it
just puts the expression in the attribute. Am I doing something wrong, or
is it a bug?

  Thanks

JL

Re: Tag s:textfield does not parse OGNL expressions for dynamic attributes

Posted by Lukasz Lenart <lu...@apache.org>.
This a dynamic attribute ? Which version of Struts 2 ?


Kind regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2012/7/24 JOSE L MARTINEZ-AVIAL <jl...@gmail.com>:
> Hi,
>  I have the following textfield:
>        <s:textfield autocomplete="off"
>            name="userLoginName" theme="simple"
>            id="userLoginName"
>            maxLength="20"
>            regExp="^\w{6,20}$"
>            trim="true"
>            uppercase="true"
>            dojoType="dijit.form.ValidationTextBox"
>            required="true"
>            intermediateChanges=false
>            invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>
> The OGNL expression in the invalidMessage attribute is not been parsed, it
> just puts the expression in the attribute. Am I doing something wrong, or
> is it a bug?
>
>   Thanks
>
> JL

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


Re: Tag s:textfield does not parse OGNL expressions for dynamic attributes

Posted by Lukasz Lenart <lu...@apache.org>.
Yes, it supports but without OGNL expression within, please try 2.3.4


Regards

-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2012/7/24 JOSE L MARTINEZ-AVIAL <jl...@gmail.com>:
> Struts 2.2.3. The only plugings are Tiles and Json. According to the TLD
> the tag s:textfield supports dynamic attributes, and it does (the attribute
> is created in the HTML code), but the value of the attribute is not parsed
> for OGNL expressions.
>
> Thanks
> JL
>
> 2012/7/24 Maurizio Cucchiara <mc...@apache.org>
>
>> In addition to what Lukasz said, which plugins are you using (f.e.
>> JavaTemplateEngine could behaviour differently)?
>>
>> Sent from my mobile device, so please excuse typos and brevity.
>>
>> Maurizio Cucchiara
>> Il giorno 24/lug/2012 07.01, "JOSE L MARTINEZ-AVIAL" <jl...@gmail.com> ha
>> scritto:
>>
>> > Hi,
>> >  I have the following textfield:
>> >        <s:textfield autocomplete="off"
>> >            name="userLoginName" theme="simple"
>> >            id="userLoginName"
>> >            maxLength="20"
>> >            regExp="^\w{6,20}$"
>> >            trim="true"
>> >            uppercase="true"
>> >            dojoType="dijit.form.ValidationTextBox"
>> >            required="true"
>> >            intermediateChanges=false
>> >            invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>> >
>> > The OGNL expression in the invalidMessage attribute is not been parsed,
>> it
>> > just puts the expression in the attribute. Am I doing something wrong, or
>> > is it a bug?
>> >
>> >   Thanks
>> >
>> > JL
>> >
>>

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


Re: Tag s:textfield does not parse OGNL expressions for dynamic attributes

Posted by JOSE L MARTINEZ-AVIAL <jl...@gmail.com>.
Struts 2.2.3. The only plugings are Tiles and Json. According to the TLD
the tag s:textfield supports dynamic attributes, and it does (the attribute
is created in the HTML code), but the value of the attribute is not parsed
for OGNL expressions.

Thanks
JL

2012/7/24 Maurizio Cucchiara <mc...@apache.org>

> In addition to what Lukasz said, which plugins are you using (f.e.
> JavaTemplateEngine could behaviour differently)?
>
> Sent from my mobile device, so please excuse typos and brevity.
>
> Maurizio Cucchiara
> Il giorno 24/lug/2012 07.01, "JOSE L MARTINEZ-AVIAL" <jl...@gmail.com> ha
> scritto:
>
> > Hi,
> >  I have the following textfield:
> >        <s:textfield autocomplete="off"
> >            name="userLoginName" theme="simple"
> >            id="userLoginName"
> >            maxLength="20"
> >            regExp="^\w{6,20}$"
> >            trim="true"
> >            uppercase="true"
> >            dojoType="dijit.form.ValidationTextBox"
> >            required="true"
> >            intermediateChanges=false
> >            invalidMessage="%{getText('UserLoginNameStrength.label')}" />
> >
> > The OGNL expression in the invalidMessage attribute is not been parsed,
> it
> > just puts the expression in the attribute. Am I doing something wrong, or
> > is it a bug?
> >
> >   Thanks
> >
> > JL
> >
>

Re: Tag s:textfield does not parse OGNL expressions for dynamic attributes

Posted by Maurizio Cucchiara <mc...@apache.org>.
In addition to what Lukasz said, which plugins are you using (f.e.
JavaTemplateEngine could behaviour differently)?

Sent from my mobile device, so please excuse typos and brevity.

Maurizio Cucchiara
Il giorno 24/lug/2012 07.01, "JOSE L MARTINEZ-AVIAL" <jl...@gmail.com> ha
scritto:

> Hi,
>  I have the following textfield:
>        <s:textfield autocomplete="off"
>            name="userLoginName" theme="simple"
>            id="userLoginName"
>            maxLength="20"
>            regExp="^\w{6,20}$"
>            trim="true"
>            uppercase="true"
>            dojoType="dijit.form.ValidationTextBox"
>            required="true"
>            intermediateChanges=false
>            invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>
> The OGNL expression in the invalidMessage attribute is not been parsed, it
> just puts the expression in the attribute. Am I doing something wrong, or
> is it a bug?
>
>   Thanks
>
> JL
>

Re: Including JSP page from a jar file that placed on /WEB-INF/lib

Posted by Omar Ngarigari <ng...@yahoo.com>.
Yes, my jar file contains just plain common JSP files (file.jsp)

Sent from my iPhone

On Jul 25, 2012, at 11:43 PM, Shrinivas Parashar <Sh...@symantec.com> wrote:

> Hi,
> Does your jar contains JSP or precompiled JSP (.class of Servlet)
> 
> Regards,
> Shrinivas
> 
> -----Original Message-----
> From: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] On Behalf Of Paul Benedict
> Sent: 26 July 2012 01:26
> To: Struts Users Mailing List; Omar Ngarigari
> Subject: Re: Including JSP page from a jar file that placed on /WEB-INF/lib
> 
> Omar,
> 
> JSP does not support reading from bundled libraries. You must extract
> your content into your web application.
> 
> Paul
> 
> On Wed, Jul 25, 2012 at 2:23 PM, Omar Ngarigari <ng...@yahoo.com> wrote:
>> Hello,
>> 
>> I would like know how to include a JSP page that was bundled in the jar file (WEB-INF/lib) using struts2. I used s:include tag, but I got the error (Exception thrown during invlude of /common/header.jsp"
>> 
>> 1 - web/common/header is in the jar file under WEB-INF/lib
>> 2  - in the mypages.jsp, I used <s:include value="/common/header.jsp"/>
>> 
>> Thanks,
>> 
>> 
>> ________________________________
>> From: JOSE L MARTINEZ-AVIAL <jl...@gmail.com>
>> To: Struts Users Mailing List <us...@struts.apache.org>
>> Sent: Tuesday, July 24, 2012 1:00 AM
>> Subject: Tag s:textfield does not parse OGNL expressions for dynamic attributes
>> 
>> Hi,
>> I have the following textfield:
>>       <s:textfield autocomplete="off"
>>           name="userLoginName" theme="simple"
>>           id="userLoginName"
>>           maxLength="20"
>>           regExp="^\w{6,20}$"
>>           trim="true"
>>           uppercase="true"
>>           dojoType="dijit.form.ValidationTextBox"
>>           required="true"
>>           intermediateChanges=false
>>           invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>> 
>> The OGNL expression in the invalidMessage attribute is not been parsed, it
>> just puts the expression in the attribute. Am I doing something wrong, or
>> is it a bug?
>> 
>>  Thanks
>> 
>> JL
> 
> ---------------------------------------------------------------------
> 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


RE: Including JSP page from a jar file that placed on /WEB-INF/lib

Posted by Shrinivas Parashar <Sh...@symantec.com>.
Hi,
Does your jar contains JSP or precompiled JSP (.class of Servlet)

Regards,
Shrinivas

-----Original Message-----
From: paulus.benedictus@gmail.com [mailto:paulus.benedictus@gmail.com] On Behalf Of Paul Benedict
Sent: 26 July 2012 01:26
To: Struts Users Mailing List; Omar Ngarigari
Subject: Re: Including JSP page from a jar file that placed on /WEB-INF/lib

Omar,

JSP does not support reading from bundled libraries. You must extract
your content into your web application.

Paul

On Wed, Jul 25, 2012 at 2:23 PM, Omar Ngarigari <ng...@yahoo.com> wrote:
> Hello,
>
> I would like know how to include a JSP page that was bundled in the jar file (WEB-INF/lib) using struts2. I used s:include tag, but I got the error (Exception thrown during invlude of /common/header.jsp"
>
> 1 - web/common/header is in the jar file under WEB-INF/lib
> 2  - in the mypages.jsp, I used <s:include value="/common/header.jsp"/>
>
> Thanks,
>
>
> ________________________________
>  From: JOSE L MARTINEZ-AVIAL <jl...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Tuesday, July 24, 2012 1:00 AM
> Subject: Tag s:textfield does not parse OGNL expressions for dynamic attributes
>
> Hi,
> I have the following textfield:
>        <s:textfield autocomplete="off"
>            name="userLoginName" theme="simple"
>            id="userLoginName"
>            maxLength="20"
>            regExp="^\w{6,20}$"
>            trim="true"
>            uppercase="true"
>            dojoType="dijit.form.ValidationTextBox"
>            required="true"
>            intermediateChanges=false
>            invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>
> The OGNL expression in the invalidMessage attribute is not been parsed, it
> just puts the expression in the attribute. Am I doing something wrong, or
> is it a bug?
>
>   Thanks
>
> JL

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


Re: Including JSP page from a jar file that placed on /WEB-INF/lib

Posted by Paul Benedict <pb...@apache.org>.
Omar,

JSP does not support reading from bundled libraries. You must extract
your content into your web application.

Paul

On Wed, Jul 25, 2012 at 2:23 PM, Omar Ngarigari <ng...@yahoo.com> wrote:
> Hello,
>
> I would like know how to include a JSP page that was bundled in the jar file (WEB-INF/lib) using struts2. I used s:include tag, but I got the error (Exception thrown during invlude of /common/header.jsp"
>
> 1 - web/common/header is in the jar file under WEB-INF/lib
> 2  - in the mypages.jsp, I used <s:include value="/common/header.jsp"/>
>
> Thanks,
>
>
> ________________________________
>  From: JOSE L MARTINEZ-AVIAL <jl...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Tuesday, July 24, 2012 1:00 AM
> Subject: Tag s:textfield does not parse OGNL expressions for dynamic attributes
>
> Hi,
> I have the following textfield:
>        <s:textfield autocomplete="off"
>            name="userLoginName" theme="simple"
>            id="userLoginName"
>            maxLength="20"
>            regExp="^\w{6,20}$"
>            trim="true"
>            uppercase="true"
>            dojoType="dijit.form.ValidationTextBox"
>            required="true"
>            intermediateChanges=false
>            invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>
> The OGNL expression in the invalidMessage attribute is not been parsed, it
> just puts the expression in the attribute. Am I doing something wrong, or
> is it a bug?
>
>   Thanks
>
> JL

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


Re: Including JSP page from a jar file that placed on /WEB-INF/lib

Posted by Chris Pratt <th...@gmail.com>.
Standard JSP doesn't allow for compiling directly from a jar file.  There
are three options (that I'm aware of):


   1. Freemarker
   2. Velocity
   3. Java JSP Template Engine

Switching to Freemarker or Velocity can have other advantages (in speed
mainly), but it requires you to re-code your entire application.  Using the
Java JSP Template Engine seems to work pretty well.  I have been using it
for a while, and haven't had any problems.  I believe there are some
limitations with that template engine, but I can't recall what they are.
 If you want to try that route, add the following to your struts.xml:

<constant name="struts.ui.templateSuffix" value="java"/>

I'm sure there's lots more information in the Struts documentation.
  (*Chris*)

On Wed, Jul 25, 2012 at 12:23 PM, Omar Ngarigari <ng...@yahoo.com>wrote:

> Hello,
>
> I would like know how to include a JSP page that was bundled in the jar
> file (WEB-INF/lib) using struts2. I used s:include tag, but I got the error
> (Exception thrown during invlude of /common/header.jsp"
>
> 1 - web/common/header is in the jar file under WEB-INF/lib
> 2  - in the mypages.jsp, I used <s:include value="/common/header.jsp"/>
>
> Thanks,
>
>
> ________________________________
>  From: JOSE L MARTINEZ-AVIAL <jl...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Tuesday, July 24, 2012 1:00 AM
> Subject: Tag s:textfield does not parse OGNL expressions for dynamic
> attributes
>
> Hi,
> I have the following textfield:
>        <s:textfield autocomplete="off"
>            name="userLoginName" theme="simple"
>            id="userLoginName"
>            maxLength="20"
>            regExp="^\w{6,20}$"
>            trim="true"
>            uppercase="true"
>            dojoType="dijit.form.ValidationTextBox"
>            required="true"
>            intermediateChanges=false
>            invalidMessage="%{getText('UserLoginNameStrength.label')}" />
>
> The OGNL expression in the invalidMessage attribute is not been parsed, it
> just puts the expression in the attribute. Am I doing something wrong, or
> is it a bug?
>
>   Thanks
>
> JL

Including JSP page from a jar file that placed on /WEB-INF/lib

Posted by Omar Ngarigari <ng...@yahoo.com>.
Hello,

I would like know how to include a JSP page that was bundled in the jar file (WEB-INF/lib) using struts2. I used s:include tag, but I got the error (Exception thrown during invlude of /common/header.jsp" 

1 - web/common/header is in the jar file under WEB-INF/lib
2  - in the mypages.jsp, I used <s:include value="/common/header.jsp"/>

Thanks,


________________________________
 From: JOSE L MARTINEZ-AVIAL <jl...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org> 
Sent: Tuesday, July 24, 2012 1:00 AM
Subject: Tag s:textfield does not parse OGNL expressions for dynamic attributes
 
Hi,
I have the following textfield:
       <s:textfield autocomplete="off"
           name="userLoginName" theme="simple"
           id="userLoginName"
           maxLength="20"
           regExp="^\w{6,20}$"
           trim="true"
           uppercase="true"
           dojoType="dijit.form.ValidationTextBox"
           required="true"
           intermediateChanges=false
           invalidMessage="%{getText('UserLoginNameStrength.label')}" />

The OGNL expression in the invalidMessage attribute is not been parsed, it
just puts the expression in the attribute. Am I doing something wrong, or
is it a bug?

  Thanks

JL