struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 梁炳場 <pc.le...@gmail.com>
Subject [OT] How to pass HttpServletRequest into Hibernate?
Date Wed, 05 Oct 2005 14:30:23 GMT
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


Mime
View raw message