Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HELP passing large string between JSP pages - HTML or JavaScript to Java

807591Apr 7 2008 — edited Apr 15 2008
I am trying to pass a large string (say 5000 chars) between two JSP pages with the string starting from HTML.
I utlimately want to get the value in Java, but I cannot use Post -- the passing of info needs to happen separately.

Right now I do this (pseudo code):
(Page1.jsp)
<html>
<textarea name='sample' value=[string goes here]>
</html>
<script>
this.location=page2.jsp?mystr=this.document.sample.value;
</script>

(Page2.jsp)
<%
String myStr=getParameter("mystr");
%>

This works well if the string is small, but when it is large it gets truncated.

Besides using POST, do you have any suggestions?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 13 2008
Added on Apr 7 2008
29 comments
1,365 views