Pages

Friday, May 23, 2014

The prefix "util" for element "util:set" is not bound.



If you get the following error in while executing a Spring program.Following are the steps to resolve it.

Add the namespaces (the ones that are highlighted below in your spring configuration file)

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:util="http://www.springframework.org/schema/util"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/util
  http://www.springframework.org/schema/util/spring-util-2.5.xsd">

This will resolve the issue
    public class HelloWorld {
       private String message;
     
       public void setMessage(String message){
          this.message  = message;
       }
     
       public void getMessage(){
          System.out.println("Your Message : " + message);
       }
    }



No comments:

Post a Comment