部署ear时候发生点小问题

rainworm 2004-04-22 03:12:34
高手请指点迷津啊!
本来我是分别部署jar和war包,访问正常!
后来把这两个包打成了一个ear包,访问的时候提示我:

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.

...全文
87 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lisoon 2004-04-24
  • 打赏
  • 举报
回复
在war下的web.xml下添加.
因为servlet文件有时在这里出错。
<servlet>
<servlet-name>goodscart</servlet-name>
<servlet-class>GoodsCart</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>goodscart</servlet-name>
<url-pattern>/goodscart</url-pattern>
</servlet-mapping>
Goodscart是原来的servlet的文件,goodscart是修改后要访问的servlet名。
改过来后,再重新make就行了
rainworm 2004-04-23
  • 打赏
  • 举报
回复
我的ear包里有一个jar和一个war文件,还有一个文件夹,下面有个application.xml文件,你是说在哪添加,工程下的web.xml那个文件吗?怎么添加?能否把语句具体说出来,谢谢了!还有是否得把修改过的web.xml文件添加到ear包里?
lisoon 2004-04-22
  • 打赏
  • 举报
回复
在WEB.XML文件中添加你要访问的页面。
我也曾出过这样的问题。
后来在那个文件中添加后就可以了。

67,513

社区成员

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

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