<div>I&#39;am sorry but of course i have getter&amp;setter methods in my page class.</div>
<div>And i also has these namespace in my html file.</div>
<div>It&#39;s my fault that i didn&#39;t peist these code .</div>
<div>&nbsp;</div>
<div>As i said , i don&#39;t want to show the <font color="#550055">inputFileUpload,</font><font color="#000000">thus i hide it.</font></div>
<div>I want to use another button to achieve the upload function, </div>
<div>so i wrote a js to call the inputFileUpload&#39;s click method , when i clicked another button.</div>
<div>&nbsp;</div>
<div>I wanna if these&#39;s something wrong with my web.xml?</div>
<div>should i write anything else ?</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">2007/10/11, Shinpei Ohtani &lt;<a href="mailto:shinpei.ohtani@gmail.com">shinpei.ohtani@gmail.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hey,<br><br>Ok, I see there might be some problems.<br><br>Is there setter/getter for &quot;private UploadedFile applyFile&quot;?
<br>We must have it.<br><br>And I also mention that your html has namespace something like below<br>to use FileUpload.So, make sure for that.<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 
1.0 Transitional//EN&quot;<br>&quot;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>&lt;html xmlns:x=&quot;<a href="http://myfaces.apache.org/tomahawk">
http://myfaces.apache.org/tomahawk</a>&quot;<br>xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot; xml:lang=&quot;ja&quot; lang=&quot;ja&quot;&gt;<br><br><br>I don&#39;t get there is some javascript for the button, but
<br>I think it does not need to.What is it for?<br><br><br>Before having more help from this ML,<br>please see upload example from teeda-html-example.<br>(<a href="http://teeda.seasar.org/download/2007-10-10/teeda-html-example-1.0.11-SP1.zip">
http://teeda.seasar.org/download/2007-10-10/teeda-html-example-1.0.11-SP1.zip</a>)<br>It might be helpful.<br><br>Thanks, anyway.<br><br><br>2007/10/11, ÀîÀÖ &lt;<a href="mailto:yourslee@gmail.com">yourslee@gmail.com</a>&gt;:
<br>&gt; ----------------------------------------page-----------------------------------------------------<br>&gt; package jp.wess.web.entrcdApply;<br>&gt;<br>&gt; public class EntrcdObjectListPage extends BaseGridPage {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; private UploadedFile applyFile;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public String doPaging() {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super.setLimit(2);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; applyNoDto.setOffset(super.getNewOffset());<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; applyNoDto.setLimit
(super.getLimit());<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (&quot;apply&quot;.equals(flag)) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; applyTargetInfoItems =<br>&gt; getEntrcdTargetInfoDao().getTargetInfoList(applyNoDto);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super.setCount
(applyNoDto.getCount());<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reissueTargetInfoItems =<br>&gt; getEntrcdReissueTargetInfoDao().getList(applyNoDto);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; super.setCount(applyNoDto.getCount
());<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public String doApplyUpload() throws IOException {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String name = applyFile.getName();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long size = 
applyFile.getSize();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(name);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println (size);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputStream in = null;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OutputStream out = null;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String path = &quot;D:\\aaa.txt&quot;;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in = applyFile.getInputStream();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out = new FileOutputStream(path);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int read = 0;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int byteLength = applyFile.getBytes().length;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; byte[] buffer = new byte[byteLength];
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while ((read = in.read(buffer)) != -1) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out.write(buffer, 0, read);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out.close();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in.close();<br>&gt; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;long fileSize1 = 
applyFile.getSize();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; applyFile.getBytes();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (IOException e) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // TODO Auto-generated catch block<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
e.printStackTrace();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; }<br>&gt; ----------------------------------------html-----------------------------------------<br>&gt; &lt;form id=&quot;form&quot;&gt;
<br>&gt; &lt;x:inputFileUpload<br>&gt;&nbsp;&nbsp; id=&quot;applyFile&quot; name=&quot;applyFile&quot; style=&quot;display:none&quot;<br>&gt;&nbsp;&nbsp; value=&quot;#{entrcdApply_entrcdObjectListPage.applyFile}&quot;<br>&gt; /&gt;<br>&gt; &lt;input type=&quot;submit&quot; class=&quot;button large&quot;&nbsp;&nbsp;value=&quot;¥¢¥Ã¥×¥í©`¥É&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;onclick=&quot;uploadfile(&#39;doApplyUpload&#39;,&#39;applyFile&#39;)&quot;<br>&gt; id=&quot;doApplyUpload&quot;/&gt;<br>&gt;<br>&gt; -------------------------------------------------JavaScript-----------------------------------
<br>&gt;<br>&gt;<br>&gt; function uploadfile(btna, btnb) {<br>&gt;<br>&gt; var buttona = document.getElementsByName(btna);<br>&gt; var buttonb = document.getElementByName(btnb);<br>&gt; buttonb.click();<br>&gt; }<br>&gt;<br>
&gt; ÒÔÉÏ¡£<br>&gt; 2007/10/11, Shinpei Ohtani &lt;<a href="mailto:shinpei.ohtani@gmail.com">shinpei.ohtani@gmail.com</a>&gt;:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; Let me see your page class and html.<br>&gt; &gt;<br>&gt; &gt; 2007/10/11, ÀîÀÖ &lt; 
<a href="mailto:yourslee@gmail.com">yourslee@gmail.com</a>&gt;:<br>&gt; &gt; &gt; I want to upload file,but i don&#39;t want to display the inputtext and<br>&gt; button<br>&gt; &gt; &gt; as system designed ,so i hiddened it .
<br>&gt; &gt; &gt; I&#39;d like to place a button to call the uploadfile button which is<br>&gt; hidden.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; My code is like this:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &lt;x:inputFileUpload<br>
&gt; &gt; &gt;&nbsp;&nbsp; id=&quot;applyFile&quot;&nbsp;&nbsp;style=&quot;display:none&quot; name=&quot;applyFile&quot;<br>&gt; &gt; &gt;&nbsp;&nbsp; value=&quot;#{Apply_ListPage.applyFile}&quot;<br>&gt; &gt; &gt; /&gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;&lt;input type=&quot;submit&quot;&nbsp;&nbsp;name=&quot;applyupload&quot;
<br>&gt; value=&quot;¥¢¥Ã¥×¥í©`¥É&quot;<br>&gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;onclick=&quot;uploadfile(&#39;doApplyUpload&#39;,&#39;applyFile&#39;)&quot;<br>&gt; &gt; &gt; id=&quot;doApplyUpload&quot;/&gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>
&gt; &gt; &gt; function uploadfile(btna, btnb) {<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;var buttona = document.getElementsByName(btna);<br>&gt; &gt; &gt;&nbsp;&nbsp;var buttonb = document.getElementsByName(btnb);<br>&gt; &gt; &gt;&nbsp;&nbsp;buttonb.click
();<br>&gt; &gt; &gt; }<br>&gt; &gt; &gt; It doesn&#39;t work. Why?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Is there any other way to achieve my goal.<br>&gt; &gt; &gt; _______________________________________________<br>&gt; &gt; &gt; Seasar-user mailing list
<br>&gt; &gt; &gt; <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>&gt; &gt; &gt; <a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user
</a><br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; --<br>&gt; &gt; =============================<br>&gt; &gt; Shinpei Ohtani<br>&gt; &gt; <a href="mailto:shinpei.ohtani@gmail.com">shinpei.ohtani@gmail.com
</a><br>&gt; &gt; =============================<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Seasar-user mailing list<br>&gt; &gt; <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org
</a><br>&gt; &gt; <a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user</a><br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________
<br>&gt; Seasar-user mailing list<br>&gt; <a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br>&gt; <a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user
</a><br>&gt;<br>&gt;<br><br><br>--<br>=============================<br>Shinpei Ohtani<br><a href="mailto:shinpei.ohtani@gmail.com">shinpei.ohtani@gmail.com</a><br>=============================<br><br>_______________________________________________
<br>Seasar-user mailing list<br><a href="mailto:Seasar-user@ml.seasar.org">Seasar-user@ml.seasar.org</a><br><a href="https://ml.seasar.org/mailman/listinfo/seasar-user">https://ml.seasar.org/mailman/listinfo/seasar-user</a>
<br><br></blockquote></div><br>