Re: heap size in tomcat 5.0

2005-09-24 Thread Leon Rosenberg
bin\catalina.bat

actually in all versions of tomcat :-)

regards
Leon

On 9/24/05, matador [EMAIL PROTECTED] wrote:
 win2k server
 tomcat 5.0.x

 how to set heap size (min  max)?

 i know how to do it in tomcat 5.5, but wasnt sure which script controlled
 the JAVA_OPTS in 5.0

 thx


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



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



Re: force reload of individual class files

2005-09-24 Thread Leon Rosenberg
I think this is best solution. Imagine you have class A and class B. B
holds an instance of A. Now you force B to be reloaded. Should A be
reloaded too? What happens with the instance of A in B? Is it
duplicated? C is holding an instance of B, so must C be reloaded (and
all existing objects which refer to B reinstantiated) now?

You don't need to restart the server to get your changes live, you can
force it to reload the whole application, which, in case of tomcat,
your users wouldn't even notice (as long as ALL your beans in session
are serializable).

On the other hand, for major fixes on large production systems, you
can't afford to deploy a class and relay on servers reloading
behaviour, you have then a release process with testing and quality
management, so it's not an issue.

regards
Leon

P.S. the JSPs are reloaded intime. If you really need to
hot-redeploy your classes, you can patch tomcat and supply your own
classloader policy, using a separate class loader for each and every
servlet / component / class will allow you to reload the classes but
will also lead to abovementioned inconsistences.

On 9/24/05, jimbo-black [EMAIL PROTECTED] wrote:
 Leon Rosenberg [EMAIL PROTECTED] wrote in
 news:[EMAIL PROTECTED]:

  On 9/23/05, [EMAIL PROTECTED] [EMAIL PROTECTED]
  wrote:

  I think it's forbidden by the spec.
 
  SRV.3.7 Reloading Considerations
  Although a Container Provider implementation of a class reloading
  scheme for ease
  of development is not required, any such implementation must ensure
  that all servlets, and classes that they may use, are loaded in the
  scope of a single class
  loader. This requirement is needed to guarantee that the application
  will behave as expected by the Developer.
 
 


 ah i see, that would make sense.  but it seems strange that this sort of
 thing is accepted as the norm.  i would think that its a common requirement
 and that a lot of developers would get sick of restarting the server to get
 some minor bug fix into production.

 does anyone have a workaround?

 btw, i moved to storing my name-value pairs (used to be props files) in the
 db for this very reason.



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



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



Re: Registering my own protocol in Tomcat

2005-09-24 Thread Leon Rosenberg
What you need is a connector. I never looked how tomcat finds the
proper connector, but it's surely configurable or, if not, easy
patchable. Look at the server.xml connector configuration part and
take a look at the source code :-)

regards
Leon

On 9/22/05, Martin Peter [EMAIL PROTECTED] wrote:
 Hi,



 Is there a possibility to get tomcat working with my own ASCII based
 protocol (instead of HTTP). Is there a possibility to register a
 protocol-handler or something similar to handle the requests of my
 protocol with a servlet?



 Thanks,


 Martin Peter







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



Re: force reload of individual class files

2005-09-24 Thread matador
Leon Rosenberg [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]: 

 You don't need to restart the server to get your changes live, you can
 force it to reload the whole application, which, in case of tomcat,
 your users wouldn't even notice (as long as ALL your beans in session
 are serializable).
 


thanks much. i do understand it better now, is there any other special 
setup to make sure that tomcat persists sessions across restarts? 
(e.g. context.xml pararms)



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



Re: force reload of individual class files

2005-09-24 Thread Mark Thomas

matador wrote:

Leon Rosenberg [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]: 




You don't need to restart the server to get your changes live, you can
force it to reload the whole application, which, in case of tomcat,
your users wouldn't even notice (as long as ALL your beans in session
are serializable).





thanks much. i do understand it better now, is there any other special 
setup to make sure that tomcat persists sessions across restarts? 
(e.g. context.xml pararms)




Nope. For more info read 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/manager.html 
particularly 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/manager.html#Restart%20Persistence


Mark


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



Re: How to limit the size of TOMCATs stdout file

2005-09-24 Thread Tim Funk
Tomcat doesn't explicitly log to standard output. The underlying logging 
mechanism does.   The docs and faq talk about how to configure logging so 
standard out is not used.


-Tim

Leon Rosenberg wrote:

actually tomcat spams a lot in the catalina.out, this is my favorite:
[EMAIL PROTECTED]: Exception Processing ErrorPa
ge[errorCode=404, location=/down/404.html]
ClientAbortException:  java.net.SocketException: Connection reset
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331)
at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297)
at org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.j
ava:537)


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



Re: heap size in tomcat 5.0

