You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Antony Paul <an...@hotmail.com> on 2003/12/08 07:12:45 UTC

[OT] Writing methods in servlets

Hi all,
    Is there any issues associated with writing methods in servlets other
than the morality of it( I dont use methods in JSP pages). My application
uses controller servlets for redirecting requests to different pages based
on the parameter(action) passed to it. Application is designed in a way that
it will have one controller servlet for a group of actions on same entity.
Earlier I used to check the action in if else blocks. Now the servlet is
becoming cluttered with lots of if else blocks. So I want to move this to
methods and I must do it in Servlets itself (The application design dont
allow to move this to another class). I know that container creates multiple
threads of servlce method of (I dont know how) same servlet to service
multiple requests. Then what about other custom methods in servlets.  I dont
use any instance variables.

rgds
Antony Paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Connection Refused

Posted by Mike Nguyen <qu...@comcast.net>.
When I tried to shutdown tomcat, I got the following message. Please help.
Thank you.
Mike

[root@sun bin] % ./shutdown.sh 
Using CATALINA_BASE:   /opt/jakarta-tomcat-5.0.16
Using CATALINA_HOME:   /opt/jakarta-tomcat-5.0.16
Using CATALINA_TMPDIR: /opt/jakarta-tomcat-5.0.16/temp
Using JAVA_HOME:       /usr/j2se
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl
java:161)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
        at java.net.Socket.connect(Socket.java:425)
        at java.net.Socket.connect(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:290)
        at java.net.Socket.<init>(Socket.java:118)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina
java:436)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl
invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl
invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap
java:322)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:400)