Premature socket disconnect with Tomcat

I'm seeing an intermittent problem with Java servlets, which I'm having real trouble tracking down... I wonder if anyone has seen something similar?
I am POSTing a request to the servlet, with about 1Kb of data in the request. The servlet sends a response by calling sendRedirect(new URL). In some circumstances, however, tomcat appears to be aborting the TCP connection prematurely... causing the browser (IE6.0) to first resubmit the POST request, and then give up and say "The page cannot be displayed".
The frequency of occurance seems to vary according to the network latency and the content length of the POST request. I also tried setting tomcat 3.3.1a's "socketCloseDelay" parameter on the Http10Connector - which does make the problem occur less, but doesn't make it go away completely. Using Coyote didn't help, either.
I suspect that there's something wrong with my code! But I'm not sure how to track it down. I wonder if there is something that I should be flushing, perhaps?
Any ideas very much appreciated!!
Thanks
Charlie

Aha! I've discovered my problem (see previous post). Don't do this...
public void doPost(HttpServletRequest aRequest,
HttpServletResponse aResponse)
PrintWriter lOutStream=aResponse.getWriter();
aResponse.sendRedirect(some URL);
It'll work most of the time, but if you get a request with about 1Kb of data, and a network latency of about 40ms, it'll confuse IE6.0 by untidily closing the TCP connection. Obviously.
The answer, of course, is only to call getWriter if you're genuinely intending to write to it (in which case, you won't be allowed to call sendRedirect).
I'll try and raise a bug somewhere.
Charlie

