??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲电影免费在线观看,亚洲精品一卡2卡3卡四卡乱码,亚洲网址在线观看 http://m.tkk7.com/tufanshu/category/4974.html没有风雨w的q,
没有坎坷不必走…?
zh-cn Wed, 09 Feb 2011 09:42:39 GMT Wed, 09 Feb 2011 09:42:39 GMT 60 cas server 3.4.5 部v在weblogic问题记录 http://m.tkk7.com/tufanshu/archive/2011/02/09/343972.html雪地孤` 雪地孤` Wed, 09 Feb 2011 08:16:00 GMT http://m.tkk7.com/tufanshu/archive/2011/02/09/343972.html http://m.tkk7.com/tufanshu/comments/343972.html http://m.tkk7.com/tufanshu/archive/2011/02/09/343972.html#Feedback 0 http://m.tkk7.com/tufanshu/comments/commentRss/343972.html http://m.tkk7.com/tufanshu/services/trackbacks/343972.html
2.cas server webapp 如果以war的方式发布,?x)因为log4j.xml的问题而不能正常发布,具体原因q没有完全弄清楚Q但是如果以解开后的文g夹目录的方式发布则没有问题?br />
]]> cas server使用mysql数据库和oralce数据库的差异 http://m.tkk7.com/tufanshu/archive/2011/01/26/343543.html雪地孤` 雪地孤` Wed, 26 Jan 2011 01:05:00 GMT http://m.tkk7.com/tufanshu/archive/2011/01/26/343543.html http://m.tkk7.com/tufanshu/comments/343543.html http://m.tkk7.com/tufanshu/archive/2011/01/26/343543.html#Feedback 0 http://m.tkk7.com/tufanshu/comments/commentRss/343543.html http://m.tkk7.com/tufanshu/services/trackbacks/343543.html
认证用户的sql语句在mysql下ؓ(f) Q?br />
select password from user_login where username=? and enabled=tr ue
而在oracle下应该ؓ(f)
select password from user_login where username=? and enabled=1
主要׃oralce和mysql对boolean字段的处理不一致导致的?br />
]]> cas server logout的问?/title> http://m.tkk7.com/tufanshu/archive/2011/01/21/343318.html雪地孤` 雪地孤` Fri, 21 Jan 2011 05:38:00 GMT http://m.tkk7.com/tufanshu/archive/2011/01/21/343318.html http://m.tkk7.com/tufanshu/comments/343318.html http://m.tkk7.com/tufanshu/archive/2011/01/21/343318.html#Feedback 0 http://m.tkk7.com/tufanshu/comments/commentRss/343318.html http://m.tkk7.com/tufanshu/services/trackbacks/343318.html cas server logout后,默认是停留在cas的退出页面,一般我们需要重新{向到客户端网站的d或是相关的页面,一般需要进行一下配|?/p>
1.cas-server端,配置文g?WEB-INFO/cas-servlet.xml中的logoutController
<bean id="logoutController" class="org.jasig.cas.web.LogoutController"
p:centralAuthenticationService-ref="centralAuthenticationService"
p:logoutView="casLogoutView"
p:warnCookieGenerator-ref="warnCookieGenerator"
p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator"
p:followServiceRedirects="true"/ >
]]> cas配置全攻?/title> http://m.tkk7.com/tufanshu/archive/2011/01/21/343290.html雪地孤` 雪地孤` Fri, 21 Jan 2011 02:06:00 GMT http://m.tkk7.com/tufanshu/archive/2011/01/21/343290.html http://m.tkk7.com/tufanshu/comments/343290.html http://m.tkk7.com/tufanshu/archive/2011/01/21/343290.html#Feedback 3 http://m.tkk7.com/tufanshu/comments/commentRss/343290.html http://m.tkk7.com/tufanshu/services/trackbacks/343290.html
l过近两天的测试,参考众多网友的贡献Q终于完成了(jin)对cas的主要配|和试Q现记录如下
基本需求:(x)
1.cas server-3.4.5,casclient-3.2Q官方版本)(j)Q均可在cas官方|站下蝲Q?a >http://www.jasig.org
2.使用低成本的http协议q行传输Q俺C起ssl证书
3.通过jdbcq行用户验证
4.需要通过casserver提供除登录用户名以外的附加信?/p>
参考资料:(x)
1.cas官方|站的用户帮助手册和wiki
2.|友“城市(jng)猎h”的blogQ?a >http://yuzhwe.javaeye.com/blog/830143
3.|友“(zhn)空(zhn)道”的blogQ?a >http://llhdf.javaeye.com/blog/764385
4.其他|友贡献的相关的blogQ都是通过google出来Q就不一一列出?jin),一q致谢!Q!
好了(jin)Q下面进入正题,如果(zhn)不x(chng)试中出现异常情况Q或是获取不到相x(chng)据,请关注文中的U色字体部分?/p>
Q?Q用http协议的设|,如果(zhn)也像我一PC起ssl数字证书Q对安全的要求也不是特别的搞Q下面的配置可以帮助解册个问题:(x)
在cas-server-webapp中的/WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml文g中有如下配置
<bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"
p:cookieSecure="true" //默认为trueQ用https,如果只需要httpQ修改ؓ(f)false卛_
p:cookieMaxAge="-1"
p:cookieName="CASTGC"
p:cookiePath="/cas" />
Q?Q用jdbc数据源进行用戯证,需要修改cas的authenticationHandlers方式Q在文g/WEB-INF/deployerConfigContext.xml有如下配|:(x)
<property name="authenticationHandlers">
<list>
<!--
| This is the authentication handler that authenticates services by means of callback via SSL, thereby validating
| a server side SSL certificate.
+-->
<bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient" />
<!--
| This is the authentication handler declaration that every CAS deployer will need to change before deploying CAS
| into production. The default SimpleTestUsernamePasswordAuthenticationHandler authenticates UsernamePasswordCredentials
| where the username equals the password. You will need to replace this with an AuthenticationHandler that implements your
| local authentication strategy. You might accomplish this by coding a new such handler and declaring
| edu.someschool.its.cas.MySpecialHandler here, or you might use one of the handlers provided in the adaptors modules.
+-->
<!--<bean class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler" />-->
<bean class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
<property name="dataSource" ref="dataSource" />
<property name="sql" value="select password from userInfo where username=? and enabled=true" />
//用户密码~码方式
<property name="passwordEncoder"
ref="passwordEncoderBean"/>
</bean>
</list>
</property>
该属性中的list只要用一个认证通过卛_Q徏议将U色部分攑֜W一位,如果认只用jdbc一U方式,其他认证方式均可删除。另外需要在在文件中ddatasoure和passordEncoder两个beanQ如?/p>
<!-- Data source definition -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8</value> //如果使用mysql数据库,应该加上后面的编码参敎ͼ否则可能D客户端对TGT据无法识别的问?br />
</property>
<property name="username"><value>root</value></property>
<property name="password"><value>password</value></property>
</bean>
<bean id="passwordEncoderBean" class="org.jasig.cas.authentication.handler.DefaultPasswordEncoder">
<constructor-arg value="SHA1" /> //cas
server默认支持MD5和SHA1两种~码方式Q如果需要其他的~码方式例如SHA256,512{,可自行实现org.jasig.cas.authentication.handler.PasswordEncoder接口
</bean>
附加备注Q如果?zhn)是用cas server的源码自行编译的话,需要在cas-server-web模块的pom.xml中添加如下模块的依赖Q?/p>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cas-server-support-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
q添加对应数据库的jdbc的jar包?/p>
Q?Q让cas server提供更多的用h据共客户端?/p>
通过试Q由于cas的代码更新过E中的变化较大,所以包兼容的问题好像一直存在,在测试中我就到q,p旉比较多,同学们在使用q程中用官方的最新的发布版本。在我用的q个版本中,请参考前面的关于server和client端的版本说明Q应该没有包冲突的问题,试通过。下面进行配|,配置文gQ?WEB-INF/deployerConfigContext.xml
<property name="credentialsToPrincipalResolvers">
<list>
<!--<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />-->
<!-- modify on 2011-01-18,add user info -->
<bean class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" >
<property name="attributeRepository" > //证过的用L(fng)Principald属?/font>
<ref local="attributeRepository"/>
</property>
</bean>
<bean
class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
</list>
</property>
修改该文件中默认?font color="#ff0000"> attributeRepositorybean配置
<!-- 在这里配|获取更多用L(fng)信息 -->
<bean id="attributeRepository" class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="dataSource" />
<constructor-arg index="1" value="select id as UId, password_hint as ph from userInfo where username=? and enabled=true" />
<property name="queryAttributeMapping">
<map>
<entry key="username" value="uid"/><!-- q里必须q么写,pȝ?x)自己匹配,貌似和where语句后面的用户名字段的拼写没有什么关p?-->
</map>
</property>
<!-- 要获取的属性在q里配置 -->
<property name="resultAttributeMapping">
<map>
<entry key="UId" value="userId" /> //key为对应的数据库字D名Uͼvalue为提供给客户端获取的属性名字,pȝ?x)自动填充?br />
<entry key="ph" value="passwordHint" />
</map>
</property>
</bean>
备注Q网上有很多的关于这个的配置Q但是如果?zhn)使用的是我提供的版本或是高?sh)q个版本Q就应该象上面这样配|,无用质疑Q网上大部分的配|都是基?br />
person-directory-impl,person-directory-api
1.1左右的版本,而最新的cas使用的是1.5的版本,l过查看源代码和api docs定最新版本的属性参数如上配|?/span>
修改该xml文g中最后一个默认的serviceRegistryDao bean中的属性全部注释掉Q或者删除,
q个bean中的RegisteredServiceImpl的ignoreAttributes属性将军_是否dattributes属性内容,默认为false:不添加,只有Lq个配置Q?br />
cas server才会(x)获取的用户的附加属性添加到认证用的Principal的attributes中去Q我在这里犯q这L(fng)错误Q最后还是通过跟踪源码才发现的?/font>
<bean
id="serviceRegistryDao"
class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
<!--
<property name="registeredServices">
<list>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="0" />
<property name="name" value="HTTP" />
<property name="description" value="Only Allows HTTP Urls" />
<property name="serviceId" value="http://**" />
</bean>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="1" />
<property name="name" value="HTTPS" />
<property name="description" value="Only Allows HTTPS Urls" />
<property name="serviceId" value="https://**" />
</bean>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="2" />
<property name="name" value="IMAPS" />
<property name="description" value="Only Allows HTTPS Urls" />
<property name="serviceId" value="imaps://**" />
</bean>
<bean class="org.jasig.cas.services.RegisteredServiceImpl">
<property name="id" value="3" />
<property name="name" value="IMAP" />
<property name="description" value="Only Allows IMAP Urls" />
<property name="serviceId" value="imap://**" />
</bean>
</list>
</property>-->
</bean>
修改WEB-INF\view\jsp\protocol\2.0\casServiceValidationSuccess.jsp文gQ如下:(x)
<%@ page session="false"%>
<%@ taglib prefix="c" uri=">
<%@ taglib uri="
<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authenticationSuccess>
<cas:user>${fn:escapeXml(assertion.chainedAuthentications[fn:length(assertion.chainedAuthentications)-1].principal.id)}</cas:user>
<c:if test="${not empty pgtIou}">
<cas:proxyGrantingTicket>${pgtIou}</cas:proxyGrantingTicket>
</c:if>
<c:if test="${fn:length(assertion.chainedAuthentications) > 1}">
<cas:proxies>
<c:forEach var="proxy" items="${assertion.chainedAuthentications}"
varStatus="loopStatus" begin="0"
end="${fn:length(assertion.chainedAuthentications)-2}" step="1">
<cas:proxy>${fn:escapeXml(proxy.principal.id)}</cas:proxy>
</c:forEach>
</cas:proxies>
</c:if>
<c:if
test="${fn:length(assertion.chainedAuthentications[fn:length(assertion.chainedAuthentications)-1].principal.attributes)
>
0}">
<cas:attributes>
<c:forEach
var="attr"
items="${assertion.chainedAuthentications[fn:length(assertion.chainedAuthentications)-1].principal.attributes}"
varStatus="loopStatus"
begin="0"
end="${fn:length(assertion.chainedAuthentications[fn:length(assertion.chainedAuthentications)-1].principal.attributes)-1}"
step="1">
<cas:${fn:escapeXml(attr.key)}>${fn:escapeXml(attr.value)}</cas:${fn:escapeXml(attr.key)}>
</c:forEach>
</cas:attributes>
</c:if>
</cas:authenticationSuccess>
</cas:serviceResponse>
客户端配|?
1.qo(h)器CAS Validation FilterQ?br />
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class> org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter </filter-class>
<init-param>
<param-name>casServerUrlPrefix</param-name>
<param-value>http://domainserver:8081/cas</param-value>
</init-param>
</filter>
在客L(fng)获取信息
AttributePrincipal principal = (AttributePrincipal) request.getUserPrincipal();
String loginName = principal.getName();//获取用户?br />
Map<String, Object> attributes = principal.getAttributes();
if(attributes != null) {
System.out.println(attributes.get("userId"));
System.out.println(attributes.get("passwordHint"));
}
]]>JForum ?SSO集成的问题解?/title> http://m.tkk7.com/tufanshu/archive/2008/06/26/210852.html雪地孤` 雪地孤` Thu, 26 Jun 2008 08:54:00 GMT http://m.tkk7.com/tufanshu/archive/2008/06/26/210852.html http://m.tkk7.com/tufanshu/comments/210852.html http://m.tkk7.com/tufanshu/archive/2008/06/26/210852.html#Feedback 3 http://m.tkk7.com/tufanshu/comments/commentRss/210852.html http://m.tkk7.com/tufanshu/services/trackbacks/210852.html
1.应用服务器:(x)weblogic8.1
2.数据库:(x)oracle10g
3.已有一个电(sh)子商务网站,需要和jforumq行单的集成Q提供ssoQ单点登录的功能Q?br />
4.说明Q已有的?sh)子商务|站域名Qhttp://www.123.com jforum域名Qwww.123.com/forum,?sh)子商务|站和jfroum在统一台服务器和同一应用服务器下Q如果分开可能?x)存在session或cookie讉K的问题?br />
5.JForum版本Q?.1.8
下面要的介绍一下用cookieq行jforum和电(sh)子商务网站的sso集成的过E:(x)
(1)实现net.jforum.sso接口
public class CookieUserSSO implements SSO {
static final Logger logger = Logger.getLogger(CookieUserSSO.class.getName());
public String authenticateUser(RequestContext request) {
// login cookie set by my web LOGIN application
Cookie cookieNameUser = ControllerUtils.getCookie(SystemGlobals
.getValue(ConfigKeys.COOKIE_NAME_USER));
String username = null;
if (cookieNameUser != null) {
username = cookieNameUser.getValue();
}
logger.info("cookie username="+username);
System.out.println("cookie username="+username);
return username; // return username for jforum
// jforum will use this name to regist database or set in HttpSession
}
public boolean isSessionValid(UserSession userSession,
RequestContext request) {
Cookie cookieNameUser = ControllerUtils.getCookie(SystemGlobals
.getValue(ConfigKeys.COOKIE_NAME_USER)); // user cookie
String remoteUser = null;
if (cookieNameUser != null) {
remoteUser = cookieNameUser.getValue(); // jforum username
}
if (remoteUser == null
&& userSession.getUserId() != SystemGlobals
.getIntValue(ConfigKeys.ANONYMOUS_USER_ID)) {
// user has since logged out
return false;
} else if (remoteUser != null
&& userSession.getUserId() == SystemGlobals
.getIntValue(ConfigKeys.ANONYMOUS_USER_ID)) {
// anonymous user has logged in
return false;
} else if (remoteUser != null
&& !remoteUser.equals(userSession.getUsername())) {
// not the same user (cookie and session)
return false;
}
return true; // myapp user and forum user the same. valid user.
}
}
(2)修改SystemGlobals.properties中的配置Q?br />
修改 SystemGlobals.properties文g中的一下属性的内容Q?br />
authentication.type = sso
sso.implementation = net.jforum.sso.CookieUserSSO
sso.redirect = http://www.123.com/login.jsp //可根据实际的d面地址q行修改
cookie.name.user = 123UserInfo //?sh)子商务|站中保存的cookie名称Q可Ҏ(gu)实际情况修改
(3)修改web应用中的d和注销部分的逻辑Q?br />
d部分加入以下代码Q?br />
...
Cookie cookie = new Cookie("springTourUserInfo", sname);
cookie.setMaxAge(-1);
cookie.setPath("/");//cookie只在同一应用服务器有?br />
response.addCookie(cookie);
...
注销部分加入以下代码Q?/strong>
......
Cookie cookie = new Cookie("springTourUserInfo", "");
cookie.setMaxAge(0); // delete the cookie.
cookie.setPath("/");
response.addCookie(cookie);
......
(4)在电(sh)子商务网站增加论坛的链接Q?br />
<a href="/forum">论坛</a>
基本配置完整Q测试通过Q如有问题,Ƣ迎交流Q?br />
感谢|友提供的资料:(x)
http://www.lifevv.com/java/doc/20080305224358885.html?page=0
http://www.99inf.net/SoftwareDev/Java/54230.htmQ作者:(x)王保政)(j)
]]> apache2.2.6+tomcat5.5.17配置说明 http://m.tkk7.com/tufanshu/archive/2007/12/24/170126.html雪地孤` 雪地孤` Mon, 24 Dec 2007 10:03:00 GMT http://m.tkk7.com/tufanshu/archive/2007/12/24/170126.html http://m.tkk7.com/tufanshu/comments/170126.html http://m.tkk7.com/tufanshu/archive/2007/12/24/170126.html#Feedback 1 http://m.tkk7.com/tufanshu/comments/commentRss/170126.html http://m.tkk7.com/tufanshu/services/trackbacks/170126.html 同样Q经q不断的摸烦(ch)和网友的帮助Q终于搞定了(jin)Q)(j)Q主要的问题q是出在我的服务器上的原因,不知道ؓ(f)什么,我的服务器上部v?jin)sqlite3.0Dapache2.2.6始终无法q行QL提示找不?libsqlite3.so.0",不得以,只能换台服务器测试,L搞定Q现过E描q如下,一共参考:(x)
一.安装apache2.2.6
1. tar fvxz httpd-2.2.2.tar.gz
2. q入解压后的目录。进行配|:(x)
./configure --prefix=/usr/apache --enable-module=so --enable-proxy --enable-proxy-ajp --enable-forward --enable-proxy-connect --enable-proxy-http --enable-so --enable-deflate --enable-headers --enable-include
解释Q?br />
-- prefix=/usr/apache是配|将要安装到的目录位|;
--enable-module=so配置Apache支持Dynamic Shared Objects (DSO)模式;
--enable-* 配置d相应的模?
3. ~译Q编译如果不成功Q确认一下你的linux是否安装有编译所需要的c环境和其他需要的cdQ:(x)
make
4. 安装Q?br />
make install
5. ~辑/usr/apache/conf/httpd.conf文gQ把端口改ؓ(f)80Q别跟tomcat的端口冲H)(j)Q?br />
ServerName:80
二、安装tomcat5.5.17
直接解压压羃包到指定目录可以,再次׃多少说了(jin)Q当?dng)最好在q行以上两项操作前先按装好j(lu)dkQ?.5或以上版本)(j)
三、简单的apche2.2.6+tomcat5.5.17配置说明Q?br />
使用 使用proxy_ajp整合apache和tomcatQ由于Apache2.2对以往版本有较大改?引进?jin)proxy
模块,所以Apache2.2和Tomcat5.5的配|需要用到mod_proxy.so{文?不再使用jk ?jk2 {tomcatq接?
.基本配置如下:
(一)加蝲解析模块
windows下,或linux采用动态加?DSO)模式下需配置。前面我们的linux~译时把下面的模块嵌入到?nbsp; apache中,所以不用再加蝲Q因此下面的两行也不用再httpd.conf文g中添加了(jin)
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module
modules/mod_proxy_ajp.so
(?使用proxy_ajp代理, 下面的配|,是把所有目录全用代?br />
使用vi~辑器打开apache的配|文?conf/httpd.conf,?LoadModule××××××行的后面d 以下两行卛_Q?br />
ProxyPass / ajp://127.0.0.1:8009/
ProxyPassReverse /
ajp://127.0.0.1:8009/
(?止使用proxy_ajp代理的目录:(x)
如果对于某些目录不想使用proxy_ajp代理转发Q可以按照如下配|(配置方式同上面(二)(j)的操 作)(j)Q?br />
ProxyPass /images/ !
Q禁止images目录下的内容使用proxy_ajp代理转发Q?br />
配置到现在,重启一下apacheQ就可通过apache来访问tomcat的服务了(jin)?br />
特别鸣谢Qhttp://groups.csdn.net/Apache/topic/b70ad273-f66f-4699-83c0-e11d354d262a.aspx
]]>找不到C.TLD的问?/title> http://m.tkk7.com/tufanshu/archive/2006/12/04/85371.html雪地孤` 雪地孤` Mon, 04 Dec 2006 07:27:00 GMT http://m.tkk7.com/tufanshu/archive/2006/12/04/85371.html http://m.tkk7.com/tufanshu/comments/85371.html http://m.tkk7.com/tufanshu/archive/2006/12/04/85371.html#Feedback 2 http://m.tkk7.com/tufanshu/comments/commentRss/85371.html http://m.tkk7.com/tufanshu/services/trackbacks/85371.html Q只要将该包从lib下移除即可了(jin)Q在此感谢网l上不吝赐教的朋友们Q)(j) ]]> roller2.3源代码部|笔?/title> http://m.tkk7.com/tufanshu/archive/2006/11/01/78479.html雪地孤` 雪地孤` Wed, 01 Nov 2006 07:28:00 GMT http://m.tkk7.com/tufanshu/archive/2006/11/01/78479.html http://m.tkk7.com/tufanshu/comments/78479.html http://m.tkk7.com/tufanshu/archive/2006/11/01/78479.html#Feedback 1 http://m.tkk7.com/tufanshu/comments/commentRss/78479.html http://m.tkk7.com/tufanshu/services/trackbacks/78479.html 1.首先是去下蝲rller2.3的源代码文gQ下载地址Q?a >http://rollerweblogger.org/ ׃roller采用?jin)xdocletQ所以在下蝲的源代码中有些内Ҏ(gu)没有的,主要~少的内容如下:(x) (tng) (tng) (tng)(1)package org.roller.presentation.forms (tng) (tng) (tng)(2)src下缺相关的hbm 文g (tng) (tng) (tng)(3)version.properties (tng) (tng) (tng)(4)roller.tld 2.׃~少以上的东西,D源代码导入工E后Q编译都不能通过。我不是太懂xdoclet的用,所以只好缺什么,q他什么了(jin)Q尽量满他的要求了(jin)。在roller-srcQroller2.3解压后的文gQ下有ant的脚本,所以我猜想Q通过脚本Q一定可以生成所有缺的文gQ事实也实如此Q只是在使用ant脚本生成roller web的过E也是坎L(fng)Q)(j)Q主要是应ؓ(f)roller开发小lؓ(f)?jin)省事,把一些开源的W三方包l去掉了(jin)Q所以需要自q补上。不然就?x)生成不成功。现记录如下Q?br />(1)加上hibernate3.2.1.jar (tng) (tng) (tng) (tng) (tng) (tng)?roller/src/tools目录下徏?hibernate-3.1/lib文g夹,hibernate3.jar文gcopy到该目录下面 (2)加上j2ee.jar (tng) (tng) (tng) j2ee.jar(或jboss-j2ee.jar)copy?roller-src/tools/buildtime/xdoclet-1.2.3/文g夹下 (3)djavamail的相兛_Qmail.jar,actiivation.jar (tng) (tng) (tng)mail.jar,activation.jar copy?roller-src/tools/lib目录下面?br />然后在windows下进入roller-src目录Q用下面命令即可生成roller web,同时可以生成以上~省的文Ӟ(x) > build all 然后可以在roller-src/build目录L你需要的文gQ同时也有发布好的roller web?br /> roller2.3的安装发布可以参考r(ji)oller官方发布的安装文即可?br /> 大功告成Q可以开始学?fn)和修改roller2.3的源码了(jin)Q:(x)Q?/p>
]]> tomcat 服务器抛出socket异常“文件打开太多”的问题 http://m.tkk7.com/tufanshu/archive/2006/07/31/60981.html雪地孤` 雪地孤` Mon, 31 Jul 2006 03:39:00 GMT http://m.tkk7.com/tufanshu/archive/2006/07/31/60981.html http://m.tkk7.com/tufanshu/comments/60981.html http://m.tkk7.com/tufanshu/archive/2006/07/31/60981.html#Feedback 0 http://m.tkk7.com/tufanshu/comments/commentRss/60981.html http://m.tkk7.com/tufanshu/services/trackbacks/60981.html 警告: Reinitializing ServerSocket 2006-7-28 15:07:40 org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket 严重: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=80] ignored exception: java.net.SocketException: Too many open files java.net.SocketException: Too many open files (tng)at java.net.PlainSocketImpl.socketAccept(Native Method) (tng)at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) (tng)at java.net.ServerSocket.implAccept(ServerSocket.java:450) (tng)at java.net.ServerSocket.accept(ServerSocket.java:421) (tng)at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60) (tng)at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:407) (tng)at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:70) (tng)at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) (tng)at java.lang.Thread.run(Thread.java:595) 原本以ؓ(f)是tomcat的配|或是应用本w的问题Q?h"一把后才发玎ͼ该问题的Ҏ(gu)原因是由于系l文件资源的限制D的。具体可以参?a >http://www.bea.com.cn/support_pattern/Too_Many_Open_Files_Pattern.html 的说明。具体的解决方式可以参考一下:(x) 1。ulimit -a 查看pȝ目前资源限制的设定?br /> (tng) (tng) (tng)[root@test security]# umlimit -a -bash: umlimit: command not found [root@test security]# ulimit -a core file size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (blocks, -c) 0 data seg size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -d) unlimited file size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (blocks, -f) unlimited max locked memory (tng) (tng) (tng) (tng) (kbytes, -l) unlimited max memory size (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -m) unlimitedopen files (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (-n) 1024 pipe size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (512 bytes, -p) 8 stack size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -s) 8192 cpu time (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (seconds, -t) unlimited max user processes (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (-u) 7168 virtual memory (tng) (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -v) unlimited [root@test security]# 通过以上命o(h)Q我们可以看到open files 的最大数?024 那么我们可以通过一下命令修改该参数的最大?br />2. ulimit -n 4096 [root@test security]# ulimit -n 4096 [root@test security]# ulimit -a core file size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (blocks, -c) 0 data seg size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -d) unlimited file size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (blocks, -f) unlimited max locked memory (tng) (tng) (tng) (tng) (kbytes, -l) unlimited max memory size (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -m) unlimitedopen files (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (-n) 4096 pipe size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (512 bytes, -p) 8 stack size (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -s) 8192 cpu time (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (seconds, -t) unlimited max user processes (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (-u) 7168 virtual memory (tng) (tng) (tng) (tng) (tng) (tng) (tng) (kbytes, -v) unlimited q样我们׃改了(jin)pȝ在同一旉打开文g资源的最大数Q基本解决以上问题?br /> 另外我们可以通过lsof (tng) -p [q程?pid]来查看系l当前打开的文件资源,可以?jin)解不同时期pȝ的文件资源的使用情况Q可Ҏ(gu)情况q行pȝ资源的配|?br /> ]]>hsql的?/title> http://m.tkk7.com/tufanshu/archive/2005/12/26/25499.html雪地孤` 雪地孤` Mon, 26 Dec 2005 13:44:00 GMT http://m.tkk7.com/tufanshu/archive/2005/12/26/25499.html http://m.tkk7.com/tufanshu/comments/25499.html http://m.tkk7.com/tufanshu/archive/2005/12/26/25499.html#Feedback 1 http://m.tkk7.com/tufanshu/comments/commentRss/25499.html http://m.tkk7.com/tufanshu/services/trackbacks/25499.html 最q在一个充值^C使用?jin)HSQL来记录用L(fng)充D?本来所有的记录是写到文仉面的,但是׃使用ORACLE的惯性思维D我浪费了(jin)半天的时?具体情况是这? 我用的是HSQL的IN-PROCESS(Standalone)模式,q样在WEB启动的时?我就?x)去创徏数据?按照HSQL的文?如果存在<dbname>.script文g的话,数据库就?x)将历史数据插入到数据库?但是在这里我放了(jin)一个惯性的错误,我们在ORCALE或是其他的常用数据库中创?一般要先删除就?让后在创建新的表,q样我就把HSQL的历史记录都删除?郁闷?q可是用L(fng)充D录啊,以后我怎么对帐?:)q好我有备䆾. 在HSQL更本不需要这L(fng)操作,他自׃(x)dq样的事?如果<dbname>.script存在,他就直接执行?jin)这个script,如果没有他才回去创徏新的数据库和表结? ]]> jdk1.4升到JDK1.5的问?/title> http://m.tkk7.com/tufanshu/archive/2005/11/17/20309.html雪地孤` 雪地孤` Thu, 17 Nov 2005 12:28:00 GMT http://m.tkk7.com/tufanshu/archive/2005/11/17/20309.html http://m.tkk7.com/tufanshu/comments/20309.html http://m.tkk7.com/tufanshu/archive/2005/11/17/20309.html#Feedback 3 http://m.tkk7.com/tufanshu/comments/commentRss/20309.html http://m.tkk7.com/tufanshu/services/trackbacks/20309.html 最q将手上的项?tomcat5.0+spring+struts)的jdk1.4升?.5的时?出现?jin)一堆的问题,l过不懈的努力和|上朋友的提C终于将问题解决?现在记录如下 1.java.lang.UnsupportedClassVersionError: com/mdcchina/userinfo/logic/UserManager (Unsupported major.minor version 49.0)提示如上的错?很是郁闷 l过研究和比较在两个不同环境下的~译q行,l于发现q个主要是由于我的机子上安装?jin)两个不同版本的JDKD?我想很多的朋友在试新的JDK的时?可能不会(x)删除1.4的版?但是要注意的是要JAVA_HOME,CLASS_PATH,PATH{等的环境变量都修改成相关的JDK1.5的目录下面去,因ؓ(f)1.5相对于以前的版本的变化比较大. 2.上面的问题排除后,在运行TOMCAT5.0时候由出现?jin)如下的错? 2005-11-17 19:38:47 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error: C:\application\Tomcat 5.0\work\Catalina\localhost\mlinkweb\org\apache\jsp\layouts\layout_005findex_jsp.java:7: cannot access java.lang.Object
Generated servlet error: bad class file: C:\application\Java\jdk1.5.0\jre\lib\rt.jar(java/lang/Object.class) class file has wrong version 49.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. public final class layout_005findex_jsp extends org.apache.jasper.runtime.HttpJspBase ^ 1 error q个问题q是让我郁闷之极?^_^) 最后在SUN的JAVA论坛里面扑ֈ?jin)答?只要JDK1.5的LIB下面的TOOLS.JAR覆盖TOMCAT5.0目录/common/lib下面的tools.jar,然后重启TOMCAT5.0可以了(jin)
]]>
վ֩ģ壺
һ |
Ƶ |
ŷxƵ |
AëƬA |
ƷҳѸ߹ۿ |
þþþƷС˵ |
ѿƵվ |
һձaѲ |
ڳ߿ |
Ʒר |
ʮ˽Ƶ߹ۿڵ
|
ŷղۺ |
ĻѴƬ |
91Ʒѹ |
ŷAV |
þþþAVۺϲҰ |
8xվ߹ۿ |
Ʒާѡ2021
|
Ӱַ |
AƵ |
ձѴ߹ۿ |
һa뼺Ӳִѿ51Ʒ
|
Ʒާv벥 |
þþƷվѹۿ |
Ƶ߹ۿ |
˾ҹƷƵ߹ۿ |
þþƷAVũ帾Ů |
һɫþ88ۺ |
AVƬ߲Ψ |
˿wwwƵ |
ƷAMMëƬ |
Ʒѹۿ |
輤һ |
ѱվڹۿ |
ѵƵݮ |
aɫëƬƵ |
һѹۿձwwwƵ |
a뾫Ʒɫҹ |
ۺɫɫ |
þþƷAV鶹
|
bbbѹۿƵ |