aspose file tools*
The moose likes JSP and the fly likes jsp page extends servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp page extends servlet" Watch "jsp page extends servlet" New topic
Author

jsp page extends servlet

Pinda Ros
Ranch Hand

Joined: Apr 14, 2003
Posts: 65
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


NanoAgent is an Artificial intelligence RoBot of microscopic proportions built by means of nanotechnology
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
may be you would want to look at Struts tiles, that is related to different frames realization on the web browser.
Kishore.


Kishore
SCJP, blog
Pinda Ros
Ranch Hand

Joined: Apr 14, 2003
Posts: 65
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

Joined: Jan 10, 2002
Posts: 61761
    
  67

Have you looked into creating custom actions to implement your feature?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pinda Ros
Ranch Hand

Joined: Apr 14, 2003
Posts: 65
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

Joined: Jan 10, 2002
Posts: 61761
    
  67

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

Joined: Jan 10, 2002
Posts: 61761
    
  67

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

Joined: Apr 14, 2003
Posts: 65
Thanks a lot for the answers.
Pinda
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp page extends servlet