IntelliJ Java IDE
The moose likes EJB and Other Java EE Technologies and the fly likes find context root of other web module in same application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "find context root of other web module in same application" Watch "find context root of other web module in same application" New topic
Author

find context root of other web module in same application

Jyothril Rao
Greenhorn

Joined: Nov 19, 2009
Posts: 1
Hi,

We have a application which has got multiple web modules in the same EAR file. The control by default goes to one of the web module. Now I have to invoke a resource which is in different web module. Currently I am getting the servlet context of the web module by specifying the context root and getting the request dispatcher for the web module.
But the context roots are changed by developers and would not like to hard code the values. Is there any other way to do invoke resource of different web module.
Pavan Kumar Reddy
Greenhorn

Joined: Dec 11, 2009
Posts: 12
to find the context root of web module
final String context = getServlet().getServletConfig().getServletContext().getRealPath("/");
 
 
subject: find context root of other web module in same application
 
Threads others viewed
Can we define same war with two different context-root?
Dependency between wars
Confusing Terms ??
Application.xml Module loading order
Please help for Context root
developer file tools