Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we saperate Jsp files folder from Tomcat?

 
Shashidhar Yarabati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!

Kindly please ignore this question by providing link, if it is already posted. Can I put my Jsp pages folder outside webapps folder in Tomcat Directory? If yes Can you please tell the solution, How to do???

Thanks in Advance.

Shashidhar Rao
SCJP1.5
[ August 01, 2007: Message edited by: Shashidhar Rao ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't put JSP pages outside of a web app, but your web app doesn't need to be under the Tomcat webapps folder either. Is that what you are asking?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a couple ways to do this.
I'll describe what I do.

In, TOMCAT_INSTALL/conf/Catalina/localhost I created an context fragment file.
This file is named after my contextName + a ".xml" extension.

Example: "myApp.xml".

In the context fragment file, I point to the folder that contains my web app.


The directory must have a valid web app structure (must contain WEB-INF folder).

For more information on that attributes of the Context entry see:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
[ August 01, 2007: Message edited by: Ben Souther ]
 
Shashidhar Yarabati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks All for prompt Reply!

Let me clear my question. I have more than 100 Jsp pages in folder(say, JspFolder). And my directory structre looks like : TOMCAT_HOME/webapps/contextpath/JspFolder(and)WEB-INF/clasees(and)web.xml.
I deployed it and making use of it. Then after I want to saperate my JspFolder from that area, I don't want to see that at there. B'coz I want to change my jsp files continously...
And my questions are:
1) Is it possible to do like that?
2) If yes can I deploy it again?
3) How should I specify my jsp files in web.xml

I hope you all understand my problem???
Thanks in Advance


Shashidhar Rao
[ August 02, 2007: Message edited by: Shashidhar Rao ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, you cannot move your JSPs out of the document base for the web app. Why would you want to do that? You can change them wherever they are.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic