Encrypted field by stripes

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Encrypted field by stripes

steam
Hello,
I have a problem with encrypted field by stripes. As I have understood
when you have been declared before field declaration like
        @Validate(encrypted=true)
        private Integer userId;
and have this hidden field on my jsp it should be encrypted. But on
the source code of the jsp I still see the integer value.
I miss something? Can someone tell me how it should be implemented?
Thanks.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Encrypted field by stripes

Ben Gunter
The only way this should happen is if you have the StripesFilter init-param Stripes.DebugMode set to true. Is that the case?


On Sun, Mar 3, 2013 at 8:39 AM, - <[hidden email]> wrote:
Hello,
I have a problem with encrypted field by stripes. As I have understood
when you have been declared before field declaration like
        @Validate(encrypted=true)
        private Integer userId;
and have this hidden field on my jsp it should be encrypted. But on
the source code of the jsp I still see the integer value.
I miss something? Can someone tell me how it should be implemented?
Thanks.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Encrypted field by stripes

steam
With stripes in debug mode - true o in debug mode - false I have the
same result on my jsp
<input type="hidden" value="2" name="itemExt.user.userId">



2013/3/3 Ben Gunter <[hidden email]>:

> The only way this should happen is if you have the StripesFilter init-param
> Stripes.DebugMode set to true. Is that the case?
>
>
> On Sun, Mar 3, 2013 at 8:39 AM, - <[hidden email]> wrote:
>>
>> Hello,
>> I have a problem with encrypted field by stripes. As I have understood
>> when you have been declared before field declaration like
>>         @Validate(encrypted=true)
>>         private Integer userId;
>> and have this hidden field on my jsp it should be encrypted. But on
>> the source code of the jsp I still see the integer value.
>> I miss something? Can someone tell me how it should be implemented?
>> Thanks.
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Stripes-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Stripes-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Encrypted field by stripes

Mike McNally-3
If the annotation is not in your ActionBean class, Stripes (out of the box) won't see it. You can use @ValidateNestedProperties annotation to provide metadata for properties of objects that are ActionBean properties, or you can create your own ValidationMetadataProvider class to mine metadata out of classes other than ActionBean instances.

On Sun, Mar 3, 2013 at 11:29 AM, - <[hidden email]> wrote:
With stripes in debug mode - true o in debug mode - false I have the
same result on my jsp
<input type="hidden" value="2" name="itemExt.user.userId">



2013/3/3 Ben Gunter <[hidden email]>:
> The only way this should happen is if you have the StripesFilter init-param
> Stripes.DebugMode set to true. Is that the case?
>
>
> On Sun, Mar 3, 2013 at 8:39 AM, - <[hidden email]> wrote:
>>
>> Hello,
>> I have a problem with encrypted field by stripes. As I have understood
>> when you have been declared before field declaration like
>>         @Validate(encrypted=true)
>>         private Integer userId;
>> and have this hidden field on my jsp it should be encrypted. But on
>> the source code of the jsp I still see the integer value.
>> I miss something? Can someone tell me how it should be implemented?
>> Thanks.
>>
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Stripes-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Stripes-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



--
Turtle, turtle, on the ground,
Pink and shiny, turn around.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Encrypted field by stripes

steam
In reply to this post by steam
Can someone help me with a solution to encrypt stripes field?
Thanks in advance.


2013/3/3 - <[hidden email]>:
> Hello,
> I have a problem with encrypted field by stripes. As I have understood
> when you have been declared before field declaration like
>         @Validate(encrypted=true)
>         private Integer userId;
> and have this hidden field on my jsp it should be encrypted. But on
> the source code of the jsp I still see the integer value.
> I miss something? Can someone tell me how it should be implemented?
> Thanks.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Encrypted field by stripes

Poitras Christian
Hi,

Can you post you JSP page and ActionBean? That will help to find the problem.

Christian

-----Message d'origine-----
De : - [mailto:[hidden email]]
Envoyé : March-05-13 9:17 AM
À : Stripes Users List
Objet : Re: [Stripes-users] Encrypted field by stripes

Can someone help me with a solution to encrypt stripes field?
Thanks in advance.


2013/3/3 - <[hidden email]>:
> Hello,
> I have a problem with encrypted field by stripes. As I have understood
> when you have been declared before field declaration like
>         @Validate(encrypted=true)
>         private Integer userId;
> and have this hidden field on my jsp it should be encrypted. But on
> the source code of the jsp I still see the integer value.
> I miss something? Can someone tell me how it should be implemented?
> Thanks.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Encrypted field by stripes

steam
This is what I have...

Action
@UrlBinding(ActionsConstants.VIEW_ITEM_URL+"{$event}/{param}")
public class ViewAction extends BaseActionBean {

private static final String JSP_VIEW = "/jsp/common/view.jsp";

        protected ItemExt itemExt = new ItemExt();
        public ItemExt getItemExt() {
                return itemExt;
        }
        public void setItemExt(ItemExt itemExt) {
                this.itemExt = itemExt;
        }
       
        public Resolution view() throws Exception {
                itemExt = advertServiceWrapper.selectItemAndExtById(itemId);
                ....
        return new ForwardResolution(JSP_VIEW);
        }
}
       
Object ItemExt
public class ItemExt implements Serializable {
        private static final long serialVersionUID = 1L;
       
        private Integer itemId;
        .... gets and sets
        private User user;
        public User getUser() {
                return user;
        }
        public void setUser(User user) {
                this.user = user;
        }
       
        .... gets and sets
}

public class User implements Serializable{
        private static final long serialVersionUID = 1L;
       
        @Validate(encrypted=true)
        private Integer userId;
       
        .... gets and sets
       
}
       
view.jsp
<%@include file="/jsp/common/taglibs.jsp"%>
<s:layout-render name="/jsp/common/layout/_default_center.jsp">
<s:layout-component name="main_content">
<s:form id="viewForm" name="viewForm"
beanclass="<%=com.web.project.action.ViewAction.class%>" method="post"
partial="true">
 .......
 <c:out ....
 .......
</s:form>
                       
        another jsp included where it is ecrypted field
                       
<jsp:include page="/jsp/common/parts/email_form.jsp" flush="true"></jsp:include>
....
   </s:layout-component>
</s:layout-render>

email_form.jsp (included jsp)
<%@include file="/jsp/common/taglibs.jsp"%>
<s:form beanclass="<%=com.action.ViewAction.class%>">
       
        here waiting encrypted field

        <s:hidden name="itemExt.user.userId"></s:hidden>
        ....
</s:form>



       





2013/3/5 Poitras Christian <[hidden email]>:

> Hi,
>
> Can you post you JSP page and ActionBean? That will help to find the problem.
>
> Christian
>
> -----Message d'origine-----
> De : - [mailto:[hidden email]]
> Envoyé : March-05-13 9:17 AM
> À : Stripes Users List
> Objet : Re: [Stripes-users] Encrypted field by stripes
>
> Can someone help me with a solution to encrypt stripes field?
> Thanks in advance.
>
>
> 2013/3/3 - <[hidden email]>:
>> Hello,
>> I have a problem with encrypted field by stripes. As I have understood
>> when you have been declared before field declaration like
>>         @Validate(encrypted=true)
>>         private Integer userId;
>> and have this hidden field on my jsp it should be encrypted. But on
>> the source code of the jsp I still see the integer value.
>> I miss something? Can someone tell me how it should be implemented?
>> Thanks.
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Stripes-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Stripes-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Encrypted field by stripes

VANKEISBELCK Remi
Yeah th'tas because you use @Validate not in the action bean class.

Try :

@ValidateNestedProperties(...)
protected ItemExt itemExt = new ItemExt();

In short stripes validation ain't "nested" : you have to specify in in the action bean explicitly using @ValidateNestedProperties.

HTH

Rémi

Le 5 mars 2013 à 16:18, - a écrit :

> This is what I have...
>
> Action
> @UrlBinding(ActionsConstants.VIEW_ITEM_URL+"{$event}/{param}")
> public class ViewAction extends BaseActionBean {
>
> private static final String JSP_VIEW = "/jsp/common/view.jsp";
>
> protected ItemExt itemExt = new ItemExt();
> public ItemExt getItemExt() {
> return itemExt;
> }
> public void setItemExt(ItemExt itemExt) {
> this.itemExt = itemExt;
> }
>
> public Resolution view() throws Exception {
> itemExt = advertServiceWrapper.selectItemAndExtById(itemId);
> ....
> return new ForwardResolution(JSP_VIEW);
> }
> }
>
> Object ItemExt
> public class ItemExt implements Serializable {
> private static final long serialVersionUID = 1L;
>
> private Integer itemId;
> .... gets and sets
> private User user;
> public User getUser() {
> return user;
> }
> public void setUser(User user) {
> this.user = user;
> }
>
> .... gets and sets
> }
>
> public class User implements Serializable{
> private static final long serialVersionUID = 1L;
>
> @Validate(encrypted=true)
> private Integer userId;
>
> .... gets and sets
>
> }
>
> view.jsp
> <%@include file="/jsp/common/taglibs.jsp"%>
> <s:layout-render name="/jsp/common/layout/_default_center.jsp">
> <s:layout-component name="main_content">
> <s:form id="viewForm" name="viewForm"
> beanclass="<%=com.web.project.action.ViewAction.class%>" method="post"
> partial="true">
> .......
> <c:out ....
> .......
> </s:form>
>
> another jsp included where it is ecrypted field
>
> <jsp:include page="/jsp/common/parts/email_form.jsp" flush="true"></jsp:include>
> ....
>   </s:layout-component>
> </s:layout-render>
>
> email_form.jsp (included jsp)
> <%@include file="/jsp/common/taglibs.jsp"%>
> <s:form beanclass="<%=com.action.ViewAction.class%>">
>
> here waiting encrypted field
>
> <s:hidden name="itemExt.user.userId"></s:hidden>
> ....
> </s:form>
>
>
>
>
>
>
>
>
>
> 2013/3/5 Poitras Christian <[hidden email]>:
>> Hi,
>>
>> Can you post you JSP page and ActionBean? That will help to find the problem.
>>
>> Christian
>>
>> -----Message d'origine-----
>> De : - [mailto:[hidden email]]
>> Envoyé : March-05-13 9:17 AM
>> À : Stripes Users List
>> Objet : Re: [Stripes-users] Encrypted field by stripes
>>
>> Can someone help me with a solution to encrypt stripes field?
>> Thanks in advance.
>>
>>
>> 2013/3/3 - <[hidden email]>:
>>> Hello,
>>> I have a problem with encrypted field by stripes. As I have understood
>>> when you have been declared before field declaration like
>>>        @Validate(encrypted=true)
>>>        private Integer userId;
>>> and have this hidden field on my jsp it should be encrypted. But on
>>> the source code of the jsp I still see the integer value.
>>> I miss something? Can someone tell me how it should be implemented?
>>> Thanks.
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Stripes-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_feb
>> _______________________________________________
>> Stripes-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Stripes-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users