You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Weis <dj...@sjdjweis.com> on 2002/07/06 17:00:01 UTC

Problem with empty file upload field

Hello

I've got file uploading working fine with Struts 1.1b1. I can upload
files with no problem, but I receive an error if I try to submit the
form with the file field on it with no file selected. I'm using a normal
action form, not a dynamic form. This is the error that I receive:

500 Servlet Exception

java.lang.IllegalArgumentException: argument type mismatch
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1574)
	at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1468)
	at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1498)
	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:613)
	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:952)
	at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:795)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:244)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
	at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
	at com.caucho.server.http.Invocation.service(Invocation.java:311)
	at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
	at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
	at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
	at java.lang.Thread.run(Thread.java:484)

I found some other people in the archives that had similar problems but
I never saw a solution. 

Thanks
dave




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Problem with empty file upload field

Posted by Alex Paransky <ap...@standardset.com>.
Could you post a sample of your Form?  I am not really sure then where your
problem could be.

-AP_
http://www.myprofiles.com/member/profile/apara_personal

-----Original Message-----
From: Dave Weis [mailto:djweis@sjdjweis.com]
Sent: Sunday, July 07, 2002 7:15 AM
To: Struts Users Mailing List
Subject: RE: Problem with empty file upload field


On Sat, 2002-07-06 at 23:52, Alex Paransky wrote:
> I think the solution might be to update to the later version of Struts.  I
> know it's scary with the nightly build and all, but I have been using a
> later version of struts without any problems.  I have a page where a user
is
> able to fill in up to 25 names of files to upload, not all are required.
I
> don't get this error when a page is submitted.

I have tried the nightly build and get the same results. The line
numbers are different in the stack trace, but it's the same result.

dave

> -----Original Message-----
> From: Dave Weis [mailto:djweis@sjdjweis.com]
> Sent: Saturday, July 06, 2002 8:00 AM
> To: Struts Users Mailing List
> Subject: Problem with empty file upload field
> I've got file uploading working fine with Struts 1.1b1. I can upload
> files with no problem, but I receive an error if I try to submit the
> form with the file field on it with no file selected. I'm using a normal
> action form, not a dynamic form. This is the error that I receive:
>
> 500 Servlet Exception
>
> java.lang.IllegalArgumentException: argument type mismatch
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at
>
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
> ava:1574)
> 	at
>
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
> ava:1468)
> 	at
>
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:14
> 98)
> 	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:613)
> 	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:952)
> 	at
>
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
> ava:795)
> 	at
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:244)
> 	at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
> 	at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
> 	at
>
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:9
> 6)
> 	at com.caucho.server.http.Invocation.service(Invocation.java:311)
> 	at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
> 	at
> com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
> 	at
>
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272
> )
> 	at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
> 	at java.lang.Thread.run(Thread.java:484)
>
> I found some other people in the archives that had similar problems but
> I never saw a solution.
>
> Thanks
> dave
>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Problem with empty file upload field

Posted by Dave Weis <dj...@sjdjweis.com>.
On Sat, 2002-07-06 at 23:52, Alex Paransky wrote:
> I think the solution might be to update to the later version of Struts.  I
> know it's scary with the nightly build and all, but I have been using a
> later version of struts without any problems.  I have a page where a user is
> able to fill in up to 25 names of files to upload, not all are required.  I
> don't get this error when a page is submitted.

I have tried the nightly build and get the same results. The line
numbers are different in the stack trace, but it's the same result.

dave

> -----Original Message-----
> From: Dave Weis [mailto:djweis@sjdjweis.com]
> Sent: Saturday, July 06, 2002 8:00 AM
> To: Struts Users Mailing List
> Subject: Problem with empty file upload field
> I've got file uploading working fine with Struts 1.1b1. I can upload
> files with no problem, but I receive an error if I try to submit the
> form with the file field on it with no file selected. I'm using a normal
> action form, not a dynamic form. This is the error that I receive:
> 
> 500 Servlet Exception
> 
> java.lang.IllegalArgumentException: argument type mismatch
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at
> org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
> ava:1574)
> 	at
> org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
> ava:1468)
> 	at
> org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:14
> 98)
> 	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:613)
> 	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:952)
> 	at
> org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
> ava:795)
> 	at
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:244)
> 	at
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
> 	at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
> 	at
> com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:9
> 6)
> 	at com.caucho.server.http.Invocation.service(Invocation.java:311)
> 	at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
> 	at
> com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
> 	at
> com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272
> )
> 	at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
> 	at java.lang.Thread.run(Thread.java:484)
> 
> I found some other people in the archives that had similar problems but
> I never saw a solution.
> 
> Thanks
> dave
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Problem with empty file upload field

Posted by Alex Paransky <ap...@standardset.com>.
I think the solution might be to update to the later version of Struts.  I
know it's scary with the nightly build and all, but I have been using a
later version of struts without any problems.  I have a page where a user is
able to fill in up to 25 names of files to upload, not all are required.  I
don't get this error when a page is submitted.

