
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
23.08.2007, 15:23:32
|
|||
|---|---|---|---|
|
|||
Работа с файлами в J2EE(2) |
|||
|
#18+
Есть J2EE приложение использующее поле BLOB c doc файлами на MYSQL. Файлы с именем на английском записываются и открываются в лет. Ели буквы в имени файла русские, то в диалоге на клиенте open or save в имени файла каракули и не чего не работает. В debug все русские буквы нормальные. pageEncoding="UTF-8" <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <%@ page import="java.io.File, java.io.InputStream, java.io.FileInputStream, java.io.OutputStream"%> <%@ page session="false" %> <% String fileName = (String)application.getAttribute("fileupload_name"); String contentType = (String)application.getAttribute("fileupload_type"); response.setContentType(contentType); StringBuffer contentDisposition = new StringBuffer(); contentDisposition.append("attachment;"); contentDisposition.append("filename=\""); contentDisposition.append(fileName); contentDisposition.append("\""); response.setHeader ("Content-Disposition", contentDisposition.toString()); byte[] bytes = (byte[])application.getAttribute("fileupload_bytes"); if (bytes != null){ response.getOutputStream().write(bytes); } %> ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=59&tablet=1&tid=2144823]: |
0ms |
get settings: |
20ms |
get forum list: |
23ms |
check forum access: |
8ms |
check topic access: |
8ms |
track hit: |
70ms |
get topic data: |
19ms |
get forum data: |
4ms |
get page messages: |
64ms |
get tp. blocked users: |
2ms |
| others: | 347ms |
| total: | 565ms |

| 0 / 0 |
