weblogic中怎么使用servlet,,,,??郁闷

Ge 2003-10-24 04:34:06
我在jsp页面中使用了javabean,,servlet,javabean用于连接数据库,,servlet用于处理网页提交的信息,,javabean能很好的工作,但是使用servlet的时候,就报错了

Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

...全文
88 13 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
qwchung 2003-10-28
  • 打赏
  • 举报
回复
部署是这么来做的,确认包的关系正确话,action="pass"就可以了,这样应该可以访问得到
Ge 2003-10-28
  • 打赏
  • 举报
回复
谢谢各位的帮忙,,我解决了,,我的web.xml的配置如下,,pass.class放在yy文件夹下的,,
<?xml version="1.0" encoding="UTF-8"?>
<!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>Forum</display-name>

<servlet>
<servlet-name>pass</servlet-name>
<servlet-class>yy.pass</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>pass</servlet-name>
<url-pattern>pass/*</url-pattern>
</servlet-mapping>


<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<login-config>
<auth-method></auth-method>
</login-config>

</web-app>

在jsp页面中是使用方法如下,,为什么这个action跟resin里不一样呢,跟weblogic也不一样,,
<form method="POST" name="form9" action="pass"> ,,,,

yaray 2003-10-28
  • 打赏
  • 举报
回复
If config like up, then modify you jsp file like this:

<form method="POST" name="form9" action="/ServletRedirectorABC">
yaray 2003-10-28
  • 打赏
  • 举报
回复
modify your %app%\WEB-INF\web.xml,add the servlet's mapping:

<servlet>
<servlet-name>ServletRedirector</servlet-name>
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletRedirector</servlet-name>
<url-pattern>/ServletRedirectorABC</url-pattern>
<!-- *** Access URL: http://localhost:8080/ServletRedirectorABC *** -->
</servlet-mapping>
Ge 2003-10-27
  • 打赏
  • 举报
回复
没有人理啊,,,
Ge 2003-10-27
  • 打赏
  • 举报
回复
这个WEB.XML是在我的工程里的WEB-INF下的吗???
比如我的pass.class是放在,classes/yy/的,,,
<servlet>
<servlet-name>pass</servlet-name>
<servlet-class>Forum.servlets.yy.pass</servlet-class>
</servlet>


是像上面这么写吗?谢谢各位了,,
stonegump 2003-10-27
  • 打赏
  • 举报
回复
调用的时候用Servlet的名称:action="pass"
ambest 2003-10-25
  • 打赏
  • 举报
回复
肯定是你在浏览器中输的地址和你部署的地址不同。
看一看你的web.xml中的内容就知道了。
patrickjava 2003-10-24
  • 打赏
  • 举报
回复
*.pass 在web.xml文件中定义了?
zhanghuazhanghome 2003-10-24
  • 打赏
  • 举报
回复
观点同楼上
javapopo 2003-10-24
  • 打赏
  • 举报
回复
servlet你部署了么?
Ge 2003-10-24
  • 打赏
  • 举报
回复
<form method="POST" name="form9" action="/servlet/yy.pass"> ,,,
是jsp文件里的,,在resin里运行没有问题,,,,,
不知道在weblogic 里要不要改啊,??
patrickjava 2003-10-24
  • 打赏
  • 举报
回复
不能啊?

源码贴上来

67,549

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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