You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by 梁炳場 <pc...@gmail.com> on 2005/10/05 16:30:23 UTC
[OT] How to pass HttpServletRequest into Hibernate?
I have a menu made up of <html:link>s.
When a certain html:link is clicked,
next level of menu made up of html:link displays.
When the first level of html:link, I do this
session.setAttribute() in the Action class.
So that I know which link is clicked.
To display the menu, it is the job of Hibernate.
<%
List roleProgramList =
RoleProgramService.getInstance().getRoleProgramList(request.getRemoteUser());
<action path="/userProfileMaint"
type="com.erp.struts.SomeAction"
scope="request">
<forward name="success" path="user.showRoleProgram" />
</action>
RoleProgramService:
Session session = null;
try
{
session = HibernateUtil.currentSession();
My question how can the RoleProgramService, a Hibernate class,
retrieve the value of attribute when there is no session.getAttribute?
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org