Hello I have two web apllications in the Weblogic server but in different context roots. From a Jsp page of the first application i want to do a forward or redirect to the other application and pass some parameters. I have the parameters in the session (session.setAttribute(..)), but i can change it. If i do "response.sendRedirect("http://localhost:7001/application2.jsp")" i lose the session! If i use the "<jsp:forward page="../application2/index.jsp"/>", it does not work beacause the applications are in differents contexts! How can i resolve this??? I can always do response.sendRedirect("http://localhost:7001/application2/index.jsp?parameter1=xpto¶meter2=gggg") but this is no a very nice way if i have many parameters to pass.
Hi, You can try this ServletContext context = application.getContext("/demo");//path of other application RequestDispatcher rd = context .getRequestDispatcher("/demo/inner.jsp"); rd.farword(request,response);
This will pass your request object to another jsp
posted 17 years ago
Hello The solution does not work! The method getServletContext() is not known!!! I did the import of java.servlet.* but it stills not recognize the method!