Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

include jsp across multiple web applications in tomcat

Thread view: 
grasp06110 - 03 Jan 2008 22:25 GMT
Hi Everybody,

I tried searching on 'jsp include tomcat multiple' and didn't find
what I was looking for:

I would like to have a single jsp that I can use across multiple
applications (using tomcat) without having to deploy multiple copies
of the jsp (similar to the way you can deploy class files or jar files
to the shared folder, but instead of a class file or jar file.  I
would like to deploy the jsp and be able to call jsp:include or
jsp:directive.include from multiple applications to include this file
in a given jsp).  Is this possible?

Thanks,
John
grasp06110 - 03 Jan 2008 23:46 GMT
> Hi Everybody,
>
[quoted text clipped - 11 lines]
> Thanks,
> John

Looking but still not finding...

I've been looking through some of the tomcat resources I have
available and still not finding what I'm looking for.

Sharing of other resources across multiple applications would also be
nice (e.g. css files, images, etc).

Thanks,
John
Pritam Barhate - 05 Jan 2008 04:50 GMT
> I would like to have a single jsp that I can use across multiple
> applications (using tomcat) without having to deploy multiple copies
[quoted text clipped - 3 lines]
> jsp:directive.include from multiple applications to include this file
> in a given jsp).  Is this possible?

Yes it is possible what you are looking for is JSTL core tag library
tag, <c:import> search for a tutorial on how to use it. I think your
problem will be solved. But then there are some complications such as
use of images in the imported content, which is presented in this
article

http://www.ibm.com/developerworks/java/library/j-jsp06173.html#N10102

Though I have not tried it, using absolute urls in the imported
content should solve it.

Pritam


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.