File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Portals and Portlets and the fly likes How to get servlet context name in a Portlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Portals and Portlets
Bookmark "How to get servlet context name in a Portlet" Watch "How to get servlet context name in a Portlet" New topic
Author

How to get servlet context name in a Portlet

Ignacio de Cordoba
Greenhorn

Joined: Jan 04, 2010
Posts: 13
Hi there,
After some time developing struts2 and JSF(2) I am entering the wonderful world of portlet programming (!!). I need to get the servlet context name in a group of portlets (I need to lookup some stateless session beans). I think there is still no CDI in the Portlet world (hope I am wrong, please tell me if so) and I must do traditional JNDI lookup.
As I am using EJB 3.1, my Session Beans portable names depend on the application name, so I need to getit. I haven't found any PortalContext.getServletContextName() or similar method, so any help will be appreciated (of course, I can read a parameter in web.xml, but I'd like to avoid it as the info I need is just the servlet context (application) name.

Thanks for any info or directions and, or course, sorry if I'm asking something toooo simple,
Ignacio
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get servlet context name in a Portlet
 
Similar Threads
Liferay Portlet development with Spring: No handler found for request error
Basics Help need for Portlet development
HttpSession
how to deploy portlet in pluto portal with tomcat server
Oracle 10g portal.