Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring with Custom Tag

 
Kousik Majumder
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to Spring.
I want to use custom tag in Spring.
Can somebody give some code how to use custom tag with Spring ?
Specially the mapping with the .java(tag which extends BodyTagSupport) file to applicationContext.xml file.


Thanks in Advance,

Kousik
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by custom tags with Spring ? You can use custom tags in any JSP files. Whether you are using Spring or not is not a problem.
 
Kousik Majumder
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I have a delegator which delegates the request related the to database.

Flow: Delegator -> Service -> Dao

Now my problem is that I need to use that delegator to make a custom tag.
But the delegator is not being properly instantiated through applicationContext.xml file.


I have referred the custom tag(ParentOfice.java) as above using the bean name"ParentOfice".

I think here is the problem.

I am confused how to invoke that bean.

JSP:




Please help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic