java新手求救(在线等)

无知者无谓 2011-08-29 03:05:07
一直提示:
No mapping found for HTTP request with URI [/test/interface/appInterface] in DispatcherServlet with name 'Dispatcher'

我的web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/*.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<servlet>
<servlet-name>Dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value> </param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Dispatcher</servlet-name>
<url-pattern>/interface/*</url-pattern>
</servlet-mapping>

<session-config>
<session-timeout>10</session-timeout>
</session-config>

<welcome-file-list>
<welcome-file>/redirect.jsp</welcome-file>
</welcome-file-list>
</web-app>

现在spring下就一个xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

<bean id="appInterfaceImpl" class="com.irg.app.impl.AppInterfaceImpl" />
<bean name="/appInterface" class="org.springframework.remoting.caucho.HessianServiceExporter">
<property name="service" ref="appInterfaceImpl"/>
<property name="serviceInterface" value="com.irg.app.IAppInterface"/>
</bean>
</beans>


log4j我是打开debug,没有任何error信息,如果需要我再贴上来。
使用hessian客户端连接的时候就提示前面说的那个错误。

被迫作java开发,对环境什么都不熟悉,请大家帮帮忙吧!
...全文
200 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
GUI 2011-08-29
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 t572015836 的回复:]
<servlet-mapping>
<servlet-name>Dispatcher</servlet-name>
<url-pattern>/interface/*</url-pattern>
</servlet-mapping>

你尝试一下 将 <url-pattern>/interface/* </url-pattern>改为<url-pattern>/interfa……
[/Quote]

你把 <url-pattern>/interface/* </url-pattern>改为<url-pattern>/interface.do </url-pattern>

'*' 代表全部字符 所以这样会出问题 不知道 你的 这个是不是因为这个引起的
woulderful 2011-08-29
  • 打赏
  • 举报
回复
<servlet>
<servlet-name>Dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value> </param-value>
</init-param>
</servlet>


<servlet-mapping>
<servlet-name>Dispatcher</servlet-name>
<url-pattern>/interface/*</url-pattern>
</servlet-mapping>

是不是这的问题呢 ?
无知者无谓 2011-08-29
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 t572015836 的回复:]

<servlet-mapping>
<servlet-name>Dispatcher</servlet-name>
<url-pattern>/interface/*</url-pattern>
</servlet-mapping>

你尝试一下 将 <url-pattern>/interface/* </url-pattern>改为<u……
[/Quote]
启动提示
org.xml.sax.SAXParseException; systemId: jndi:/localhost/muchstore/WEB-INF/web.xml; lineNumber: 26; columnNumber: 23; Error at (26, 23: Invalid <url-pattern> /interface/*.do in servlet mapping
GUI 2011-08-29
  • 打赏
  • 举报
回复
<servlet-mapping>
<servlet-name>Dispatcher</servlet-name>
<url-pattern>/interface/*</url-pattern>
</servlet-mapping>

你尝试一下 将 <url-pattern>/interface/* </url-pattern>改为<url-pattern>/interface/*.do</url-pattern>

51,396

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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