• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp page extends servlet

 
Pinda Ros
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have created a (servlet)page which has the functionality of a side menu frame. Now i wan to reuse it about 5-10 times... I thought it would be nice easy to make 10 jsps that extsnd this servlet or jsp and just overide the attributes and change links names and links.
Is that possible? in the implementation i made although i include the jsp which has overriden an attibute and changed a name i see the name of the servlet...(which has a default namee...)
Thank you in advance
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be you would want to look at Struts tiles, that is related to different frames realization on the web browser.
Kishore.
 
Pinda Ros
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello and thank you for your reply,
Struts tiles might be a good idea, however my provider does not support tiles. So is there any other way? using page extends for example?
I searched a lot for <%@page extends ...%> however i found no information whatsoever. All i found was that its use should be avoided etc...
Any ideas?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked into creating custom actions to implement your feature?
 
Pinda Ros
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually i have not thought of making custom actions, any ideas where to begin looking for more info?
Thanks a lot...
pinda
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Custom actions (formerly known as custom tags) are one of the best ways to create on-page reusable and parameterizable components.
Any JSP book worth its salt will discuss how to create custom actions, or you could pick up the JSP spec from the Sun site. Check out the Bunkhouse Porch for book recommendations.
Also be aware that a lot has changed in that space between JSP 1.2 and JSP 2.0. Take heed regarding the capbilities of the container you will be using.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, our very own Simon Brown is the author of Professional JSP Tag Libraries which received a 4-star Amazon rating and 8 horseshoes at JavaRanch.
 
Pinda Ros
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for the answers.
Pinda
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic