include jsp across multiple web applications in tomcat

G

grasp06110

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
 
G

grasp06110

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

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
 
P

Pritam Barhate

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?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top