`
文章列表

Struts值栈调试

<s:debug/> 为Stack Context写入值 <s:set name="pageId" value="2"/> ActionContext ctx=ActionContext.getContext(); ctx.put("pageId", "1"); 取出Stack Context的值 <s:if test="#pageId==1">class="hover"</s:if>
HQL中缺少逗号

JS截取字符串

<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> ${fn:substring(baitong_notice.title,0,12)} <s:iterator value="baitong_notice_list" id="baitong_notice" status="i"> <div class="ranking_List<s:property val ...

等比例压缩图片

    博客分类:
  • java
package com.baitw.struts.utils; import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; /** * * 生成等比例高质量缩略图 * * */ public class ScaleImage { private int width; private int height; private int scaleWidth; double support = (double) 3. ...
package com.baitw.struts.utils; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class Upload { public String uploadImage(File upload,String savePath,String uploadFileName) throws IOException{ FileOutputStrea ...
<input type="file" class="upload" name="upload"/> package com.baitw.struts.action; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSu ...

JS提交表单

<script type="text/javascript"> function login() { targetForm = document.forms[0]; targetForm.action = "login!ForAdmin.action"; } </script>
//创建表空间 CREATE TABLESPACE     AITE datafile 'D:\temp\aite.dbf' size 100m autoextend ON     NEXT 32m maxsize 2048m     DROP TABLESPACE aite INCLUDING CONTENTS AND DATAFILES;--删除表空间 //创建用户 CREATE USER "xiongjiajia"  PROFILE "DEFAULT"  IDENTIFIED BY "123456" DEFAULT TA ...

字符串转日历

    博客分类:
  • java
new SimpleDateFormat("yyyy-MM-dd").parse("2012-11-01")

权限过滤器Filter

    博客分类:
  • java
package com.baitw.struts.utils; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.serv ...
设定时间关机 at 00:00 Shutdown -s 倒计时关机 Shutdown.exe -s -t 3600 取消倒计时关机 shutdown.exe -a 无法启动服务 net start Schedule Services.msc Task Scheduler
首先用List查询出来4个对象 <!-- 使用subset标签截取目标集合的2个元素,从第1个元素开始截取 --> <s:subset source="shopList" start="0" count="2" id="shop"> <s:iterator> <input type="image" src="<s:property value="#shop.logo"/>"/> ...
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> < ...
IllegalArgumentException occurred while calling setter of com.baitw.hibernate.entity.TNews.state 原因:对应bean中set方法数据类型和hibernate配置文件中定义的类型不一致

SQL常用语句

select card_num,sum from (select card.card_num, sum(expense.deduction_money) as sum from t_card_expense expense, t_card card where expense.card_id = card.id and to_char(expense.create_dt, 'yymmdd') between '020701' and '130707' ...
Global site tag (gtag.js) - Google Analytics