java - Struts2 s:url for a image in s:submit not working -


i have jsp form:

<s:form action="gestionpagos.action">     <s:hidden key="actividad.id" />     <s:submit type="image"          src="<s:url value ="/internal resources/imagenes/alta.png"/>">     </s:submit> </s:form> 

but, when try render in browser, struts throws error:

org.apache.jasper.jasperexception: /private/gestioncalendarios/menucalendario.jsp (línea: 144, columna: 1) /private/gestioncalendarios/listadoactividadcolaboradores.jsp (línea: 51, columna: 64) tag <s:submit not ended 

i'm pretty sure tag worked before, after update, didn't work anymore.

i can make work using classic html input tag, or splitting button 2 steps: using url tag variable , then, using in src field of submit. want know why isn't working , correct form of tag.

you can't use struts tags inside tag attribute. don't need provide action extension action attribute of s:form tag. rewrite like

<s:url var="imgurl" value ="/internal resources/imagenes/alta.png"/> <s:form action="gestionpagos">     <s:hidden name="actividad.id" />     <s:submit type="image" src="%{#imgurl}"/> </s:form> 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -