turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Figurov <vfigu...@asia-soft.kz>
Subject Upload two or more files on one POST
Date Fri, 13 Aug 2004 08:07:09 GMT
Hi !
Jetspeed 1.5/turbine22(default template=jsp)/Tomcat5.0.18/Mozilla
If in the form for upload two or more files to leave last field <input 
type="file"> empty  - Exception takes off  !!!
And this Exception - is before run Action method in portlet 8((((

DocsUploads.jsp
<form name="form1" method="post" action="<jetspeed:dynamicUri/>" 
enctype="multipart/form-data">
  <INPUT TYPE="hidden" NAME="js_peid" VALUE="<%=jspeid%>"/>
  <input type="hidden" name="currPage" value="<%=currPage%>"/>
  <tr>
    <td><jetspeed:l10n key="DOCUMENT_DATE_ACTIVATE"/>:</td>
    <td><jsp:include 
page="<%="DateSelector.jsp?nameDateSelector="+Documents.NAME_DATE_SELECTOR+"&nameTimeSelector="+Documents.NAME_TIME_SELECTOR%>"/></td>
  </tr>
  <tr>
    <td><jetspeed:l10n key="CUSTOMIZER_DESCRIPTION"/>:</td>
    <td><input type="text" name="title" size="100" maxlength="1600"/></td>
  </tr>
  <tr>
    <td><jetspeed:l10n key="DOCUMENT_LOADING_FILE"/> 
<%=TurbineUpload.getSizeMax()%></td>
    <td><input type="file" name="content_file"/></td>
<!-- ------------------------------------------------

It's FERST FIELD

-------------------------------------------------- -->

  </tr>
  <tr>
    <td><jetspeed:l10n key="DOCUMENT_ENCODING"/>:</td>
    <td>
      <SELECT NAME="file_encoding">
        <OPTION VALUE="Windows-1251">Windows-1251</OPTION>
        <OPTION VALUE="UTF-8">UTF-8</OPTION>
      </SELECT>
    </td>
  </tr>
  <tr>
    <td><jetspeed:l10n key="DOCUMENT_LOADING_ADDON_FILE"/> 
<%=TurbineUpload.getSizeMax()%></td>
    <td><input type="file" name="content_file"/></td>
<!-- ------------------------------------------------

It's SECOND FIELD
If this field user is stay empty - We have Exception 8(((
-------------------------------------------------- -->

  </tr>
  <tr>
    <td colspan="2">
      <input
type="submit"
name="eventSubmit_doAdd"
value="<jetspeed:l10n key="CUSTOMIZER_ADD"/>"
onClick="form1.title.value=escape(form1.title.value)"/>
    </td>
  </tr>
  </form>


Exception is:


      Stacktrace:

      
          java.lang.ClassCastException
	at org.apache.turbine.util.parser.BaseValueParser.getStrings(BaseValueParser.java:947)
	at org.apache.turbine.util.parser.BaseValueParser.append(BaseValueParser.java:296)
	at org.apache.turbine.services.upload.TurbineUploadService.parseRequest(TurbineUploadService.java:210)
	at org.apache.turbine.services.upload.TurbineUpload.parseRequest(TurbineUpload.java:174)
	at org.apache.turbine.util.parser.DefaultParameterParser.setRequest(DefaultParameterParser.java:188)
	at org.apache.jetspeed.util.parser.DefaultJetspeedParameterParser.setRequest(DefaultJetspeedParameterParser.java:84)
	at org.apache.turbine.services.rundata.DefaultTurbineRunData.getParameters(DefaultTurbineRunData.java:493)
	at org.apache.turbine.Turbine.doGet(Turbine.java:472)
	at org.apache.turbine.Turbine.doPost(Turbine.java:658)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
	at java.lang.Thread.run(Thread.java:536)
      
        


-- 
Vladimir


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Mime
View raw message