- 浏览: 5819210 次
- 性别:
- 来自: 上海
最新评论
-
Memories_NC:
本地lua脚本终于执行成功了,虽然不是通过redis
java中调用lua脚本语言1 -
ZHOU452840622:
大神://处理返回的接收状态 这个好像没有监听到 遇 ...
android 发送短信的两种方式 -
PXY:
拦截部分地址,怎么写的for(int i=0;i<lis ...
判断是否登录的拦截器SessionFilter -
maotou1988:
Android控件之带清空按钮(功能)的AutoComplet ...
自定义AutoCompleteTextView -
yangmaolinpl:
希望有表例子更好。。。,不过也看明白了。
浅谈onInterceptTouchEvent、onTouchEvent与onTouch
文章列表
<%
int mb = 1024*1024;
long totalMemory = Runtime.getRuntime().totalMemory() / mb; // 可使用内存
long freeMemory = Runtime.getRuntime().freeMemory() / mb; // 剩余内存
%>
<tr>
<td>服务器时区:</td>
<td><%= java.util.TimeZone.getTimeZone("Beijing"). ...
- 2009-08-05 17:17
- 浏览 1948
- 评论(0)
<style>
table {
table-layout: fixed;
word-wrap:break-word;
}
div {
word-wrap:break-word;
}
</style>
- 2009-08-04 13:52
- 浏览 2521
- 评论(0)
1 java调用外部程序的方法
在一个java应用中,可能会遇到这样的需求,就是需要调用一些外部的应用做一些处理,比如调用excel,然后在继续程序的运行。
下面就开始进入java调用外部程序的一些演示,让java应用更加灵活。
1:最简单的演示:
Runtime.getRuntime().exec("notepad.exe");
记事本被打开了是吧。
2:传递应用程序的参数:
Runtime runtime=Runtime.getRuntime();
String[] commandArgs={"notepad.exe" ...
- 2009-08-03 17:31
- 浏览 7207
- 评论(0)
if("calculator".equals(form.getAction())){
System.out.println("-------------calculator---------------");
String[] cmd = {"calc.exe"};
Process pro;
try {
pro = Runtime.getRuntime().exec(cmd);
pro.waitFor();
} catch (Exception e) {
System.out.pri ...
- 2009-08-03 17:29
- 浏览 2319
- 评论(0)
web.xml
<servlet>
<servlet-name>Connector</servlet-name>
<servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
<init-param>
<param-name>baseDir</param-name>
<param-value>/UserFiles/</param-value>
...
if("download".equals(ledgerForm.getAction())){//测试中
System.out.println("----------------download------------------");
String id=request.getParameter("id");
String realPath=this.getServlet().getServletContext().getRealPath("/");
if(realPath.endsWith( ...
- 2009-08-03 16:10
- 浏览 1951
- 评论(0)
System.out.println("==============把图片写入数据库开始,如果有多张则写入第一张====================");
Blob blob= null;
FormFile file = ledgerForm.getFile();
String fileName = file.getFileName();
long size=file.getFileSize();
System.out.println("name="+file.getFileName());
// Sy ...
- 2009-08-03 16:05
- 浏览 2135
- 评论(0)
html:
<script>
function changeFileInput(){
var num=$("fileSelect").value;
while($("files").childNodes.length>0){
$("files").removeChild($("files").childNodes[0]);
}
for(var i=0;i<num;i++){
filediv=document.createElement("div&q ...
- 2009-08-03 16:03
- 浏览 4695
- 评论(0)
if (billForm.getButtonName() != null) {
if(billForm.getButtonName().equals("export")){
System.out.println("-------------------export start--------------------");
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet&qu ...
if ("datafile".equals(billForm.getAction())){
String date = request.getParameter("date");
System.out.println("date="+date);
if(date ==null){
}else{
List l =this.getBill2Service().getPayData(date);
StringBuffer sb=new StringBuffer();
for(int i ...
- 2009-08-03 14:27
- 浏览 2233
- 评论(0)
java action:
LoginForm form=(LoginForm)actionForm;
ActionMessages errors = new ActionMessages();
System.out.println("form.getAction()="+form.getAction());
if ("login".equals(form.getAction())) {
System.out.println("----------------login--------------");
Auth ...
- 2009-08-03 11:45
- 浏览 2776
- 评论(0)
生成验证码图片的Servlet类
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
im ...
- 2009-08-03 11:37
- 浏览 1813
- 评论(0)
java action:
HttpSession session = request.getSession();
UserSession userSession = new UserSession();
userSession.setUser(user);
session.setAttribute(Constant.USER_SESSION_KEY, userSession);//把UserSession传递到下个页面
...
request.getSession().setAttribute("parentVector", parentV);
request.getSess ...
- 2009-08-03 11:04
- 浏览 3227
- 评论(0)
java:
PaginationSupport pagination = this.getBill2Service().getBillPayList(detachedCriteria, form.getStartIndex());
List list = pagination.getItems();
request.setAttribute("billList", list);
request.setAttribute("pagination", pagination);
html:
<table width="100%" bo ...
- 2009-08-03 10:43
- 浏览 1944
- 评论(0)
DetachedCriteria的使用
- 博客分类:
- struts
DetachedCriteria detachedCriteria = DetachedCriteria.forClass(WtPepBillpay.class);
detachedCriteria.createAlias("id", "id");
detachedCriteria.add(Restrictions.eq(WtPepBillpay.BILLMERCODE, organizationCode));
detachedCriteria.add(Restrictions.between(WtPepBillpay.PEPDATE, start, en ...
- 2009-08-03 10:26
- 浏览 2572
- 评论(0)