Try a later version, it might be just a drop in replacement of the 1.1b1 you
are using.

-AP_
http://www.myprofiles.com/member/profile/apara_personal

-----Original Message-----
From: Dave Weis [mailto:djweis@sjdjweis.com]
Sent: Saturday, July 06, 2002 8:00 AM
To: Struts Users Mailing List
Subject: Problem with empty file upload field



Hello

I've got file uploading working fine with Struts 1.1b1. I can upload
files with no problem, but I receive an error if I try to submit the
form with the file field on it with no file selected. I'm using a normal
action form, not a dynamic form. This is the error that I receive:

500 Servlet Exception

java.lang.IllegalArgumentException: argument type mismatch
	at java.lang.reflect.Method.invoke(Native Method)
	at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
ava:1574)
	at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
ava:1468)
	at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:14
98)
	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:613)
	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:952)
	at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:795)
	at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:244)
	at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
	at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
	at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:9
6)
	at com.caucho.server.http.Invocation.service(Invocation.java:311)
	at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
	at
com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
	at
com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272
)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
	at java.lang.Thread.run(Thread.java:484)

I found some other people in the archives that had similar problems but
I never saw a solution.

Thanks
dave




--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Problem with html:link and html:img

Posted by Ravi Kora <rk...@1bigthink.com>.
Yes, that is what I have tried. But it doesn't seem to work.

Regards,
Ravi Kora

-----Original Message-----
From: Nina-Annick Stranzenbach [mailto:nina.stranzenbach@sourcepark.net]

Sent: Monday, July 08, 2002 9:44 AM
To: 'Struts Users Mailing List'
Subject: Re: Problem with html:link and html:img


have you tried  <html:link onclick="func()" >
			<html:img src="submit.gif" /> 
		</html:link> ?


On Mon, 2002-07-08 at 16:08, Ravi Kora wrote:
> Hi,
> I have a page where I want to combine my html:link and html:img tags. 
> In regular html, it would be something like this. <a 
> href="dummy.html"><img src="submit.gif" ></a>
> 
> I want to write the same thing using struts tags.On clicking the 
> image, I want to invoke a JavaScript function which eventually submits

> the form. So, I wrote my code like this. <html:link onClick="func()" >

> <html:img src="submit.gif" /> </html:link>
> 
> This code does not work.I am using Struts 1.0.2. Can someone please 
> help me with this?
> 
> 
> Thanks & Regards,
> Ravi Kora
> rkora@1bigthink.com
> 
> 
> --
> To unsubscribe, e-mail: 
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Problem with html:link and html:img

Posted by Nina-Annick Stranzenbach <ni...@sourcepark.net>.
have you tried  <html:link onclick="func()" >
			<html:img src="submit.gif" /> 
		</html:link> ?


On Mon, 2002-07-08 at 16:08, Ravi Kora wrote:
> Hi,
> I have a page where I want to combine my html:link and html:img tags. In
> regular html, it would be something like this. 
> <a href="dummy.html"><img src="submit.gif" ></a> 
> 
> I want to write the same thing using struts tags.On clicking the image,
> I want to invoke a JavaScript function which eventually submits the
> form. So, I wrote my code like this. <html:link onClick="func()" >
> <html:img src="submit.gif" /> 
> </html:link>
> 
> This code does not work.I am using Struts 1.0.2. Can someone please help
> me with this?
> 
> 
> Thanks & Regards,
> Ravi Kora
> rkora@1bigthink.com
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Problem with html:link and html:img

Posted by Ravi Kora <rk...@1bigthink.com>.
Hi,
I have a page where I want to combine my html:link and html:img tags. In
regular html, it would be something like this. 
<a href="dummy.html"><img src="submit.gif" ></a> 

I want to write the same thing using struts tags.On clicking the image,
I want to invoke a JavaScript function which eventually submits the
form. So, I wrote my code like this. <html:link onClick="func()" >
<html:img src="submit.gif" /> 
</html:link>

This code does not work.I am using Struts 1.0.2. Can someone please help
me with this?


Thanks & Regards,
Ravi Kora
rkora@1bigthink.com


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


html:link and html:img combination

Posted by Ravi Kora <rk...@1bigthink.com>.
Hi,
I have a page where I want to combine my html:link and html:img tags. In
regular html, it would be something like this.
<a href="dummy.html"><img src="submit.gif" ></a> 

I want to write the same thing using struts tags.On clicking the image,
I want to invoke a JavaScript function.So, I wrote my code like this.
<html:link onClick="func()" >
<html:img src="submit.gif" /> 
</html:link>

This code does not work.I am using Struts 1.0.2. Can someone please help
me with this?


Thanks & Regards,
Ravi Kora
rkora@1bigthink.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>