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="emailAddrFormatt ed" /> <br>
<jsp:getProperty name="userInfo" property="passwordFormatte d" />
</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="emailAddrFormatt ed" />;
String password = <jsp:getProperty name="userInfo" property="passwordFormatte d" /> ;
--------------------------
<%@ 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="emailAddrFormatt
<jsp:getProperty name="userInfo" property="passwordFormatte
</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="emailAddrFormatt
String password = <jsp:getProperty name="userInfo" property="passwordFormatte
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.