Hi, I am doing the same at present within the servlet but it will cause another request to the servlet of /myhost/sim application which I want to avoid. Is it possible to trap it beforehand, before entering into servlet. Can't it be handled on the servlet engine level where engine will recognise the servlet context with respect to request and forward to the appropriate web-application servlet.
I was talking about how JSP engines handles this kind of situations,not how do we forward the request in JSPs. In JSPs if you post a request to another application-JSP it recognize the request and forward to that JSP engine. Please advice Many Thanks -Shrikant >From: satya vennapusala <[EMAIL PROTECTED]> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java > Servlet API Technology." <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Multi web-application navigation >Date: Fri, 12 Oct 2001 13:13:01 +0530 > >In case of servlets > > get the servlet context(sc = >ServletContext.getContext(/myhost/sim/index.html)) of other web >application and there by get the Request >dispatcher(sc.getRequestDispacher(relativeUrl to /myhost/sim) ) and >forward. > >I think in case of JSPs > > response.sendRedirect(with obsolute url) will work > >Regards >Satya.v > >-----Original Message----- >From: shrikant vashishtha [mailto:[EMAIL PROTECTED]] >Sent: Thursday, October 11, 2001 7:52 PM >To: [EMAIL PROTECTED] >Subject: Multi web-application navigation > > >Hi, > >I am working in a project which does use the Front-Controller J2EE >pattern >for controlling the navigation. It works with a servlet which accept >virtual >links for navigation. So instead of calling /myhost/cash/sample.jsp we >call >/myhost/cash/sample.event. When the servlet receives request to >/myhost/cash/sample.event, it can choose to display content from an HTML >page, a JSP page, or even a servlet. We have multiple web application >which >deploy this servlet for navigation. > >Now the problem comes when I want to navigate from one web-application >to >another web-application. For example I want to navigate from >/myhost/cash >application to /myhost/sim/ posting a /myhost/sim/sample1.event. The >request >goes to servlet of the same servlet context ie. of /myhost/cash and the >request URI it gets becomes /myhost/cas/myhost/sim/sample1.event which >does >not exist in the system and I get an exception. > >I have worked on a work-around which extracts the web-application id >from >request.getRequestURI() as /myhost/sim, gets the servlet context of this >web-applicaion and forward it using the request dispatcher of >/myhost/sim >application. > >But the question arise how does JSP engine works. If I want to navigate >from >one web-application JSP to another web-application JSP, it does allow me >to >do it. > >Is there any methodology by which it can be assured that it is invoking >the >right servlet of right web-application. So if I fire >/myhost/sim/sample1.jsp >from /myhost/cash web-application, it should get the servlet of >/myhost/sim >not of /myhost/cash. > >Many Thanks, >-ShriKant > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at >http://explorer.msn.com/intl.asp > >________________________________________________________________________ >___ >To unsubscribe, send email to [EMAIL PROTECTED] and include in the >body >of the message "signoff SERVLET-INTEREST". > >Archives: http://archives.java.sun.com/archives/servlet-interest.html >Resources: http://java.sun.com/products/servlet/external-resources.html >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > >___________________________________________________________________________ >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body >of the message "signoff SERVLET-INTEREST". > >Archives: http://archives.java.sun.com/archives/servlet-interest.html >Resources: http://java.sun.com/products/servlet/external-resources.html >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
