![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
常用代码及技能
cfan_haifeng
这个作者很懒,什么都没留下…
展开
-
Struts中常要添加的XML
1. 在struts-config.xml中通常添加 Tiles定义--> plug-in className="org.apache.struts.tiles.TilesPlugin"> set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml,/原创 2007-05-13 17:30:00 · 658 阅读 · 0 评论 -
JSP中的常用代码
原创 2007-05-18 15:38:00 · 627 阅读 · 0 评论 -
JSF常用异常
try ...{ ************************** } catch (Exception e) ...{ FacesMessage message = new FacesMessage( FacesMessage.SEVERITY_FATAL, e.getClass().g原创 2007-05-28 20:46:00 · 1078 阅读 · 0 评论 -
如何在jsf中取当前系统路径啊
转自http://community.csdn.net/Expert/topic/5566/5566561.xml?temp=3.553408E-02FacesContext.getCurrentInstance().getExternalContext().getRequestServletPath();FacesContext.getCurrentInstance().getExterna转载 2007-05-29 15:38:00 · 1032 阅读 · 0 评论 -
得到用户的输入并显示到控制台
public void getInput() ...{ // BufferedReader lineReader = new BufferedReader(new InputStreamReader( System.in)); while (true) ...{ try ...{ // 得原创 2007-10-22 20:12:00 · 573 阅读 · 0 评论 -
JAVA中判断字符是否为中文的方法
摘自:http://hilliate.blog.hexun.com/11600190_d.htmlString.getBytes().length != String.length()String.getBytes().length取的是字节数,因为中文是全角字符,所以每个中文的字节数都为2String.length()取的是字符长度,按中文的个数来截取。但是这样有bug 因为中原创 2007-10-31 15:04:00 · 2404 阅读 · 0 评论