restlet都配置好了为啥还会404
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了restlet都配置好了为啥还会404相关的知识,希望对你有一定的参考价值。
xml:
<context-param>
<param-name>org.restlet.component</param-name>
<param-value>component.TestComponent</param-value>
</context-param>
<servlet>
<servlet-name>RestletServlet</servlet-name>
<servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RestletServlet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
component:
public class TestComponent extends Component
public TestComponent()
getDefaultHost().attach("/rest/a",new TestApplication());
application:
public class TestApplication extends Application
@Override
public Restlet createInboundRoot()
Router router = new Router(getContext());
router.attach("/b",TestResource.class);
return router;
以上是关于restlet都配置好了为啥还会404的主要内容,如果未能解决你的问题,请参考以下文章
Struts2 为啥我总是出现404错误,找了半天,路径和配置写的都正确,但总显示不出来我想要的result