Thanks to all,
I've got this but one more :
I have a Frames-page ,in it one of them a JSP page.
When I directly call a Jsp page from a srevlet, I can get session
parameters but when I do the same in this Frames page.Jsp page, my
session is shown to be null. How to get these session params in this
page.
or else
If I'm able to pass params from one JSP page to another JSP page,my
requirement will be met.
waiting for your solutions..
Thanks in advance,
Chary
----------
From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, January 19, 2000 7:52 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: regs servlet calling Jsp...
Sun as good examples that comes with jswdk-1.0.1 and orion has those
examples too. This are the code snippet from Sun's examples:
Source Code for Servlet calling JSP
import javax.servlet.*;
import javax.servlet.http.*;
public class servletToJsp extends HttpServlet {
public void doGet (HttpServletRequest request,
HttpServletResponse response) {
try {
// Set the attribute and Forward to hello.jsp
request.setAttribute ("servletName", "servletToJsp");
getServletConfig().getServletContext().getRequestDispatcher("/examples/jsp/j
sptoserv/hello.jsp").forward(request, response);
} catch (Exception ex) {
ex.printStackTrace ();
}
}
}
Source Code for JSP calling servlet
<!-- Forward to a servlet -->
<jsp:forward page="/servlet/servletToJsp" />
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 18, 2000 7:50 AM
To: [EMAIL PROTECTED]
Subject: regs servlet calling Jsp...
Hi all,
Can anyone help me how to call a JSP from a servlet.
1.) I've tried with "callPage" but I'm getting ClassCastException at
this step:
((com.sun.server.http.HttpServiceResponse)
res).callPage("/DisplayData.jsp", req);
2.) I can call a JSP page with sendRedirect but I can't send the
information from servlet to this page.
Is it possible to send info from servlet thru sendRedirect. If
so,pl
let me know.
Help me out.
Thanks in advance,
Chary
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html