Spring invalid dynamic attributes when updating to Java 7 -


i in charge of quite old website @ first compiling java 5 , java 6. i'm using spring 3.1.

i'm trying update java 6/ tomcat 6 java 7 / tomcat 7 , have lot of problems regarding form tags.

for code:

<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>     ... <form:textarea path="mypath" placeholder="hello world" id="myid" rows="1" /> 

i error:

attribute placeholder invalid tag textarea according tld 

it seems lot of attributes using before updating java don't work anymore. have idea why? thanks!

it looks war contains accidentally several versions of tld, , in tomcat 6 correct version found, on tomcat 7 wrong version loaded instead.

if 2 different versions of same jar present in web-inf/lib, there no way predict 1 chosen, results dependent on classloader implementation details, , different tomcat versions might yield different results.

to verify this, try looking in ide multiple versions of file spring.schemas. these files contain mapping between url's such http://www.springframework.org/tags/form , xsds /tlds shipped inside same jar.

this mechanism exists xsds/tlds not published online such url of case, if paste url browser file not exist.

in case there should 2 spring.schemas both mention url http://www.springframework.org/tags/form. remove 1 wrong version of xsd/tld , should work correctly in both tomcat versions.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -