Link to home
Start Free TrialLog in
Avatar of nickl1
nickl1

asked on

Setting String values?

The following page works:
--------------------------------------------------------------------------------
<%@ page language="java" contentType="text/html" %>


<jsp:useBean
      id="userInfo"
      class="test.UserInfoBean">
      <jsp:setProperty name="userInfo" property="*" />
</jsp:useBean>

<html>
<head>
      <title>test.jsp</title>
</head>

<body>

You hit the test page!!!!

<jsp:getProperty name="userInfo" property="emailAddrFormatted" /> <br>

<jsp:getProperty name="userInfo" property="passwordFormatted" />

</body>
</html>
--------------------------------------------------------------------------------

So, how would I set the String values (below) correctly within the same page? I can't seem to get it to work.

String email = <jsp:getProperty name="userInfo" property="emailAddrFormatted" />;

String password = <jsp:getProperty name="userInfo" property="passwordFormatted" /> ;

ASKER CERTIFIED SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial