• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Help with custom tags

 
Ranch Hand
Posts: 59
Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A simple tag with attribute;

there is a movie class used in tag handler in tag handler class...

i dont know whether it should be used as a bean or in a scriptlet . its unclear whats happeng in k&b pg 521
mytag2.jsp


awesome_tag.tld


Movie.java


SimpleTag3.java




We are using tags to eliminate scriptlets. Now in this,without using a scriptlet how do i declare a List which i can then use as an attribute .??? may be i am forgetting something but at the moment i cant recall what to do.

Thanks A LOT !
 
Creator of Enthuware JWS+ V6
Posts: 3412
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Aashima,

i dont know whether it should be used as a bean or in a scriptlet


The idea is to create a Servlet (that instantiates the List of movies and than adds it as an attribute to the request) and to forward from that Servlet (by using a RequestDispatcher) to the jsp.

You should define the Servlet (<servlet>) in your web.xml, and use the <url-pattern> of your <servlet-mapping> to access it.

Regards,
Frits
 
Aashima Arora
Ranch Hand
Posts: 59
Netbeans IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ohhhhh!!! That was the missing link! Thank You So Much Frits! You cleared all my doubts ! :-)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic