• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 3411
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 ! :-)
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic