Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV4platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV4platform
Commits
08765610
Commit
08765610
authored
Aug 08, 2018
by
周添尉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改下载乱码
parent
ecd68c96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
actAction.java
src_jwapp/com/jw/app/unit/action/actAction.java
+1
-7
actAction.java
src_jwapp/com/jw/app/user/action/actAction.java
+1
-7
No files found.
src_jwapp/com/jw/app/unit/action/actAction.java
View file @
08765610
...
...
@@ -1293,13 +1293,6 @@ public class actAction extends BasicAction {
String
uploadold
=
request
.
getParameter
(
"uploadold"
);
if
(
new
File
(
uploadpath
+
File
.
separator
+
uploadnew
).
exists
()==
false
){
uploadpath
=
request
.
getSession
().
getServletContext
().
getRealPath
(
uploadpath
);
try
{
// uploadold = new String(uploadold.getBytes("iso8859-1"), "utf-8");
uploadold
=
new
String
((
uploadold
).
getBytes
(
"gbk"
),
"iso8859-1"
);
}
catch
(
UnsupportedEncodingException
e1
)
{
// TODO Auto-generated catch block
e1
.
printStackTrace
();
}
FileUtil
fileUtil
=
new
FileUtil
();
//文件存放目录
FileObject
baseDir
=
fileUtil
.
getFile
(
uploadpath
);
...
...
@@ -1313,6 +1306,7 @@ public class actAction extends BasicAction {
e
.
printStackTrace
();
}
//设置response
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setContentType
(
"application/octet-stream"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment; filename=\""
+
uploadold
+
"\""
);
...
...
src_jwapp/com/jw/app/user/action/actAction.java
View file @
08765610
...
...
@@ -1756,13 +1756,6 @@ public class actAction extends BasicAction {
String
uploadold
=
request
.
getParameter
(
"uploadold"
);
if
(
new
File
(
uploadpath
+
File
.
separator
+
uploadnew
).
exists
()==
false
){
uploadpath
=
request
.
getSession
().
getServletContext
().
getRealPath
(
uploadpath
);
try
{
// uploadold = new String(uploadold.getBytes("iso8859-1"), "utf-8");
uploadold
=
new
String
((
uploadold
).
getBytes
(
"gbk"
),
"iso8859-1"
);
}
catch
(
UnsupportedEncodingException
e1
)
{
// TODO Auto-generated catch block
e1
.
printStackTrace
();
}
FileUtil
fileUtil
=
new
FileUtil
();
//文件存放目录
...
...
@@ -1777,6 +1770,7 @@ public class actAction extends BasicAction {
e
.
printStackTrace
();
}
//设置response
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setContentType
(
"application/octet-stream"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment; filename=\""
+
uploadold
+
"\""
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment