# <profile:setProperty> Tag

The <profile:setProperty> tag updates a property value for either the session's current profile, or for the Anonymous User Profile. This tag has no enclosed body.

Note: All User Management tags send results to the same file. If you are checking for results, include this import statement at the top of the page: <%@ page import="com.bea.p13n.usermgmt. servlets.jsp.tags.UserManagementTag- Constants" %>

## Syntax

<tagName attribute="value" />

## Attributes

propertySet

Optional (String) - The Property Set in which the property's value is to be set. Example: "Demographics".

The property is set for the profile's default (unscoped) properties if no property set is provided.

propertyName

Required (String) - The name of the property to be set. Example: "Gender".

value

Required (Object or String) - The new property value.

result

Optional (String) - The name of an Integer object to which the result of the set property operation is assigned.

Possible values:

- Success: UserManagementTagConstants.SET_PROPERTY_OK.
- Error encountered: UserManagementTagConstants.SET_PROPERTY_FAILED.

## Example

This example shows a that a property called "Gender" will get an updated value.

    <% String myGender = request.getParameter("gender"); %>
    <profile:setProperty propertySet="Demographics" propertyName="Gender" value="<%=myGender%>"/>

This tag is used in the Portal Search portlet's edit JSP.

Related Topics

<profile:removeProperty> Tag

<ps:getPropertyNames> Tag

<ps:getPropertySetNames> Tag

<ps:getRestrictedPropertyValues> Tag