JSP中调用SERLET出现 description The requested resource (/SUB) is not available

xiehongtao 2006-02-27 05:14:05
JSP中有<form action="/SUB" method="post">
<input type="submit" name="OK" value="确定">

1,JSP和SERLET在一个目录中
但点击确定铵钮出现不能调用SERLVET

2.JBUILDER中JSP文件和SERLET文件默认不是在同一个目录中,这是为什么?
...全文
63 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
ad1227 2006-02-28
  • 打赏
  • 举报
回复
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>

<!-- JSPC servlet mappings start -->
<servlet>
<servlet-name>ViewServlet</servlet-name>
<servlet-class>servlet.ViewServlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>ViewServlet</servlet-name>
<url-pattern>/ViewServlet</url-pattern>
</servlet-mapping>

<!-- JSPC servlet mappings end -->
<!-- JSPC filter mappings start -->
<!-- JSPC filter mappings end -->
<!-- JSPC mysql-connection-pool start -->
<resource-ref>
<description>MySqlDBCP Connection</description>
<res-ref-name>jdbc/history</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<!-- JSPC mysql-connection-pool end-->

<!-- JSTL start-->

<!-- JSTL end-->
</web-app>
xiehongtao 2006-02-28
  • 打赏
  • 举报
回复
infowain(infowain)
如何配置呢???,谢谢大家帮助!

infowain 2006-02-28
  • 打赏
  • 举报
回复
servlet还需要在web.xml里面进行配置
xiehongtao 2006-02-27
  • 打赏
  • 举报
回复
servlet放在web-inf/classes不行哪,
dlxu 2006-02-27
  • 打赏
  • 举报
回复
你的Servlet有没有在Web.xml中配置,你的Servlet class有没有放到WEB-INF/classes目录下?
zorro09 2006-02-27
  • 打赏
  • 举报
回复
配置有问题,看看配置吧~。找本书看看
infowain 2006-02-27
  • 打赏
  • 举报
回复
SERLET是什么,servlet吗,应该把编译好的class文件放在web-inf/classes目录里面

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