Results 1 to 4 of 4

Thread: form:radiobuttons tag breaking during upgrade from spring 2.5 to 3.0

  1. #1
    Join Date
    Apr 2007
    Posts
    9

    Default form:radiobuttons tag breaking during upgrade from spring 2.5 to 3.0

    Hi everyone,

    I'm trying to upgrade my web app from spring 2.5 to 3.0. On one particular page I get a strange error message:

    Code:
    org.apache.jasper.JasperException: /jsps/clientMessage.jsp(87,9) No tag "radiobuttons" defined in tag library imported with prefix "form"
    	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
    	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
    This page works properly when built under spring 2.5. Here's the markup i'm using to generate radio buttons.


    Code:
    <spring:bind path="allClients">
    	        <form:radiobuttons 
    	        	path="allClients" 
    	            items="${MessageModel.clientTypes}" 
    	            itemLabel="label" 
    	            element="li"
    	            onclick="disableSelectClients()"
    	            />
    	    	<li onclick="enableSelectClients()"><input id="allClients0" name="allClients" type="radio" value=""/><label for="allClients0">Specific Clients</label></li>
    	    </spring:bind>
    According to the docs here, the radiobuttons tag is still supported:

    http://static.springsource.org/sprin...-form.tld.html

    Does anyone have any advice? I was thinking maybe it is a maven dependency issue, but I've been unable to locate any additional information on which jars i might need. Here are the dependencies I'm including:

    Code:
    	<properties>
    		<spring.version>3.0.5.RELEASE</spring.version>
    	</properties>
    	<dependencies>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-web</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-asm</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-beans</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-core</artifactId>
    			<version>${spring.version}</version>
    		</dependency>		
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-context</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-expression</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-webmvc</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-tx</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-orm</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-jdbc</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-aop</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework</groupId>
    			<artifactId>spring-test</artifactId>
    			<version>${spring.version}</version>
    		</dependency>
    ...
    Any help is appreciated!

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,806

    Default

    Just curious

    why you are working in the same time with

    Code:
    <spring:bind path="allClients">
    and
    Code:
    <form:radiobuttons path="allClients"
    with one should be enough (the second is better of course, less code)

    I'm trying to upgrade my web app from spring 2.5 to 3.0. On one particular page I get a strange error message:
    Post here the namespaces declaration for your jsp file
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Apr 2007
    Posts
    9

    Default

    Code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    Those are my imports. http://www.springframework.org/tags/form doesn't resolve in my browser, but I haven't been able to find out what it should be changed to. I'm currently checking out the source code for spring


    As for using spring:bind, I wrote this page a long time ago so my memory is fuzzy. I believe it just didn't work w/o it because of the need for me to add an additional radio button to the list outside of the <form:radiobuttons> tag. In this particular page you are selecting from several predefined groups of clients, with the final option revealing a multiselect that you can use to select specific clients you want to work with.

    Thanks!

  4. #4
    Join Date
    Apr 2007
    Posts
    9

    Default

    I was looking around and I was able to solve my problem. Based on this link:

    http://forum.springsource.org/archiv...p/t-38727.html

    It occured to me that the problem could be conflicting versions of spring. Sure enough, several dependencies included either spring 2.5 or spring 2.0. Cleaning this up solved the problem, which i believe stems from the fact that 2.0 doesn't include the radiobuttons tag.

    In case anyone is curious, the following maven command was helpful:

    Code:
    mvn dependency:tree -Dincludes=org.springframework:spring:jar:2.5.6.SEC01
    Thanks for your help with this dr_pompeii!

    PS: Love the scripture in your sig

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •