- 浏览: 6407 次
最新评论
文章列表
一、数学函数ABS(x) 返回x的绝对值BIN(x) 返回x的二进制(OCT返回八进制,HEX返回十六进制)CEILING(x) 返回大于x的最小整数值EXP(x) 返回值e(自然对数的底)的x次方FLOOR(x) 返回小于x的最大整数值GREATEST(x1,x2,...,xn)返回 ...
@RequestMapping("/downLoadFile") public String downLoadFile(HttpServletResponse response,HttpServletRequest request) throws Exception { try { String basePath = request.getSession().getServletContext().getRealPath("/"); String fileName= ...
发送端:
HttpClient httpClient = new HttpClient(); //org.apache.commons.httpclient.HttpClientPostMethod method = new PostMethod(connecturl);//org.apache.commons.httpclient.methods.PostMethod method.setParameter("version", "1.0"); method.setParameter("se ...
本系统代码:
public void paynotify(){
String reqxml=util.createXMLxfb(resmap, list); String resxml=Clientnew.httpParameterStream(url, reqxml);
}
// http发送报文方法
public class Clientnew {
public static String httpParameterStream(String surl,String parameter)throws Exception{ String st ...
将图片以blob存入数据库
public String uploadfile() { try { HttpServletResponse response = ServletActionContext.getResponse(); HttpServletRequest request = ServletActionContext.getRequest(); String path = request.getContextPath(); Blob photo = null; ...
1、Action类:
public class EnterpriseAction extends BaseAction {
//此方法主要是将数据库里文件二进制转为文件存放在服务器某路径下
public void initorgimg(ScFile file,String reqattr){
HttpServletRequest request = getRequest();
// 获取存放路径
String savePath = ServletActionContext.getServletContext().getRealPath("/");
...
项目启动不报错,从浏览器里却访问不到项目,原因可能如下:
1、jdk是32位,而struts配置文件头部配的是
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd"> ...
1、<constant name="struts.locale" value="zh_CN"/> 默认的国际化地区信息。
2、<constant name="struts.custom.i18n.resources" value="application"/>
该属性指定Struts 2应用所需要的国际化资源文件,如果有多份国际化资源文件,则多个资源文件的文件名以英文逗号(,)隔开。
3、<s:url>标签
项目目录:web/admin/default.jsp页面中使用 ...