• Post Reply Bookmark Topic Watch Topic
  • New Topic

Including html files outside the tomcat webapps directory

 
Virendra Rahatpuri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can we include flat html files from a jsp which are outside the tomcat webapps/context directory? If so how? If not then is there a way to do that...Any pointers with be appreciated..

Thanks
Virendra
 
Murthy Cherukumilli
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please why would you want to do that ... becasue i dont think that it is a good design to do so... may be you should find a solution to get away from this...and look at proper ways of doing this,
 
Virendra Rahatpuri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Murthy,
We are trying to internalize the website. The header menu has to change based on the locale of the browser which is resource bundle driven and is a jsp. The problem is that we have lot of flat html files and they all have english menus. We have to change the menus and include the html file into a jsp so that we can have different languages on the menu. That is why I was wondering if we can include the html files from the webserver docroot which is outside tomcat. If you have any suggestions it will be very much appreciated.

Thanks
Virendra.
 
Murthy Cherukumilli
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you store all your html files in one place along with your other html files. And then create an XML file that may be looks something like

<locale value="">
<htmlfile>filename1withpath</htmlfile>
<htmlfile>filename2withpath</htmlfile>
<htmlfile>filename3withpath</htmlfile>
</locale>

and then in your controlling servlet read this xml based on the locale and then dynamically set the html files . this way you dont have to hard code anything anywhere at the sametime. not sure if i am addressing your issue.
 
Virendra Rahatpuri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me elaborate on the problem. The menu on the website is resource bundle driven and it changes on the locale and is a jsp file, being said that we have lot of flat html files on the docroot which have menus built with static html. When we have to internationalize the site the menus have to change on those html files also. So, if I can make a jsp and include the header and the language on the header will change according to locale and include the static html file that would solve the problem. My question is can I follow this approach or is there a better way to solve this problem. Any feed back will be appreciated.


Thanks,
Virendra.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!