欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Can a Tomcat docBase span multiple folders?-

系統 2086 0

Question:

I apologize if this is a poor question, but I'm using Windows and looking to see if there's a way to run a webapp via Tomcat where the? docBase ?is multiple folders.

A little more background is that we have our Eclipse project set up in a way that the web content is broken into separate folders. One folder represents what our SDK provides, one is a folder which has SDK patches, and a third is the project-specific components -- either of the last two folders could have subfolders/files that "erase" items from the first two.

I'd like to try and have my context file point back into my dev environment so that I don't need to build/deploy in order to see the changes I'm making. Is this possible?

A couple other notes:

  • We thought about using symlinks via? mklink , but didn't want to create complexity if simplicity was out there.
  • This is just for running locally so simple hacks would be allowed. When we create the WAR which gets deployed to the real environment the ANT script creates a single web root.

?

Answer 1:

I use it this way:

    
          <Context docBase="jquery"                path="/js/jquery" />

    <Context docBase="foobar/www/javascript" path="/js" />

    <Context docBase="foobar/www/css"        path="/css" />

    <Context docBase="foobar"                path="/" />


    
  

Important for the concrete context is the path-attribute. A request is processed from top to bottom.

So a request for? /css/default.css ?is only processed from the 3rd context.

A different order may catches a different context.

This is? wrong :

    
          <Context docBase="foobar"                path="/" />

    <Context docBase="jquery"                path="/js/jquery" />

    <Context docBase="foobar/www/javascript" path="/js" />

    <Context docBase="foobar/www/css"        path="/css" />


    
  

Because? /css/default.css ?will be catched by the first context, not the fourth.

Edit 2013-08-10: ?(Not by the answer-author) It is important to note that while the above technique will work, much of it is actually incorrect. Please see comments for details.

?

Answer 2:

Tomcat can do this for you, you just need a little extra configuration.

You are looking for? VirtualDirContext ?which allows you to specify a list of? extraResourcePaths ?which will be searched (in order) for additional files. You can use that to merge static resources, JSPs, directories of JAR files, etc.

Just remember that each path you add makes every file lookup potentially take longer -- especially if the file can't be found at all.

?

原文:http://stackoverflow.com/questions/17738049/can-a-tomcat-docbase-span-multiple-folders/17861223#17861223

?

Can a Tomcat docBase span multiple folders?--轉


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。?!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 色老师 | 成人欧美一区在线视频在线观看 | 日本黄色大片免费观看 | 亚洲一区二区三区在线免费观看 | 日韩欧美在线视频 | 一区二区福利视频 | 久久69精品久久久久久久电影好 | 瑟瑟在线 | 久久视频免费 | 无码乱人伦一区二区亚洲 | 欧洲成人午夜免费大片 | 国产福利一区二区在线精品 | 成人影院欧美大片免费看 | 亚洲视频在线观看地址 | 国产精品久久一区二区三区 | 中文一区二区 | 国产精品精品 | 精品亚洲一区二区三区 | 新婚人妻不戴套国产精品 | 免费成人电影在线 | 色婷婷综合在线 | 亚洲婷婷在线 | 精品视频日本 | 亚洲视频在线免费看 | 另类婷婷| 91福利国产在线观看网站 | 欧美黄色大片免费观看 | 婷婷开心六月久久综合丁香 | 亚洲成人福利在线 | 天天干天日 | 日韩欧美视频一区二区在线观看 | 欧美成人伊人十综合色 | 日本 欧美 国产 | 欧美搞黄视频 | 久久精品久久久久久 | 国产精品久久久久久久久久iiiii | 日韩三级中文字幕 | 亚洲AV国产成人精品区三上 | 免费的av网站 | 古装三级在线观看 | 精品精品 |