Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display the MultiPartData in the textarea

 
Amy Howard
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic