RE: Servlet 3.0 File Upload

2011-09-03 Thread Jonathan Soons
You need to add a line in in your form:
input type=text name=filename /

Then in your servlet GetPost() method you put this filename in a variable:
String filename;
filename = req.getParameter(filename);

Then instead of part.write(samplefile);
do:
part.write(filename);

Jonathan Soons

From: Ole Ersoy [ole.er...@gmail.com]
Sent: Friday, September 02, 2011 6:50 PM
To: Tomcat Users List
Subject: Servlet 3.0 File Upload

Hi,

I have a working file upload servlet, with the exception that it calls the 
uploaded file samplefile instead of using the name of the file.  So if I 
upload different files, they all overwrite each other.  Any ideas on how to fix 
this?  I used this tutorial to get it working:

http://www.servletworld.com/servlet-tutorials/servlet3/multipartconfig-file-upload-example.html

TIA,
- Ole


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



More heap space for jhat

2010-02-23 Thread Jonathan Soons
 
My dump file:
-rw-r--r-- 1 root   root   1101517561 Feb 23 20:13 heap
When I run jhat on this I get:
Exception in thread main java.lang.OutOfMemoryError: Java heap space

Is there a way to make jhat use more memory? I cannot find a command line 
option that does this.
Thanks
jon soons
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Restart one webapp

2010-02-22 Thread Jonathan Soons
 Restarting works fine. I think the restarting mechanism is built into tomcat 
and not into the webapp itself.

Konstantin: Thanks for the tip on wget documentation. I was reading tomcat docs 
only.

jonsoons

-Original Message-
From: Mikolaj Rydzewski [mailto:m...@ceti.pl] 
Sent: Sunday, February 21, 2010 4:15 PM
To: Tomcat Users List
Subject: Re: Restart one webapp


Jonathan Soons wrote:
  
 I have one webapp that randomly freezes. I detect this with a script and 
 restart tomcat. I would prefer to restart just the one webapp the way the 
 manager does. 
Are you soure, that manager is able to restart webapp when it is 'frozen'?

--
Mikolaj Rydzewski m...@ceti.pl



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Restart one webapp

2010-02-20 Thread Jonathan Soons
The documentation gives no way to append a username and password so this is 
where I am stuck.

www:~# wget localhost:8080/manager/list
--2010-02-21 02:31:52--  http://localhost:8080/manager/list
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authorization failed.
www:~#


From: Caldarale, Charles R [chuck.caldar...@unisys.com]
Sent: Saturday, February 20, 2010 10:15 AM
To: Tomcat Users List
Subject: RE: Restart one webapp

 From: Jonathan Soons [mailto:jso...@juilliard.edu]
 Subject: Restart one webapp

 I have one webapp that randomly freezes. I detect this with a script
 and restart tomcat. I would prefer to restart just the one webapp the
 way the manager does. Is there a command line way to do this?

Use curl or wget to send the manager the plain-text commands, not the HTML ones.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Restart one webapp

2010-02-19 Thread Jonathan Soons
 
I have one webapp that randomly freezes. I detect this with a script and 
restart tomcat. I would prefer to restart just the one webapp the way the 
manager does. Is there a command line way to do this?

jon soons 

Java version 1.6.0_14
Tomcat 5.5.27
Debian Linux 2.6.24-23-xen
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Can't access Tomcat from outside the LAN

2009-09-15 Thread Jonathan Soons
 
Tom, Do you have a default gateway?
If you can access anything outside your LAN then you must have one.
It seems your tomcat box does not know about it.

Jonathan Soons
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Can't access Tomcat from outside the LAN

2009-09-15 Thread Jonathan Soons
Number of PCs is not a factor. If you have 1 PC and you want to connect beyond 
your network you need a default gateway.
If you have 1 PC and tomcat is installed you should first try accessing tomcat 
through http://localhost:8080/
If you have another PC on the same network It should be able to access tomcat 
on the first PC via its IP address:8080.
Can you tell us the topography of your network? IP addresses, etc?  That will 
make it far easier to diagnose.

Jonathan Soons


From: Ziggy [zigg...@gmail.com]
Sent: Tuesday, September 15, 2009 5:42 PM
To: Tomcat Users List
Subject: Re: Can't access Tomcat from outside the LAN

If you have more than one pc on ur network then you have to configure
your gateway(I.e router) so that all requests that use port 8080
should be forwarded to the pc that has tomcat installed.

On 9/15/09, Jonathan Soons jso...@juilliard.edu wrote:

 Tom, Do you have a default gateway?
 If you can access anything outside your LAN then you must have one.
 It seems your tomcat box does not know about it.

 Jonathan Soons
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



--
Sent from my mobile device


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Encoding and Operative System

2006-03-14 Thread Jonathan Soons
 How does the OS effect the decoding / accepting of the submitted
forms?

You might want to check that you have UTF-8 installed as a locale first.
Since you are using Debian do:

bash:# locale -a

If you see UTF-8 in the output then you should su to the user that
starts tomcat (probably root) and do:

bash:# export LANG=fr_BE.utf8
bash:# export LC_ALL=fr_BE.utf8

and then restart tomcat in that environment and test your form.
If there is no UTF-8 when you do locale -a then you should do:
bash# dpg-reconfigure locales
and you will get a screen where you can enable support for UTF-8.
If you are using a stock Debian kernel this will work without
recompiling.

This solved some problems for me but I use en_US.utf8

jonathan soons


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]