我的tomcat4.1经过了测试.为什么在对servlet运行是不行.在地址栏输入http://localhost:8080/servlet/com.omh.Properties.我现在看的是清华出版社的java servlet
开发人员指南.在书上也没有对web.xml进行配置.我没有在web.xml进行配置.为什么我的tomcat4.1不行.com.omh.Properties我放在C:\Tomcat 4.1\webapps\ROOT\WEB-INF\classes目录下.如果要进行配置.哪怎么配置.
开发人员指南.在书上也没有对web.xml进行配置.我没有在web.xml进行配置.为什么我的tomcat4.1不行.com.omh.Properties我放在C:\Tomcat 4.1\webapps\ROOT\WEB-INF\classes目录下.如果要进行配置.哪怎么配置.
type Status reportmessage No Context configured to process this requestdescription The server encountered an internal error (No Context configured to process this request) that prevented it from fulfilling this request.
<servlet-name>fweione</servlet-name> // 这是你的类名
<servlet-class>com.panther.servlet.fweione</servlet-class> // 包名+类名,即全名
</servlet><servlet-mapping>
<servlet-name>fweione</servlet-name> // 这是类名
<url-pattern>/fweione</url-pattern> // 这也是类名,不过前面有一个 / 符号
</servlet-mapping>然后地址栏中写入
http://localhost:8080/工程名/fweione 即可
http://localhost:8080/servlet/com.omh.Properties
你这种方法好像直接访问servlet,
要把tomcat中一个xxx.xml中的一段取消注释<invoke> 什么来着。
core servlet and jsp里有介绍。。或你用修改web.xml中文件的方法试吧。。网上一大把。 :)
你说的不行.
to HeXuZhOnG
我不想修改web.xml,你能说的详细的不?
然后你在e:\jsp目录下建web-inf\classes目录,servlet就放在这下面,同时在web-inf目录下新建一web.xml文件,里边加入
<servlet>
<servlet-name>Properties</servlet-name>
<servlet-class>com.omh.Properties</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Properties</servlet-name>
<url-pattern>/Properties</url-pattern>
</servlet-mapping>
保存之后,记得重启tomcat,然后在地址栏访问:localhost:8080/jsp/Properties
我做了怎么还是不行.我重启tomcat了.