Thanks for that, Jan. I don't think it is what I am looking for, although
it might be my only solution.
I am trying to find a pure JSP way of accessing the HTML. For instance, my
JSP might look something like this...
<jsp:useBean id="usethisbean" class="package.JavaBean" />
<jsp:setProperty name="usethisbean" property="*" />
<HTML>
<HEAD>
</HEAD>
<BODY>
The result of the database query is <jsp:getProperty name="usethisbean"
property="value"/>
</BODY>
</HTML>
The HTML source at the browser would look like this:
<HTML>
<HEAD>
</HEAD>
<BODY>
The result of the database query is MyValue
</BODY>
</HTML>
When I detach it using the JavaScript button function, I don't want to call
the JSP again or re-submit the database query. All I want to do is send
the actual HTML source to the browser again by retrieving it using servlet
APIs or something. I don't even know if this is possible.
David
Jan Aren�
<[EMAIL PROTECTED] To: [EMAIL PROTECTED]
E> cc:
Sent by: A Subject: SV: How do I access the
static HTML generated by a JSP?
mailing list
about Java Server
Pages
specification and
reference
<JSP-INTEREST@JAV
A.SUN.COM>
22/10/2001 14:15
Please respond to
A mailing list
about Java Server
Pages
specification and
reference
I don't know if this is what you're after but here it goes....
you can do like this
First your normal jsp page... bla bla
Say you have these variables...
String var1 = "lost";
String var2 = "and";
String var3 = "found";
<script language="javascript">
function test(para1, para2)
{
alert("Message : " + para1 + " and "+ para2 + " and this jsp thing
<%=var1%>
}
</script>
<a href="javascript:test('<%=var2%>','<%=var3%>')>Press this</a>
So you can build up the parameters to a script this way...
Combine this with a OnLoad="test('<%=var1%>','<%=var2%>')" and you can open
a new window when the jsp-page is loaded at in clients browser...
Hope it helped...
// Jan
-----Ursprungligt meddelande-----
Fr�n: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]F�r David Stevenson
Skickat: den 22 oktober 2001 12:19
Till: [EMAIL PROTECTED]
�mne: How do I access the static HTML generated by a JSP?
I have a JSP which creates a view of a file query in a browser frame. I
want
to be able to submit a JavaScript button function to 'detach' the page from
the frame and open it in its own browser window. Please note I do not want
to re-submit the JSP or the database query.
The JavaScript side of things is no problem, but I would like to know if
there is any way of accessing the actual HTML of the first page so that I
can re-display it in the new window?
Thanks
David
===========================================================================
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://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.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://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.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://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com