<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:st1 = 
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Nachricht</TITLE>

<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<META content="Microsoft Word 10" name=Originator><LINK 
href="cid:filelist.xml@01C28BD3.F545D530" rel=File-List><o:SmartTagType 
name="City" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType 
name="place" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<STYLE>st1\:* {
        BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin: 35.4pt; mso-footer-margin: 35.4pt; mso-paper-source: 0; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=EN-US style="tab-interval: 36.0pt" vLink=purple link=blue>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2>Nico,</FONT></SPAN></DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff size=2>you 
dont need any extra jars to handle multipart uploads. OpenCms already does this 
for you.</FONT></SPAN></DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff size=2>On a 
JSP:</FONT></SPAN></DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2><%</FONT></SPAN></DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2>com.opencms.file.CmsObject cms = 
((com.opencms.flex.cache.CmsFlexRequest)request).getCmsObject();</FONT></SPAN></DIV>
<DIV><SPAN class=946114608-15112002><FONT color=#0000ff>
<P><FONT face=Arial size=2>Enumeration files = 
cms.getRequestContext().getRequest().getFileNames();</FONT></P>
<P><B><FONT color=#000080><FONT face=Arial size=2>while</FONT></B></FONT><FONT 
face=Arial size=2>(files.hasMoreElements()) {</FONT></P>
<P><FONT face=Arial><FONT size=2><SPAN 
class=946114608-15112002>    String </SPAN>filename = 
(String)files.nextElement();</FONT></FONT></P>
<P><FONT face=Arial><FONT size=2><STRONG><FONT color=#000080><SPAN 
class=946114608-15112002>    </SPAN>byte</FONT></STRONG>[] 
filecontent = <FONT 
size=2>cms.getRequestContext().getRequest().getFile(filename);</FONT></FONT></FONT></P>
<P><FONT><SPAN class=946114608-15112002><FONT face=Arial 
size=2>    // do somthing with filename / filecontents here 
...</FONT></SPAN></P></FONT>
<P>}</P></FONT></SPAN></DIV>
<DIV><SPAN class=946114608-15112002>
<P><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2>%></FONT></SPAN></P>
<P><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff size=2>I did 
not try this code on an actual JSP page but this is the way things work in 
general. <BR>For more examples see classes "</FONT><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>com.opencms.workplace<SPAN 
class=946114608-15112002>.<FONT size=2>CmsNewResourceUpload" and<BR><FONT 
size=2>"com.opencms.core.<FONT 
size=2>CmsRequestHttpServlet".</P></FONT></FONT></FONT></SPAN></FONT></FONT></FONT></SPAN><SPAN 
class=946114608-15112002><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=946114608-15112002><FONT 
size=2></FONT></SPAN></FONT></FONT></FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff size=2><!-- Converted from text/plain format --><BR>
<P><FONT size=2>Best Regards,<BR>Alex.<BR><BR>Alexander Kandzior<BR>OpenCms 
Group / Alkacon Software</FONT> </P></FONT></SPAN></DIV>
<DIV><SPAN class=946114608-15112002><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=de dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> 
  owner-opencms-dev@www.opencms.org [mailto:owner-opencms-dev@www.opencms.org] 
  <B>On Behalf Of </B>Nico Krause<BR><B>Sent:</B> Thursday, November 14, 2002 
  11:52 AM<BR><B>To:</B> opencms-dev@opencms.com<BR><B>Subject:</B> 
  [opencms-dev] how does multipart/form-data on JSP and parameters.get 
  work?<BR><BR></FONT></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi 
  All,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Does somebody tried uploading 
  files (multipart/form-data) <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">together with JSP-pages in 
  OpenCMS?<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I got currently following error in 
  error log....<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">"Corrupt form data: premature 
  ending"<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I use the cos.jar (contains 
  MultipartRequest) in a class which handles the uploads. 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Normal Tomcat does the job. The 
  cos.jar is also in the OpenCMS - lib directory. (no exception no other 
  exception is thrown...)<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Does anybody has an example for me 
  how does file upload works within OpenCMS?<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">As normal template based method 
  and maybe as JSP - page?<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thank you in advance - if 
  possible.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Best 
  Regards,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Nico<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">____________________________________</SPAN></FONT><SPAN 
  style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">Nico 
  Krause</SPAN></FONT><SPAN style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">NorthStar 
  Communications GmbH</SPAN></FONT><SPAN 
  style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">Wallbergstr. 
  20-22     85221 </SPAN></FONT><st1:City><st1:place><FONT 
  face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">Dachau</SPAN></FONT></st1:place></st1:City><SPAN 
  style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">Telefon: +49 
  (0) 81 31 / 9 96 87 - 53</SPAN></FONT><SPAN 
  style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">Fax:      +49 
  (0) 81 31 / 9 96 87 - 29</SPAN></FONT><SPAN 
  style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-no-proof: yes">Mobil:    
  +49 (0) 1 71 / 3 70 10 70</SPAN></FONT><SPAN 
  style="mso-no-proof: yes"><o:p></o:p></SPAN></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; mso-no-proof: yes"> <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; mso-no-proof: yes"> </SPAN><o:p></o:p></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>