-
Type:
Bug
-
Resolution: Support Request
-
Priority:
Low
-
Component/s: None
-
None
-
Environment:
Windows XP sp2
JDK 1.4
Tomcat / Eclipse
NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.
Is it possible to access spring context inside the portlet code ?
I'm trying to use spring-portlet.jar.
Here is what I want to do :
public class HelloWorld extends GenericPortlet {
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
Object myFooObject = getApplicationContext().getBean("myFooObjectName");
...
I tried to initialize a singleton on startup which provides static access to the context. I tried to access it from the portlet, but it seems that in this case it's not a valid portlet anymore.
My goal is to provide an access to database objects like BO, DAO and services (through hibernate/spring-hibernate) .
Is it possible to do this differently ?
Many thanks,
Rom
- is related to
-
CONFSERVER-4348 How to get spring context inside a portlet (processAction, doView, ...) ?
-
- Closed
-