jBuilder 打抱自动会加上的 A WAR file is an archive file for a web application. It's similar to a JAR file. By storing your entire application and the resources it needs within the WAR file, deployment becomes easier. You copy just the WAR file to your web server, instead of making sure many small files get copied to the right place. JBuilder can automatically generate a WAR file when you build your project.
如果你的jsp 文件在jsp目录下.
http://localhost:8080/test/jsp/login.jsp
1.docBase应该是实际路径
如:docBase="c:\test" path="/test"2.可以不写<Context...>
直接把login.jsp放到"c:\tomcat\webapps\ROOT\test"目录中去
全路径也试了,不好用!!
最后还不行的话,你用jB去做一个object就好用了,她会自动生成war文件。你还可以试试在你的test目录下放一个index.htm,看能不能访问到。
如果能访问到那你的server.xml就是对的。在看其他对不对。
[email protected]
<servlet-name>Departmentinsert</servlet-name>
<servlet-class>Departmentinsert</servlet-class>
</servlet> <servlet>
<servlet-name>
Policeinsert
</servlet-name>
<servlet-class>
Policeinsert
</servlet-class>
<!--
<init-param>
<param-name>foo</param-name>
<param-value>bar</param-value>
</init-param>
-->
<run-as>
<description>Security role for anonymous access</description>
<role-name>tomcat</role-name>
</run-as>
</servlet> <servlet>
<servlet-name>
Makewhereclause
</servlet-name>
<servlet-class>
Makewhereclause
</servlet-class>
</servlet>
你直接输入http://localhost:8080/test/
就能看到test目录下的文件结构,
我把你的login.jsp直接放在test下,
输入http://localhost:8080/test/login.jsp
可以运行,放在jsp目录下也是可以的。
不过你的查询的连接有错误 用了 /你重装一个tomcat 不在以前同一个目录,
替换你的server.xml
并建一个test 慢慢向里面放入东西应该不会有错。测试的时候清除 work目录,和ie的临时文件。
/test/*=ajp12
我发给你一个war,
你不用改你的server.xml,一定不要改,用tomcat自己生成的那个server.xml
把我的着个
war copy到你的
webapps下
启动
tomcat,你就会
看到展开一个test目录
你在实施。
/test/*=ajp12是什么意思?
A WAR file is an archive file for a web application. It's similar to a JAR file. By storing your entire application and the resources it needs within the WAR file, deployment becomes easier. You copy just the WAR file to your web server, instead of making sure many small files get copied to the right place. JBuilder can automatically generate a WAR file when you build your project.
这要兴建一个目录,如:c:\tmp
把你的test copy到着个目录下
在新建一个web application
目录指向c:\tmp\test
够上 Grenerate WAR
然后把你的所有的文件加入到你建的application中,
这样你就可以直接用jBuilder开发你的
jsp servelt javabean等了
可以调试,运行,
每运行一次就会更新一次War如果不想开发,那就直接用他的向导好了。
看看帮助。