Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bc10af10
Kaydet (Commit)
bc10af10
authored
Eyl 06, 2002
tarafından
Bertram Nolte
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#101518# Improved working directory.
üst
22328a4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
ConverterServlet.java
odk/examples/java/ConverterServlet/ConverterServlet.java
+7
-2
No files found.
odk/examples/java/ConverterServlet/ConverterServlet.java
Dosyayı görüntüle @
bc10af10
...
@@ -38,7 +38,7 @@ public class ConverterServlet extends HttpServlet {
...
@@ -38,7 +38,7 @@ public class ConverterServlet extends HttpServlet {
/** Specifies the temporary directory on the web server.
/** Specifies the temporary directory on the web server.
*/
*/
private
String
stringWorkingDirectory
=
private
String
stringWorkingDirectory
=
System
.
getProperty
(
"java.io.tmpdir"
).
replace
(
'\\'
,
'/'
)
+
"/"
;
System
.
getProperty
(
"java.io.tmpdir"
).
replace
(
'\\'
,
'/'
);
/** Specifies the host for the office server.
/** Specifies the host for the office server.
*/
*/
...
@@ -46,7 +46,7 @@ public class ConverterServlet extends HttpServlet {
...
@@ -46,7 +46,7 @@ public class ConverterServlet extends HttpServlet {
/** Specifies the port for the office server.
/** Specifies the port for the office server.
*/
*/
private
String
stringPort
=
"8
2
00"
;
private
String
stringPort
=
"8
1
00"
;
/** Called by the server (via the service method) to allow a servlet to handle
/** Called by the server (via the service method) to allow a servlet to handle
* a POST request. The file from the client will be uploaded to the web server
* a POST request. The file from the client will be uploaded to the web server
...
@@ -59,6 +59,11 @@ public class ConverterServlet extends HttpServlet {
...
@@ -59,6 +59,11 @@ public class ConverterServlet extends HttpServlet {
protected
void
doPost
(
HttpServletRequest
request
,
protected
void
doPost
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
ServletException
,
java
.
io
.
IOException
{
HttpServletResponse
response
)
throws
ServletException
,
java
.
io
.
IOException
{
try
{
try
{
// If necessary, add a slash to the end of the string.
if
(
!
stringWorkingDirectory
.
endsWith
(
"/"
)
)
{
stringWorkingDirectory
+=
"/"
;
}
// Construct a MultipartRequest to help read the information.
// Construct a MultipartRequest to help read the information.
// Pass in the request, a directory to save files to, and the
// Pass in the request, a directory to save files to, and the
// maximum POST size we should attempt to handle.
// maximum POST size we should attempt to handle.
...
...
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