Topic: 虚拟目录中文件怎么调用根目录web-inf中的类啊(已解决)?

  Print this page

1.虚拟目录中文件怎么调用根目录web-inf中的类啊(已解决)? Copy to clipboard
Posted by: junsansi
Posted on: 2005-12-21 15:11

我在tomcat中设置了一个虚拟目录,虚拟目录中的jsp文件需要调用根目录中web-inf中的类,除了将根目录的web-inf拷一份到虚拟目录内外,有没有其它方式可以直接调用啊
=======================
注:解决方案:将根目录web-inf中文件压缩成一个jar包拷贝到虚拟目录的web-inf内

2.Re:虚拟目录中文件怎么调用根目录web-inf中的类啊? [Re: junsansi] Copy to clipboard
Posted by: why
Posted on: 2005-12-22 11:10

Why do you want to do so?
What's the problem in duplicating them or putting them in Tomcat/common?

3.Re:虚拟目录中文件怎么调用根目录web-inf中的类啊? [Re: junsansi] Copy to clipboard
Posted by: junsansi
Posted on: 2005-12-22 11:15

there are too many files,and continual updating

so,我想如果虚拟目录内的application也可以调用根目录web-inf中class的话,工作会比较简单

4.Re:虚拟目录中文件怎么调用根目录web-inf中的类啊? [Re: junsansi] Copy to clipboard
Posted by: why
Posted on: 2005-12-22 11:30

junsansi wrote:
there are too many files,and continual updating

so,我想如果虚拟目录内的application也可以调用根目录web-inf中class的话,工作会比较简单

0. if the libraries in 根目录 are supposed to be shared among other webapps, put them in Tomcat/common

1. use jar file in lieu of folders of class files

2. use Ant (or similar tools) to automate building and deploying continuous updates

Please don't waste your time to invent your own non-standard "tricks", follow the standard, follow the convention.

5.Re:虚拟目录中文件怎么调用根目录web-inf中的类啊? [Re: junsansi] Copy to clipboard
Posted by: junsansi
Posted on: 2005-12-22 12:42

hot 2 shared libraries in tomcat?modify the conf/web.xml?can u show a example for me!

i am a new student with jsp,please go into particulars

6.Re:虚拟目录中文件怎么调用根目录web-inf中的类啊? [Re: junsansi] Copy to clipboard
Posted by: why
Posted on: 2005-12-25 09:18

There is no need to modify anything, just put the shared jar files in /common/lib

However, I would not do so personally.

7.Re:虚拟目录中文件怎么调用根目录web-inf中的类啊(已解决)? [Re: junsansi] Copy to clipboard
Posted by: sunshineblue
Posted on: 2005-12-30 16:03

放在共享目录下面应该可以的


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923