cas配置restful

1.下载cas server和cas client,并部署。

2.下载cas使用restful所需jar包并放入cas webapp项目的lib目录下(不是放入自己应用的lib下,我在这栽了跟头,浪费了一天时间):

      cas-server-3.4.2/modules/cas-server-support-jdbc-3.4.2.jar  cas-server-integration-restlet-3.4.2.jar 拷贝到D:/server/apache-tomcat-6.0.18/webapps/cas/WEB-INF/lib 目录下

        到 apache 网站下载下面三个 cas server 依赖 jar 包拷贝到

D:/server/apache-tomcat-6.0.18/webapps/cas/WEB-INF/lib 目录下

Ø  http://apache.freelamp.com/commons/collections/binaries/commons-collections-3.2.1-bin.zip

Ø  http://apache.etoak.com/commons/dbcp/binaries/commons-dbcp-1.4-bin.zip

Ø  http://apache.etoak.com/commons/pool/binaries/commons-pool-1.5.4-bin.

下载 restlet 相关 http://www.restlet.org/downloads/ , 解压后将下面 jar 拷贝到 D:/server/apache-tomcat-6.0.18/webapps/cas/WEB-INF/lib: 

com.noelios.restlet.ext.servlet_2.5.jar

com.noelios.restlet.ext.spring_2.5.jar

com.noelios.restlet.jar

org.restlet.ext.spring_2.5.jar

org.restlet.jar


下载   CGlib  http://sourceforge.net/projects/cglib/files/  拷贝到   D:/server/apache-tomcat-6.0.18/webapps/cas/WEB-INF/lib  

下载 ASM/OW2 http://forge.ow2.org/projects/asm/ 拷贝到 D:/server/apache-tomcat-6.0.18/webapps/cas/WEB-INF/lib


打开 D:/server/apache-tomcat-6.0.18/webapps/cas/WEB-INF/web.xml 文件,添加下面 servlet :

<servlet>

<servlet-name>restlet</servlet-name>

<servlet-class>com.noelios.restlet.ext.spring.RestletFrameworkServlet</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

 

<servlet-mapping>

<servlet-name>restlet</servlet-name>

<url-pattern>/v1/*</url-pattern>

</servlet-mapping>


到此,配置就已经完成了。

使用方法请参考网上例子或者cas wiki.

(http://blog.csdn.net/yinchongyi/article/details/5655182)

http://yinchonging.iteye.com/blog/686417

http://www.biancheng521.com/article/yuawenruli/6608338.html




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
restful restful所需要的jar包 ========================================= Restlet, a RESTful Web framework for Java ========================================= http://www.restlet.org ----------------------------------------- Native REST support * Core REST concepts have equivalent Java classes (UniformInterface, Resource, Representation, Connector for example). * Suitable for both client-side and server-side web applications. The innovation is that that it uses the same API, reducing the learning curve and the software footprint. * Restlet-GWT module available, letting you leverage the Restlet API from within any Web browser, without plugins. * Concept of "URIs as UI" supported based on the URI Templates standard. This results in a very flexible yet simple routing with automatic extraction of URI variables into request attributes. * Tunneling service lets browsers issue any HTTP method (PUT, DELETE, MOVE, etc.) through a simple HTTP POST. This service is transparent for Restlet applications. Complete Web Server * Static file serving similar to Apache HTTP Server, with metadata association based on file extensions. * Transparent content negotiation based on client preferences. * Conditional requests automatically supported for resources. * Remote edition of files based on PUT and DELETE methods (aka mini-WebDAV mode). * Decoder service transparently decodes compressed or encoded input representations. This service is transparent for Restlet applications. * Log service writes all accesses to your applications in a standard Web log file. The log format follows the W3C Extended Log File Format and is fully customizable. * Powerful URI based redirection support similar to Apache Rewrite module. Available Connectors * Multiple server HTTP connectors available, based on either Mortbay's Jetty or the Simple framework or Grizzly NIO framework. * AJP server connector available to let you plug behind an Apache HTT
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值