Muddaser Azeem wrote:
>
> i couldn't get u exactly but i'm telling u wt i
> understand.
> Just get all the values in variables through
> request.getParameter() and the arrange them in the
> jsp:forward tag.
>
> like this
>
> str customerName= request.getParameter("txtName");
> out.print("<jsp:forward page='aaa.jsp?custName="
> +customerName +"&name1=value1&name2=value2'>");
> I think its wt u r expacting.
No, I'm afraid that doesn't work at all. I'm no longer sure
what the original question in this long running thread was,
but you can't use out.print() to add JSP elements dynamically
to a page like you suggest; what you write to out is sent
directly to the browser, without further server-side processing.
In general, when you use <jsp:forward> or <jsp:include> to
let another JSP page process the same request, the new page
gets access to all original request parameters (plus all
objects in the request, session and application scope). You
can pass on additional request parameters by using nested
param elements:
<jsp:forward page="somePage.jsp">
<jsp:param name="someNewPar" value="someValue" />
</jsp:forward>
Be careful about using the correct tag syntax; a start
and a stop tag for the main element, and the shorthand
notation (/>) for the nested element without a body.
If the parameter value must be dynamically assigned, you
can use the request-time attribute value syntax:
<jsp:forward page="somePage.jsp">
<jsp:param name="someNewPar" value="<%= aVariable %>" />
</jsp:forward>
The <jsp:param> element is only supported in JSP 1.1 containers.
This has been the subject of numerous threads over the last few
days, so if this is still not clear, please search the archives
before asking follow-up questions:
<http://archives.java.sun.com/archives/jsp-interest.html>
This is also described in most (all) JSP books. If you're new to
JSP, save yourself a lot of headaches and read up on the basics
before you start developing your application. My JSP book describes
how to communicate between JSP pages, between servlets and JSP
pages, and a whole lot of other things you will need to know
about:
<http://TheJSPBook.com/>
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets