会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
不要西红柿
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
5
6
7
8
9
10
11
12
13
下一页
2020年3月
javaweb下载设置响应头
摘要: 浏览器默认对能显示的文件进行显示,如果不能显示则下载。通过设置响应头的方式可以手动设置浏览器进行下载操作。 1 //设置响应头 以下载的方式返回到浏览器 2 response.setHeader("Content-Disposition","attachment;filename=test.txt"
阅读全文
posted @ 2020-03-26 23:31 不要西红柿
阅读(3461)
评论(0)
推荐(0)
2019年12月
js阻止页面enter键入的事件触发
摘要: <!-- 这一段代码阻止了当前document中的 enter键的 keydown 事件 抄自网络--><script type="text/javascript"> document.onkeydown = function() { var evt = window.event || argume
阅读全文
posted @ 2019-12-19 18:23 不要西红柿
阅读(1856)
评论(0)
推荐(0)
2019年11月
javaWeb中的basepath和Springmvc默认跳转视图
摘要: 1 String path = request.getContextPath(); // 获取的是 /项目名 2 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort
阅读全文
posted @ 2019-11-19 20:42 不要西红柿
阅读(460)
评论(0)
推荐(0)
webService小记--实现服务端客户端
摘要: 使用cxf提供的JaxWsServerFactoryBean发布webService服务,wsdl文件中的标签会存在 wsdl:前缀。直接使用 javax.xml.ws.Endpoint; 调用publish方法发布服务 标签中不包含 wsdl: 前缀。 wsimport 生成的客户端使用方法为通过
阅读全文
posted @ 2019-11-19 20:39 不要西红柿
阅读(291)
评论(0)
推荐(0)
maven执行install命令将jar包添加到仓库
摘要: 1 需要安装maven 2 3 mvn install:install-file -Dfile=C:\Users\sd\Desktop\com\oracle\ojdbc6\11.2.0.3.0\ojdbc6-11.2.0.3.0.jar -DgroupId=com.oracle -Dartifact
阅读全文
posted @ 2019-11-15 18:16 不要西红柿
阅读(496)
评论(0)
推荐(0)
修改tomcat的server.xml映射图片
摘要: 1 在<Engine>的<Host>中添加 Context path为服务器映射路径 docBase为文件实际存储路径。可以将ftp服务器的图片通过http协议查询到。 2 端口号为 tomcat端口。 3 <Host appBase="webapps" autoDeploy="true" name
阅读全文
posted @ 2019-11-13 11:23 不要西红柿
阅读(432)
评论(0)
推荐(0)
java提供的压缩方法压缩文件夹(可以包含多个子文件夹)
摘要: 1 /** 2 * 该方法递归实现将多个文件夹压缩在同一个zip包中 然后删除文件夹directoryName 下需要被压缩的文件。 3 * @param directoryName 文件夹路径 4 * @param zos 压缩流 ZipOutputStream 确定压缩包生成的位置 5 * @p
阅读全文
posted @ 2019-11-11 17:10 不要西红柿
阅读(3215)
评论(0)
推荐(1)
org.apache.commons.net.ftp.FTPClient文件上传和压缩相关api记录。 下载压缩包和word文档response记录
摘要: 1 org.apache.commons.net.ftp.FTPClient包 api记录 2 3 //将文件上传到ftp服务器 4 storeFile(String remote, InputStream local); 5 // 从ftp文件服务器下载到本地 6 retrieveFile(Str
阅读全文
posted @ 2019-11-11 17:04 不要西红柿
阅读(525)
评论(0)
推荐(0)
在spring中使用junit4测试
摘要: 1 @RunWith(SpringJUnit4ClassRunner.class) // 使用junit4测试 2 @ContextConfiguration(locations={"classpath:applicationContext.xml"}) // 引入spring配置文件 使用上面两个
阅读全文
posted @ 2019-11-11 16:56 不要西红柿
阅读(392)
评论(0)
推荐(0)
2019年8月
javaweb四大作用域和九大内置对象
摘要: 四大作用域 page request session application page request session application 九大内置对象 page request response session application out pageContext config except
阅读全文
posted @ 2019-08-13 18:06 不要西红柿
阅读(764)
评论(0)
推荐(0)
上一页
1
···
5
6
7
8
9
10
11
12
13
下一页
公告