xml-xindice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kimbro Staken <ksta...@xmldatabases.org>
Subject Re: IllegalStateException
Date Mon, 11 Mar 2002 22:33:32 GMT
This is in, as is your patch for the HTTP server. Thanks

On Friday, March 8, 2002, at 10:11 PM, Mike Gratton wrote:

>
> Here's the more complete patch. Could someone please review, commit, 
> lather, rinse, repeat. 8)
>
> Mike.
>
> -- Mike Gratton <mike@vee.net>, <http://web.vee.net/>
> "Every motive escalate."
> ? java/examples/Addressbook/Addressbook.war
> ? java/examples/Addressbook/deploy
> Index: java/examples/Addressbook/src/java/addressbook/AddContact.java
> ===================================================================
> RCS file: /home/cvspublic/xml-xindice/java/examples/Addressbook/src/java/
> addressbook/AddContact.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 AddContact.java
> --- java/examples/Addressbook/src/java/addressbook/AddContact.java	6 Dec 
> 2001 19:33:52 -0000	1.1.1.1
> +++ java/examples/Addressbook/src/java/addressbook/AddContact.java	9 Mar 
> 2002 05:08:09 -0000
> @@ -103,6 +103,12 @@
>           col.storeResource(resource);
>
>        } catch ( Exception e) {
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return true;
> +
>           // Catch the exception and send the user to the error page
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
> @@ -110,7 +116,6 @@
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -         e.printStackTrace();
>        }
>
>        return true;
> Index: java/examples/Addressbook/src/java/addressbook/DBConnection.java
> ===================================================================
> RCS file: /home/cvspublic/xml-xindice/java/examples/Addressbook/src/java/
> addressbook/DBConnection.java,v
> retrieving revision 1.2
> diff -u -r1.2 DBConnection.java
> --- java/examples/Addressbook/src/java/addressbook/DBConnection.java	29 Jan 
> 2002 08:15:20 -0000	1.2
> +++ java/examples/Addressbook/src/java/addressbook/DBConnection.java	9 Mar 
> 2002 05:08:09 -0000
> @@ -96,7 +96,12 @@
>           }
>
>        } catch ( Exception e) {
> -
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return collection;
> +
>           // Catch the exception and send the user to the error page
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
> @@ -104,7 +109,6 @@
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -         e.printStackTrace();
>        }
>
>        return collection;
> Index: java/examples/Addressbook/src/java/addressbook/DeleteContact.java
> ===================================================================
> RCS file: /home/cvspublic/xml-xindice/java/examples/Addressbook/src/java/
> addressbook/DeleteContact.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 DeleteContact.java
> --- java/examples/Addressbook/src/java/addressbook/DeleteContact.java	6 Dec 
> 2001 19:33:52 -0000	1.1.1.1
> +++ java/examples/Addressbook/src/java/addressbook/DeleteContact.java	9 Mar 
> 2002 05:08:09 -0000
> @@ -98,6 +98,12 @@
>           col.removeResource(col.getResource(dockey) );
>
>        } catch (Exception e) {
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return true;
> +
>           // Catch the exception and send the user to the error page
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
> @@ -105,7 +111,6 @@
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -         e.printStackTrace();
>        }
>
>        return true;
> Index: java/examples/Addressbook/src/java/addressbook/EditContact.java
> ===================================================================
> RCS file: /home/cvspublic/xml-xindice/java/examples/Addressbook/src/java/
> addressbook/EditContact.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 EditContact.java
> --- java/examples/Addressbook/src/java/addressbook/EditContact.java	6 Dec 
> 2001 19:33:52 -0000	1.1.1.1
> +++ java/examples/Addressbook/src/java/addressbook/EditContact.java	9 Mar 
> 2002 05:08:09 -0000
> @@ -110,6 +110,12 @@
>           col.storeResource(resource);
>
>        } catch ( Exception e) {
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return true;
> +
>           // Catch the exception and send the user to the error page
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
> @@ -117,8 +123,6 @@
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -
> -         e.printStackTrace();
>        }
>
>        return true;
> Index: java/examples/Addressbook/src/java/addressbook/ListContacts.java
> ===================================================================
> RCS file: /home/cvspublic/xml-xindice/java/examples/Addressbook/src/java/
> addressbook/ListContacts.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 ListContacts.java
> --- java/examples/Addressbook/src/java/addressbook/ListContacts.java	6 Dec 
> 2001 19:33:52 -0000	1.1.1.1
> +++ java/examples/Addressbook/src/java/addressbook/ListContacts.java	9 Mar 
> 2002 05:08:09 -0000
> @@ -101,6 +101,12 @@
>           group.addResults(results);
>
>        } catch (Exception e) {
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return true;
> +
>           // Catch the exception and send the user to the error page
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
> @@ -108,7 +114,6 @@
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -         e.printStackTrace();
>        }
>
>        return true;
> Index: java/examples/Addressbook/src/java/addressbook/SearchContacts.java
> ===================================================================
> RCS file: /home/cvspublic/xml-xindice/java/examples/Addressbook/src/java/
> addressbook/SearchContacts.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 SearchContacts.java
> --- java/examples/Addressbook/src/java/addressbook/SearchContacts.java	6 
> Dec 2001 19:33:52 -0000	1.1.1.1
> +++ java/examples/Addressbook/src/java/addressbook/SearchContacts.java	9 
> Mar 2002 05:08:09 -0000
> @@ -122,6 +122,12 @@
>           group.addResults(results);
>
>        } catch(Exception e) {
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return true;
> +
>           // Catch the exception and send the user to the error page
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
> @@ -129,7 +135,6 @@
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -         e.printStackTrace();
>        }
>
>        return true;
> @@ -165,6 +170,12 @@
>           group.addResults(results);
>
>        } catch(Exception e) {
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return true;
> +
>           // Catch the exception and send the user to the error page
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
> @@ -172,7 +183,6 @@
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -         e.printStackTrace();
>        }
>
>        return true;
> Index: java/examples/Addressbook/src/java/addressbook/Task.java
> ===================================================================
> RCS file: /home/cvspublic/xml-xindice/java/examples/Addressbook/src/java/
> addressbook/Task.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 Task.java
> --- java/examples/Addressbook/src/java/addressbook/Task.java	6 Dec 2001 19:
> 33:52 -0000	1.1.1.1
> +++ java/examples/Addressbook/src/java/addressbook/Task.java	9 Mar 2002 05:
> 08:09 -0000
> @@ -173,15 +173,19 @@
>           }
>
>        } catch( Exception e ) {
> -         // Catch the exception and send the user to the error page
> +         e.printStackTrace();
> +
> +	  // there's not much else we can do if the response is committed
> +	  if (response.isCommitted())
> +	     return;
> +
> +         // Catch the exception and send the user to the error page	
>           if (e.getMessage() != null ) {
>              response.sendRedirect("/Addressbook/error.jsp?error=" + 
> URLEncoder.encode(e.getMessage()) );
>           }
>           else {
>              response.sendRedirect("/Addressbook/error.jsp" );
>           }
> -
> -         e.printStackTrace();
>        }
>     }
>
>
Kimbro Staken - http://www.kstaken.org - http://www.xmldatabases.org
Apache Xindice native XML database http://xml.apache.org/xindice
XML:DB Initiative http://www.xmldb.org
Senior Technologist (Your company name here)


Mime
View raw message