Tomcat跑多项目和JSON转换格式异常

Tomcat跑多项目 修改server.xml

<Context docBase="xyd_xytxw" path="/" reloadable="true" source="org.eclipse.jst.jee.server:xyd_xytxw"/></Host>

JSON格式异常多是因为上下级关系

把BaseConfig.properties.

Host = http://192.168.10.17//shoveeims/
Postfix = .do
FollowStar=http://192.168.10.17/xyd_fans/app/appFollowAdmin.do
adminLg=445544
pwdLg=670b14728ad9902aecba32e22fa4f6bd
Yxshop=http://192.168.10.26:8080//yf/
YxmdKey=1 

3扫描code码传值

private boolean downLoadFile(HttpServletResponse response, String filePath) {
FileInputStream fileInputStream = null;
ServletOutputStream os = null;
try{
String fileName = filePath.substring(filePath.lastIndexOf("\\")+1,filePath.length());
                fileInputStream = new java.io.FileInputStream(filePath);
response.setCharacterEncoding("UTF-8");
response.setContentType("application/octet-stream");
/防止中文名称乱码
response.setHeader("Content-Disposition","attachment;filename="+new String(fileName.getBytes("gbk"),"iso-8859-1"));                
int i;
 os =  response.getOutputStream();
while ((i = fileInputStream.read()) != -1) {
os.write(i);
}
os.flush();
}catch(Exception e){
e.printStackTrace();
}finally{
try {
fileInputStream.close();
os.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return true;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值