This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes Is it possible to share jsp pages between different applications deployed inside tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Is it possible to share jsp pages between different applications deployed inside tomcat" Watch "Is it possible to share jsp pages between different applications deployed inside tomcat" New topic
Author

Is it possible to share jsp pages between different applications deployed inside tomcat

Nikhil Chandran
Greenhorn

Joined: Sep 10, 2007
Posts: 23
Dear All,

I currently works with a java/jsp project. Tomcat is the web container I have some classes which can be used in common to all application deployed in this tomcat, which is included in shared/classes of tomcat.

Similarly I have some jsp pages which all applications can share. Is it possible for me to do this?

Kindly waiting for your suggestions..


Thanks in advance
NikhilChandran
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Not really.
Nikhil Chandran
Greenhorn

Joined: Sep 10, 2007
Posts: 23
Thanks for your reply.
So is the only option is to put duplicate jsps in all applications?. Do you have any other suggestions to tackle the situation..In my case there are more than 30 applications and if one of these common file changes I need to update it in all 30 applications.
Can you provide a solution for this ..

Thanks
NikhilChandran
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Yes; keep the JSPs in a single repository and check it out into each of the applications. Modify only the main JSP repository copies.

Symbolic links may also work depending on your development/deployment environment.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

Yes, this should be handled at build time, not run time.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Nikhil Chandran
Greenhorn

Joined: Sep 10, 2007
Posts: 23
could you please provide me a little more explanation regarding how to maintain single repository of jsp s..Also can you tell me what you meant by Symbolic links ...

Thanks
NikhilChandran
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

Do you not use source control?
 
 
subject: Is it possible to share jsp pages between different applications deployed inside tomcat