wood burning stoves 2.0*
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
Author

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
multipartdata:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
BufferedOutputStream bos = null;
BufferedInputStream bis = null;
javax.servlet.ServletOutputStream out = null;
DataInputStream in = null;
readMultiPartData(request,in);
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);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
toValidateXML.jsp
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<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>
</HEAD>
<BODY bgcolor="#FFFFFF">
<h1>XML Generator Web</h1>
<table width=100%>
<tr>
<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>
</tr>
</table>
<hr/>
<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>
<BR>
<textarea rows="20" cols="62" name="xmlDocument" readonly></textarea><BR>
<BR>
<INPUT type="button" value="Validate"> <INPUT type="submit" name="btnUpdate" value="Update"> <INPUT type="submit" name="btnClose" value="Close"></FORM>
</BODY>
</HTML>
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

"Amy01"-
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
 
Don't get me started about those stupid light bulbs.
 
subject: How to display the MultiPartData in the textarea