Similar Messages

  • JSP+RMI = socket leak (with tomcat 5)

    Tried this in the RMI forum, no answer, so let's try here...
    When I use RMI from a JSP servlet, I have a "socket leak" problem. When I create an RMI unicast remote object, the RMI library (of course) opens up a server/listening socket. In a normal application, I can unbind the remote object, but then the next object I create will re-use the same server socket, so the server socket never closes, but only one is ever created, so it's not a big deal.
    Now for the problem: When I use the Tomcat manager to unload my webapp, the socket is still there. Sure, fine. But then when I reload the webapp, instead of re-using the same server socket, a new one is created! Furthermore, if I try to use explicit port numbers to force the server socket to be reused, I get "port already in use" errors. It seems that somehow tomcat won't let RMI recycle its entry points in between webapp restarts. Does anybody know how I can either:
    a) Get RMI to re-use the same ports
    b) Get RMI to completely shut down its ports when the webapp is unloaded (this would be even better)
    Thanks. It's irritating to see 10 open but unused server sockets on my system if I have to restart the webapp.

    Ah, I left out something: I construct the RMI object a servlet context listener in the contextInitialized() call, and I call UnicastRemoteObject.unexportObject() in the contextDestroyed() call. I added log messages, I am definitely correctly unbinding the object. The problem isn't that it is failing to be unbound - the problem is that the RMI system is refusing to reuse the same port after it is unbound. After unbinding, the port is still open, but it is never reused, each time I re-instantiate the remote object, it is making a new server socket and leaving the old one sitting open.
    As for why I'm doing this, it is a bit like a homegrown EJB, but just so small that this was the simplest way. I have a largish non-web based application, then I have a few JSP pages that do database queries to provide information to browsers. The JSP pages are not at all central to the application though, and just show some database info. The JSP system caches some SQL data, and I use RMI to tell JSP when to flush cached data due to database changes. It's all very simple, and it works fantastic, except for the issue that every time I reload the webapp I leave these server sockets hanging open. Even that is just an irritation, I don't reload much except when I'm testing, but it's a big enough irritation that I would really like to fix it.

  • Socket disconnection event not being reveived java.nio

    Hi All
    My question is as below
    i am using java.nio package + win 2K + jdk1.4.1_02
    I have a Server accepting socket connection and is configured
    in Nonblocking mode.
    -The server receives (selector) events (accept event)
    when a client requests for a connection .
    -The server is getting read and write events when
    client wants to read and write
    -The server gets a read event when the client disconnects
    My only problem is that the Server is not getting any events
    when the client disconnect due to network break down
    for EX when the network connection breaks the client disconnects
    but the server selector is not getting any events
    I am storing the client Socket objects in a Hash Table and
    if i execute the .isConnected() method it returns true
    even though the the client is down
    The only work around is to try to read and write on the socket
    i get an IO exception and am able to make out that the
    client is disconnected
    But this is not desirable for my client
    as client modification to give any kind of echo is not possible and
    a read /write event will cause problem.
    Can any one tell how to detect client side disconnection
    with out Read and Write on the client socket
    I get an socket Exception when the socket is in Blocking IO and is blocked on read/ write but I am facing this problem in NonBlockingIO
    Regards
    Avinash

    int ct = read.selectNow();
    if (ct > 0)
    Set readyKeys = read.selectedKeys();
    Iterator i = readyKeys.iterator();
    while (i.hasNext())
    SelectionKey key = (SelectionKey) i.next();
    i.remove();
    if (key.isReadable())
    SelectableChannel nextReady = (SelectableChannel) key.channel();
    SocketChannel sc = (SocketChannel) key.channel();
    int rd = sc.read(buffer);
    // Link is dead
    if (rd == -1)
    key.cancel();
    key.attach(null);
    nextReady.close();
    continue;
    // Process your data
    catch (Exception e)
    e.printStackTrace();

  • Problem with Tomcat 6

    Hi guys,
    I am with a very strange problem with my job here.
    We had a server working with Tomcat 5 and it didn't have problem, but wanted to changed to Tomcat 6.
    So.. we changed and it ran normal and well.
    The problem is when we stress the server with one or more big queries, execptions is showed that didn't show with Tomcat 5:
    java.lang.Exception: [Microsoft][SQLServer 2000 Driver for JDBC]Object has been closed
    Using SQL Server 2000
    java.lang.Exception: The connection is closed.
    Using SQL Server 2005
    java.lang.Exception: I/O Error: socket closed.
    Using SQL Server 2005 with jTDS driver
    It happens with Oracle too.
    Can anybody help me?
    Thanks!

    hi i'm having a similar problem launching a servlet in eclipse. I did the above changes and still nothing:
    instead i keep getting :
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class DataServlet or a class it depends on

  • HTTP2302 error  with tomcat and linux environment

    We are using Sun Java(TM) System Web Server 7.0 with Tomcat 6.0.14 in Linux environment. We are frequently facing "Service Unavailable error" in the frontend . while verifying the logs we found the details as below :
    could you guinde what could be issue here ?
    In Webserver log the following error thrown many times
    func_exec reports: HTTP2302: Function jk_service aborted the request without setting the status code
    We are using the tomcat connector nsapi_redirector-1.2.26-sjsws6.1sp11.so in our environment
    nsapi.log
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] jk_open_socket::jk_connect.c (448): socket TCP_NODELAY set to On
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] jk_open_socket::jk_connect.c (548): trying to connect socket 30 to 160.254.92.190:8051
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [info] jk_open_socket::jk_connect.c (566): connect to 160.254.92.190:8051 failed (errno=111)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [info] ajp_connect_to_endpoint::jk_ajp_common.c (869): Failed opening socket to (160.254.92.190:8051) (errno=111)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [error] ajp_send_request::jk_ajp_common.c (1359): (ajp13) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [info] ajp_service::jk_ajp_common.c (2186): (ajp13) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [error] ajp_service::jk_ajp_common.c (2204): (ajp13) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [error] jk_service::jk_nsapi_plugin.c (398): service() failed with http error 503
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] ajp_reset_endpoint::jk_ajp_common.c (691): (ajp13) resetting endpoint with sd = 4294967295 (socket shutdown)
    [Thu Nov 19 06:22:11.602 2009] [20843:4074314640] [debug] ajp_done::jk_ajp_common.c (2522): recycling connection pool slot=0 for worker ajp13
    h1. Obj.conf
    <Object name="default">
    AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
    <If $uri =~ '^/$'>
    NameTrans fn="redirect" from="/" url="http://wikitest.pershing.com/confluence/" code="301"
    </If>
    NameTrans fn="assign-name" from="/confluence/*" name="servlet"
    PathCheck fn="uri-clean"
    PathCheck fn="check-acl" acl="default"
    PathCheck fn="find-pathinfo"
    PathCheck fn="find-index" index-names="index.html,home.html,index.jsp"
    ObjectType fn="type-by-extension"
    ObjectType fn="force-type" type="text/plain"
    Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file"
    Service method="TRACE" fn="service-trace"
    AddLog fn="flex-log"
    </Object>
    <Object name="j2ee">
    Service fn="service-j2ee" method="*"
    </Object>
    <Object name="es-internal">
    PathCheck fn="check-acl" acl="es-internal"
    </Object>
    <Object name="cgi">
    ObjectType fn="force-type" type="magnus-internal/cgi"
    Service fn="send-cgi"
    </Object>
    <Object name="send-precompressed">
    PathCheck fn="find-compressed"
    </Object>
    <Object name="compress-on-demand">
    Output fn="insert-filter" filter="http-compression"
    </Object>
    <Object name="servlet">
    ObjectType fn="force-type" type="text/html"
    Service fn="jk_service" worker="ajp13"
    </Object>

    Hi, The reason tomcat had to be used is that the software is bundled with tomcat. Hence we are in the following configuration:
    -Sun Web Server 7.0 update 5
    -Tomcat 6, Using JRE1.6
    -The server runs Linux.
    -As for the tomcat web server plugin, the 32-bit tomcat connector is downloaded from http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/solaris/jk-1.2.26/sparc/
    With this configuration. seems when we refresh a page quickly, we get "service unavailable error". But if we only put web contents, the issue does not exist. Looks like the issue resides in the plugin....
    Any help is greatly appreciated

  • I have a 1TB WD external hard disk, which suddenly cannot be detected in my system. When i connect the hardisk to the macbook, the disk appears and immediately disconnects with the message "Disk not properly ejected". Any advice ?

    I have a 1TB WD external hard disk, which suddenly cannot be detected in my system. When i connect the hardisk to the macbook, the disk appears and immediately disconnects with the message "Disk not properly ejected". Any advice ?

    verify on another Mac if the same
    WD is having issues with mavericks as you can see on the WD forum, did you install any WD software (never do that) when you connected the drive for the first time?
    possible issue is a dead SATA bridge card or the new WD firmware w/ Mavericks.
    SATA card issue
    Your dead external hard drive is likely fine! Great hope for your 'faulty' external HD
    http://community.wd.com/t5/External-Drives-for-Mac/bd-p/passport_mac
    verify on another Mac if all possible

  • CVP 7.0.2 Abnormally disconnected with error code 38

    Hi all,
    We have an issue where when called from outbound, it is not possible to reach a certain number. It doesn't even play the dial tone. isdn debug is as follows :
    Feb 15 17:51:01.830: ISDN Se0/2/0:15 Q931: TX -> RELEASE pd = 8  callref = 0xE97B
    Feb 15 17:51:01.846: ISDN Se0/2/0:15 Q931: RX <- RELEASE_COMP pd = 8  callref = 0x697B
    Feb 15 17:51:05.050: ISDN Se0/2/0:15 Q931: RX <- SETUP pd = 8  callref = 0x697D
            Sending Complete
            Bearer Capability i = 0x8090A3
                    Standard = CCITT
                    Transfer Capability = Speech 
                    Transfer Mode = Circuit
                    Transfer Rate = 64 kbit/s
            Channel ID i = 0xA98385
                    Exclusive, Channel 5
            Progress Ind i = 0x8083 - Origination address is non-ISDN 
            Progress Ind i = 0x8A81 - Call not end-to-end ISDN, may have in-band info 
            Calling Party Number i = 0x0081, '02124783464'
                    Plan:Unknown, Type:Unknown
            Called Party Number i = 0xC1, '2751920'
                    Plan:ISDN, Type:Subscriber(local)
    Feb 15 17:51:05.062: ISDN Se0/2/0:15 Q931: TX -> CALL_PROC pd = 8  callref = 0xE97D
            Channel ID i = 0xA98385
                    Exclusive, Channel 5
    Feb 15 17:51:05.066: %HTTPC-6-REQUEST_FAILED: request URI http://ipphone.fw.garanti.com.tr/ipphone/musteribilgiler?source=TLC&call_data=002124783464-800321200 failed
    Feb 15 17:51:05.066: %IVR-3-APP_ERR: Musteri bilgileri serverdan alinamadi - Hata Kodu: error
    Feb 15 17:51:05.210: %HTTPC-6-REQUEST_FAILED: request URI http://10.231.51.141:8000/cvp/VBServlet?MSG_TYPE=PING&CALL_DNIS=2403519900&CALL_ANI=sip:[email protected]:5060&ERROR_CODE=0&RECOVERY_VXML=flash:recovery.vxml&CLIENT_TYPE=IOS&CALL_ID=DE8929A61000013C1771025A0AE7338D&SIP_CALL_ID=[email protected]&CALL_UUI=&VERSION=7.0.2 failed
    Feb 15 17:51:05.226: %HTTPC-6-REQUEST_FAILED: request URI http://10.231.51.141:8000/cvp/VBServlet?MSG_TYPE=PING&CALL_DNIS=2403519900&CALL_ANI=sip:[email protected]:5060&ERROR_CODE=0&RECOVERY_VXML=flash:recovery.vxml&CLIENT_TYPE=IOS&CALL_ID=DE8929A61000013C1771025A0AE7338D&SIP_CALL_ID=[email protected]&CALL_UUI=&VERSION=7.0.2 failed
    Feb 15 17:51:05.230: %HTTPC-6-REQUEST_FAILED: request URI http://10.231.51.141:8000/cvp/VBServlet?MSG_TYPE=PING&CALL_DNIS=2403519900&CALL_ANI=sip:[email protected]:5060&ERROR_CODE=0&RECOVERY_VXML=flash:recovery.vxml&CLIENT_TYPE=IOS&CALL_ID=DE8929A61000013C1771025A0AE7338D&SIP_CALL_ID=[email protected]&CALL_UUI=&VERSION=7.0.2 failed
    Feb 15 17:51:05.238: %HTTPC-6-REQUEST_FAILED: request URI http://10.231.51.141:8000/cvp/VBServlet?MSG_TYPE=PING&CALL_DNIS=2403519900&CALL_ANI=sip:[email protected]:5060&ERROR_CODE=0&RECOVERY_VXML=flash:recovery.vxml&CLIENT_TYPE=IOS&CALL_ID=DE8929A61000013C1771025A0AE7338D&SIP_CALL_ID=[email protected]&CALL_UUI=&VERSION=7.0.2 failed
    Feb 15 17:51:05.246: %IVR-3-APP_ERR:
    **** CVP HANDOFF.TCL: 57080581.76BE11E2.A32B001B.D5293620 abnormally disconnected with code 38. ****
    Feb 15 17:51:05.258: ISDN Se0/2/0:15 Q931: TX -> CONNECT pd = 8  callref = 0xE97D
    Feb 15 17:51:05.290: ISDN Se0/2/0:15 Q931: RX <- CONNECT_ACK pd = 8  callref = 0x697D
    Feb 15 17:51:05.294: %ISDN-6-CONNECT: Interface Serial0/2/0:4 is now connected to 02124783464 N/A
    Feb 15 17:51:07.274: %IVR-3-APP_ERR:  ani: 002124783464 dnis: 800321200 | ev_setup_done ls_000 | ev_disconnected di_016 |
    Feb 15 17:51:07.298: %ISDN-6-CONNECT: Interface Serial0/2/0:4 is now connected to 02124783464 N/A
    Feb 15 17:51:07.298: %ISDN-6-DISCONNECT: Interface Serial0/2/0:4  disconnected from 02124783464 , call lasted 2 seconds
    Feb 15 17:51:07.302: ISDN Se0/2/0:15 Q931: TX -> DISCONNECT pd = 8  callref = 0xE97D
            Cause i = 0x8090 - Normal call clearing
    Feb 15 17:51:07.362: ISDN Se0/2/0:15 Q931: RX <- RELEASE pd = 8  callref = 0x697D
    Feb 15 17:51:07.366: ISDN Se0/2/0:15 Q931: TX -> RELEASE_COMP pd = 8  callref = 0xE97D
    Feb 15 17:51:08.702: ISDN Se0/2/0:15 Q931: RX <- SETUP pd = 8  callref = 0x697E
            Sending Complete
            Bearer Capability i = 0x8090A3
                    Standard = CCITT
                    Transfer Capability = Speech 
                    Transfer Mode = Circuit
                    Transfer Rate = 64 kbit/s
            Channel ID i = 0xA98391
                    Exclusive, Channel 17
            Calling Party Number i = 0x0083, '05336805920'
                    Plan:Unknown, Type:Unknown
            Called Party Number i = 0xC1, '2751935'
                    Plan:ISDN, Type:Subscriber(local)
    Feb 15 17:51:08.714: ISDN Se0/2/0:15 Q931: TX -> CALL_PROC pd = 8  callref = 0xE97E
            Channel ID i = 0xA98391
                    Exclusive, Channel 17
    Feb 15 17:51:08.718: %HTTPC-6-REQUEST_FAILED: request URI http://ipphone.fw.garanti.com.tr/ipphone/musteribilgiler?source=TLC&call_data=005336805920-800321925 failed
    Feb 15 17:51:08.718: %IVR-3-APP_ERR: Musteri bilgileri serverdan alinamadi - Hata Kodu: error
    Feb 15 17:51:08.798: ISDN Se0/2/0:15 Q931: TX -> ALERTING pd = 8  callref = 0xE97E

    Dear
    Code 38 Indicates that the network is not functioning correctly and that the condition is likely to last
    for an extended period.
    to me the GW is not able to make SIP connection and is likely due to incorrect
    IP Address is seen from the GW.I hope to share the configuration.  
    Thank you
    please rate , if this will help

  • Tomcat vs Apache with Tomcat connectors (mod/jk)

    Is there any advantage (security, performance etc.) of running a Java web application on Apache HTTP Server with Tomcat Connectors (mod/jk) rather than directly running it on Tomcat.

    This question is already answered, see here:
    http://tomcat.apache.org/faq/connectors.html
    Also for Tomcat/ Apache related questions, post them to the relevant mailing lists.

  • My ipod nano has come up with ok to disconnect with a tick and has frozen.  Can anyone tell me what I need to do please.

    Can anyone help with a screen that says ok to disconnect with a tick on the front?  The ipod has frozen and I can't do anything!

    Try a hard reset as described in this article.
    How to reset iPod
    B-rock

  • Problem with Tomcat 5.0

    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. This .java file has a "public static void main" method that calls al the other methods in the class.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?
    Thanks!!

    NerdVix wrote:
    Hi there,
    I have a .java file inside \WEB-INF\classes\ directory. Wrong. .java files do you no good in that directory. Only .class files belong there.
    This .java file has a "public static void main" method that calls al the other methods in the class.Fine - for testing on a command line.
    I want to know if its possible for me to create an JSP file to call this .java file. If so how can i do it?What part don't you understand? Writing JSPs? Calling methods? What is a person so ignorant doing with Tomcat anyway?
    It's possible to call main, but not a good idea.
    %

  • Compiling jsp with tomcat 4

    HTTP 500 server error as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    An error occurred at line: 2 in the jsp file: /listStore.jsp
    *line#2 is the usebean statement in the jsp...
    NOTE: new machine, new configuration... this same servelt/jsp/bean work great on another machine with tomcat 3...
    so this will have something to do with tomcat configuation... believe that the configuration is set to not compile with deprecation.. would like to know where to change that...

    I guess the problem comes from jdk 1.4 ...deprecation of sun.tools.javac.Main prevents compilation in jasper...

  • PDF with Tomcat/Cocoon Problem !!!

    Hi,
    I am having problem with Tomcat/Cocoon combination for APEX PDF printing which I installed following Carl Backstrom instructions.
    When a report is a region report it all works fine, but when I create a report based on a query from the reports section in Shared Components choosing report layout 'Use Generic Report Layout' I get the following error.
    javax.xml.transform.TransformerException: attribute-set named #TEXT_ALIGN# does not exist
    cocoon://fop_post/xsl - 148:58
    Cocoon stacktrace[hide]
    attribute-set named #TEXT_ALIGN# does not exist
    cocoon://fop_post/xsl - 148:58
    I will appreciate any feedback. I saw threads related to the same issue on this forum but they ended up covering something irrelevant.
    Regards,
    Vadim

    Vadim,
    Report queries and report region use the same generic report layout. However the processing is handled by different engines. The underlying technical problem with your case is that the substitution string #TEXT_ALIGN# is not substituted in all cases for report queries. This usually does not cause any problems, but appears not to work when using Cocoon.
    I'll see that we can this resolved with the next version of APEX, however when working with report layouts, you would typically use your own RTF or XSL-FO stylesheets, where this problem would not occur. The option to use the generic report layout is only included so the data can be tested independently from the layout and is not really intended to be used as the actual layout at runtime.
    The generic report layout function is mainly designed to be used for report regions.
    Regards,
    Marc

  • Old Oracle Session with Tomcat is not kiiling automatically

    Hi,
    I am facing a problem of increasing inactive oracle sessions with tomcat, Old Oracle sessions with tomcat are visible with new one.
    if somebaody did not restarted tomcat gracefully, then does Oracle keep the session connected or is there any way that whenever any one restarted tomcat abnormally, Oracle session can be killed.
    I had restart the database to kill session.

    Could you please tell me that where do i set this parameter in parameter file or sql net file and what is the recommended value, do you have any document on this.
    Another thing tomcat is in other server machine and my database is in different server machine, killing process in tomcat server machine manually may not kill linux process on oracle database machine and therefore oracle sessions are still there.
    Is it possible?
    Edited by: user605066 on 28-Aug-2008 04:59

  • JSP: work with TomCat 5.5.9 and NOT work with TomCat 6.0.16

    Hi all,
    I'm Antony and I have a problem with a .JSP page of my server.
    In my server there are 2 users: "u1" and "u2"; there are 2 TomCat, version 5.5.9 and version 6.0.16. There is Apache WebServer version 2. The 2 TomCat servers have the same configuration files: server.xml and web.xml (in the dir /conf of the main server's root). They not work simultaneously.
    When the user "root" launch the TomCat 5.5.9 all work fine: the server will show correctly the JSP pages of "u1" and the pages of "u2".
    When the user "root" launch the TomCat 6.0.16 the JSP pages of "u1" work fine but the JSP pages of "u2" not work: it seems that there are problems with the path where the server want to search the pages of u2.
    In the server.xml there is this code (for the handle of u2's site):
    <Host name="u2site.com" appBase="/home/u2/public_html/">
      <Alias>www.u2site.com</Alias>
      <Context path="" reloadable="false" docBase="/home/u2/public_html/" debug="0"/>
              <Context path="/manager" debug="0" privileged="true"
                  docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
              </Context>
    </Host>and this code (for the u1's site)
    <Host name="u1site.com" appBase="/home/u1/public_html/">
      <Context path="" reloadable="false" docBase="/home/u1/public_html" debug="1"/>
              <Context path="/manager" debug="0" privileged="true"
                  docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
              </Context>
    </Host>The problems with the JSP pages of u2 are one of the following:
    org.apache.jasper.JasperException: /login2.jsp(4,0) The value for the useBean class attribute com.u2.beans.access.Autenticator is invalid.and this one that appear with the pages that have the inclusion of another JSP page
    /u2page.jsp(3,0) File "/../support/_formatting.jsp" not foundI think that the TomCat know how to find the page that the browser request to Apache WebServer (and that the webserver request to Tomcat by the connector) 'cause for pages that haven't inclusion or call to method in packages all work fine...but the TomCat have problems to locate the pages included or the method located in a JAR (the jars are located in WEB-INF/lib/ of the u2's site).
    How I can resolve this problem with TomCat 6.0.16? I repeat that with TomCat 5.5.9 all work fine...same configuration!
    Any ideas?
    Thank you very much,
    Antony.

    Hi stevejluke, 'cause in the page "/supporto/_formatting.jsp" there are only the definition of some variables it's normal that the output at the browser it's a blank page.
    The problem it's that Tomcat 6.0.16 cannot know how "navigate" the pages beginning from one...it know where is the "x.jsp" page requested directly by Apache WebServer, where is "y.jsp" request directly by Apache, where is "z.jsp" requested directly by Apache but if "x.jsp" request, includes, "y.jsp" Tomcat cannot know where "y.jsp" is located. There is some file where I can "say" this to Tomcat?
    The page "/mostre/elenco_mostre.jsp" includes directly the "/supporto/_formatting.jsp".
    Another thing: in /mostre/elenco_mostre.jsp there is an inclusion directive for /supporto/_formatting.jsp that is so:
    <%@ include file="../supporto/_formatting.jsp"%>you can see that the included file is "../supporto/_formatting.jsp" and NOT "/../supporto/_formatting.jsp"...the "/" at the begin of the path is included by Tomcat!
    In the catalina.out there are this lines, when the page is called:
    Jul 6, 2008 3:15:00 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /elenco_mostre.jsp(3,0) File "/../supporto/_formatting.jsp" not found
      In catalina.out before server start there are this lines:
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '1' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
    Jul 6, 2008 1:43:49 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 358 ms
    Jul 6, 2008 1:43:49 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jul 6, 2008 1:43:49 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
    Jul 6, 2008 1:43:52 AM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/23  config=null
    Jul 6, 2008 1:43:52 AM org.apache.catalina.connector.MapperListener registerEngine
    WARNING: Unknown default host: localhost
    Jul 6, 2008 1:43:52 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2512 msThe file "web.xml" is located in "$Tomcat_home/conf" and it's:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>fork</param-name>
          <param-value>false</param-value>
        </init-param>
        <init-param>
          <param-name>xpoweredBy</param-name>
          <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jspx</url-pattern>
      </servlet-mapping>
      <session-config>
        <session-timeout>30</session-timeout>
      </session-config>
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    </web-app>there are not web.xml file in /WEB-INF/ of the web application.
    Maybe the problem it's that Tomcat want the conf file in "Server/Service/Engine/Host/Context" ? I must move the block HOST of the server.xml file in this path?
    Good Sunday and thank you!
    Antony.

  • Using Java Logging with Tomcat

    Hi in a previous non Tomcat project I wrote some classes that used the java.util.logging library that comes with java 1.4 quite successfully. I am now trying to use the same classes with Tomcat 5.0 but it doesnt like it. With the logging classes you can provide a configuration class which you define with a property "java.util.logging.config.class", I put the class in my WEB_INF\classes with all the other classes.
    When I run with Tomcat i have a servlet that does the following to try and initilse the logging
    com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
    System.getProperties().setProperty("java.util.logging.config.class", "com.appserver.util.logging.LogProperties");
    LogManager.getLogManager().readConfiguration();
    it complains it cant find the class, when running readConfiguration(), (The 1st two lines run ok). I think the problem is to do with Tomcat classloader, with a simple Java application the classes would be expected to be on the system classpath, but on Tomcat the system classpath only contains bootstrap.jar.
    I realise I could probably get things working using Apaches log4j instead but it seems a bit silly to use that when there is a perfectly adequate logger built into the language now.
    Anyone done this ?

    OK
    Ive changed my code from
    com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
    System.getProperties().setProperty("java.util.logging.config.class", "com.appserver.util.logging.LogProperties");
    LogManager.getLogManager().readConfiguration();to
    com.appserver.util.logging.LogProperties.setLevelFromParametersFromPrefs();
    LogManager.getLogManager().readConfiguration(com.appserver.util.logging.LogProperties.getPropertiesAsStream());Now I dont get any errors and only messages for the LEVEL is set to the value I specify in my LogProperties class are displayed. However I also specify a Formatter to use for console output but Tomcat just seems to ignore it and uses its own default formatter. Any ideas...please !

Maybe you are looking for

  • I can't get firefox page to come up unless I do it in safe mode what is wrong?

    I HAVE A MICROSOFT KEYBOARD WITH A KEY WEB/HOME THAT I HAVE SETUP FOR FIREFOX AS THE DEFAULT BROWSER WHEN I PRESS THE KEY. I HAVE TWO USERS ON THIS COMPUTER, BOTH OF US HAVE FIREFOX AS THE DEFAULT BROWSER WHEN THEY PRESS THE KEY ON THEIR SIDE, FIREFO

  • Getting AIM on my Touch

    Is there currently anyway that I can send and recieve instant messages from my iTouch using AIM?

  • New iPhone, no computer backup but iCloud

    I just got a new iphone and didn't have a computer back up, it was synced to icloud.  Now I can't get my data off iCloud because it is a synced device.  What do I do to get my stuff back?

  • Complex string value

    Hello, I need to send a command to a piece of equipment where the command is in the form of a string. The command is something like this: VBS 'app.Acquisition.Trigger.Serial.I2C.AddressValue="​00111110"' Notice the double quotes around the value and

  • Cannot get the latest version of Adobe Muse to update and install

    When I open Adobe Muse it asks me if I'd like to update it, I say yes to the install. It then transfers me to the Adobe Application Manager where it says that there are not updates and that I have the latest version already? I know that this is not t