# struts: Bild als submit-button



## jean20 (4. Mrz 2007)

Hallo,
ich möchte ein Bild als submit button nutzen. Nach dem Klicken soll das Programm in die execute-Methode der Action reinspringen.


```
<html:form action="/NavigationAction.do" method="post">
					<td width="60" height="43"><html:image
						src="img/buttons/start.PNG" property="start" onclick="/NavigationAction.do" />
					</td>
				</html:form>
```

In meiner NavigationForm habe ich das Attribut "start" mit den ensprechnden getter und setter.

Wieso bekomme ich diese Fehlermeldung?


```
20:34:19,129 ERROR [[action]] Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: No bean specified
	at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751)
	at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937)
	at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
	at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:816)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
```




Danke für die Hilfe


----------



## HaBaLeS (4. Mrz 2007)

Ich vermute mal, das Getter/Setter für "start" im ActionForm falsch sind. Ist der Objettype ein 
ImageButtonBean? Ist der zugriff public? Wie sieht das Mapping in der StrutsConfig aus ?


----------



## velaluka (7. Mrz 2007)

Hallo,
versuch es doch mal so:

```
<html:image onclick="javascript:submit()" alt="Editieren"
						src="../static/img/find.jpg" />
```
Die Action ist ja schon in der Html:form angegeben. Sie muss nur noch Submittet werden.
Ciao velaluka


----------

