jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes How to display the MultiPartData in the textarea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to display the MultiPartData in the textarea" Watch "How to display the MultiPartData in the textarea" New topic

How to display the MultiPartData in the textarea

Amy Howard
Ranch Hand

Joined: Jul 11, 2002
Posts: 86
Could you please tell me how to display the MultiPartData in the textarea in the toValidateXML.jsp page?
Here is the code running in servlet to read the
BufferedOutputStream bos = null;
BufferedInputStream bis = null;
javax.servlet.ServletOutputStream out = null;
DataInputStream in = null;
bos = new BufferedOutputStream(out);
byte buff[] = new byte[2048];
int bytesRead;
while(-1 != (bytesRead = in.read(buff, 0, buff.length)))
bos.write(buff, 0, bytesRead);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta name="GENERATOR" content="IBM WebSphere Page Designer V3.5.3 for Windows">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="xmlGenerator.css">
<TITLE>Validate XML Document</TITLE>
<BODY bgcolor="#FFFFFF">
<h1>XML Generator Web</h1>
<table width=100%>
<td width="25%"><a href="toValidateXML.jsp">Validate XML Document</a></td>
<td width="25%"><a href="toCreateXML.jsp">Create XML Document</a></td>
<td width="25%"> </td>
<td width="25%"> </td>
<FORM name="View" method="POST" ENCTYPE="multipart/form-data" action="/art/controller/View"><B>Step 1:</B> Select XML File: <INPUT type="File" name="userFile" size="20"><BR>
<B>Step 2:</B> <INPUT type="submit" name="btnOpen" value="Open"> XML File: <BR>
<textarea rows="20" cols="62" name="xmlDocument" readonly></textarea><BR>
<INPUT type="button" value="Validate"> <INPUT type="submit" name="btnUpdate" value="Update"> <INPUT type="submit" name="btnClose" value="Close"></FORM>
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

Welcome to the JavaRanch! Please adjust your displayed name to match the JavaRanch Naming Policy.
You can change it here.
Thanks! and again welcome to the JavaRanch!
Also -- Check out out the handy dandy UBB [code] tags that allow you preserve WhiteSpace in your code.
[ July 15, 2002: Message edited by: Jessica Sant ]

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
I agree. Here's the link: http://aspose.com/file-tools
subject: How to display the MultiPartData in the textarea
It's not a secret anymore!