Accessing a session bean variable and passing it to a String variable
843840Jul 31 2008 — edited Aug 13 2008How do i pass a session bean variable using the useBean method to a String variable in a JSP page to use?
Action form bean:
request.getSession().setAttribute("member",test); // setting the session bean
JSP process page:
<jsp:useBean id="member" class="com.myapp.structs.Member" scope="session"></jsp:useBean>
<% String a = member.getName(); %>
The problem is that the method i use here access the "Member" bean but not the session bean set and thats why it returns a null value. i know the session Bean is setting as i use {$member.name} to output the details on a JSP page.