2005-09-24 Thread matador
Leon Rosenberg [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]: 

 bin\catalina.bat
 
 actually in all versions of tomcat :-)
 
 regards
 Leon
 

cool thanks.  i assume that if you run it as a windows service then the 
JAVA_OPTS are still picked up from there?

well i dont think that if you install tomcat 5.5.x on windows there is no 
catalina.bat anymore -- at least in the distro that i've used.  i set the 
heap size via the windows gui on 5.5.x.  


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



Re: CGI difficulty, binmode(STDIN) not working in FileUpload

2005-09-24 Thread Mark Thomas

Ron Cozad wrote:

I have a form input on a html page that does a file upload.  I am only
getting the first 3k of an upload file.  If the file is less than 3k,
the multipart boundaries are structured properly, otherwise, I never get
the end of the file or the ending boundary.

 


I did binmode(STDIN); but still not getting the whole file.

 


Running Tomcat 4.1.31 and IE browser 6.x.

 


Appreciate any suggestions or theories as to why I am not getting the
whole file.


There is a bug in the CGIServlet (32023) that has been fixed in the 
latest version available from SVN.


http://svn.apache.org/repos/asf/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java



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



Re: Generic Types support in Tomcat?

2005-09-24 Thread Seak, Teng-Fong
I've received an announcement mail telling that 5.5.12 is in alpha
phase!  So what's this story?  Actually, I'm more interested in using
the new for loop in Java5 than using generic.

Christoph Kutzinski wrote:

 Hi,

 it is only since 5.5.10
 5.5.10 was already released, but it is only supposed to be alpha.
 I.e. not recommended for production use.
 I have no idea, when the next stable tomcat version will be released


 Christoph



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



Protecting applications in Tomcat using Directory Server

2005-09-24 Thread Surya Mishra
 I have successfully used JNDI realm to protect my applications on Tomcat.
But if Tomcat is unable to connect to the the directory server, it refuses
access. I want it to use the tomcat-users list as a backup if it fails to
connect to the directory. It seems if the JNDI realm is set up, the
tomcat-users.cml file entries become useless.
Need Help!!!
Thanks
-Surya


Re: tomcat start exception

2005-09-24 Thread Bill Barker
If you add the attribute channelSocket.soLinger=-1 to your AJP/1.3 
Connector element in server.xml, it should make the error go away.  It's 
beyond me why Sun has decided to throw an exception here.

Jun Zhu [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I have a Tomcat5.5.9 server that works fine with JDBCRealm. I am trying
 to configure a customRealm for the sever. The customRealm.jar file was
 placed in the directory of $Tomcat_Home/server/lib. The realm in the
 server.xml has been defined as:

 Realm className=edu.aces.realm.JDBCUnixRealm
   connectionName=
   connectionPassword=XXX

 connectionURL=jdbc:mysql://oscar.acesag.auburn.edu:3306/authenticate
   driverName=org.gjt.mm.mysql.Driver
   roleNameCol=role_name
   userCredCol=user_pass
   userNameCol=user_name
   userRoleTable=tomcat_user_roles
   userTable=tomcat_users
   validate=true /

 After starting tomcat, I can see tomcat page via IE browser, but when
 click on Tomcat Manager, just got a blank page.
 I got exception in catalina.out as:
WARNING: Exception executing accept
java.net.SocketException: Invalid argument
at java.net.PlainSocketImpl.socketSetOption(Native Method)
at
 java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:264)
at java.net.Socket.setSoLinger(Socket.java:869)
at
 org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:300)
at
 org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.j$
at
 org.apache.jk.common.SocketAcceptor.runIt(ChannelSocket.java:852)
at
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thread$
at java.lang.Thread.run(Thread.java:595)

 In most case this exception means  The server is not running (nobody
 is listening on the specified port) or The host is not reachable.

 Is there any additional configuration I missed? How to fix this
 problem? Please help.

 Julia Zhu 




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



Re: Tomcat working directory

2005-09-24 Thread Bill Barker
The easiest way to to open up the nice GUI (If it isn't in the System-Tray 
or the Start menu, then it's usually at $CATALINA_HOME\bin\tomcat5w.exe), 
open the Startup tab, fill-in the Working Path box, and click 'OK'. 
Then restart the service.

It's also possible to do this from the command line, but I'll leave that as 
an exercise for people that have actually read the commons-daemon FM.

Samit Paul [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,
 How do I set tomcat-5's working directory to something other than
 C:\Windows\System32 when it is run as windows (XP) service .
 Even if I set CATALINA_HOME to point to the tomcat installation directory 
 it
 doesn't take it.
 Everything works great if I run tomcat from the command line using 
 tomcat's
 startup.bat file.
 Any help would be appreciated.
 ~Samit Paul








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




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