Saturday, June 16, 2012

What is difference between id and name of bean?


id of bean is a unique in container  for each bean . id is basically used to access the bean anywhere. but it not accept the url matching like in spring framework. name is partially work like id but it can accept url matching.
example-
<bean name="/*.html" class="com.test.handler">
In web application when url contain this pattern it call that class. The id is not preferred for that feature. It caught a exception at the run time.


For Further Reading,
General, Java, spring, Technology

0 comments:

Post a Comment


 

Site Status

Man Behind Technical Today

Hello, I am Navin Bansal. I am a student of MCA in Rajsthan Institute of Engineering and Technology and owner of this blog. I share my view and ideas among people.