
java
文章平均质量分 57
ccessl
爱生活,爱猫咪
展开
-
运行Java web时遇到的错误
Several ports (8005, 8080, 8009) required by Tomcat v8.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process o原创 2017-07-24 10:14:04 · 432 阅读 · 0 评论 -
Eclipse设置server Locations及getServletContext().getRealPath获取到的工程目录路径
Eclipse设置server Locations及getServletContext().getRealPath获取到的工程目录路径,每次要修改server Location时,要先将tomcat服务器下部署的所有项目移除remove移除掉,再右键点击tomcat server选择clean。request.getSession().getServletContext().getRealPath("");原创 2017-11-05 20:41:05 · 2007 阅读 · 0 评论 -
Could not initialize class com.jacob.activeX.ActiveXComponent
nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.jacob.activeX.ActiveXComponent] with root cause java.lang.NoClassDefFoundError: Could not initialize class com.jacob.activeX.ActiveXComponent原创 2017-11-05 18:52:13 · 18464 阅读 · 1 评论 -
java 保存和读取本地文件
保存数据到本地文件 private void saveDataToFile(String fileName,String data) { BufferedWriter writer = null; File file = new File("d:\\"+ fileName + ".json"); //如果文件不存在,则新建一个 if(!...原创 2017-11-10 16:35:25 · 19109 阅读 · 0 评论 -
spring mvc 基于表单的认证过程及cookie应用和session管理
spring mvc 基于表单的认证过程及cookie应用和session管理,Response Headers HTTP响应首部字段中Set-Cookie,Request Headers HTTP请求首部字段JSESSIONID,spring mvc的具体配置和过程原创 2017-11-16 16:13:56 · 978 阅读 · 1 评论 -
Java jxl在excel模板中动态加入数据,及前端下载excel的例子
Java jxl在excel模板中动态加入数据,及前端下载excel的例子前端通过点击一个下载按钮,根据前端显示的数据,下载Excel文件到本地。前端通过ajax的post请求,传递json字符串到后台。后台接收到json字符串,并拷贝一个模板Excel文件,假设命名为test1.xls。后台解析json,通过jxl,Java可以很方便的操作微软的Excel文档。将数据填入指定位置。原创 2017-11-26 19:40:22 · 1964 阅读 · 0 评论