aspose file tools
The moose likes Distributed Java and the fly likes communication between two webapps which are in the same server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Distributed Java
Reply locked New topic
Author

communication between two webapps which are in the same server

siva krishna pallapu
Greenhorn

Joined: Aug 12, 2008
Posts: 7




Hi friends,

Here is my requirement I have a jsp page, jsp1.jsp in app1. The jsp page consists of header, footer and body, the header and footer are in the app1 and I need to display jsp2.jsp in the body part of jsp1 which is to be rendered through action class or a sevlet of the app2 and is below is my code in body of jsp1.jsp

ServletContext sc=null;
sc=request.getSession().getServletContext().getContext("/app2");
System.out.println("sc-->"+sc);

RequestDispatcher rd=sc.getRequestDispatcher("authenticate.do");
rd.include(request, response);

but the code is giving the following error in both Tomcat and JBoss
The requested resource (/app2/authenticate.action) is not available
and I kept <Context crossContext="true"> in context.xml in Tomcat too

Thanks in advance

Siva
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12327
    
    1
Please do NOT post the same question in multiple forums. Since you are talking about web apps, the servlet OR the jsp forum would be the right place.

Bill

Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: communication between two webapps which are in the same server
 
Similar Threads
ok new question...
Tiles - need to put html, body tag ?
struts2 + Tiles, why pages shrink in top center ?
Tiles Refresh!!!
communication between two webapps which are in the same server