I am getting a StatusCodeException. May I am a bit more specific: I
have to check concurrency problems. In case of a concurrency the GUI
has to show a user dialog. The StatusCodeException just give me the
ErrorCode 500 (Internal Server Error) but this is to unspecific. This
error code can occour in other cases as well so that I need another
identifier.

The original exception is capsulated in the message body of the
StatusCodeException with HTML tags. A dirty solution would be to make
a String RegEx and search for a pattern which identify the concurreny
exception in the exception message. But there must be a more elegant
way of doing this?!

So how can I do this better without an RegEx or string search?

This would be the message of the StatusCodeException:

<html>
<head>
<title>JBossWeb/2.0.1.GA - Error report</title>
<style>
  <!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-
serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-
family:Tahoma,Arial,sans-serif;color:white;background-
color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-
serif;color:black;background-color:white;} B {font-
family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P {font-family:Tahoma,Arial,sans-
serif;background:white;color:black;font-size:12px;}A {color : black;}
A.name {color : black;}HR {color : #525D76;}-->
</style>
</head>
<body>
  <h1>HTTP Status 500 - </h1>
  <HR size="1" noshade="noshade">
  <p><b>type</b> Exception report</p>
  <p>
    <b>message</b>
    <u></u>
  </p>
  <p>
    <b>description</b>
    <u>The server encountered an internal error () that prevented it
from fulfilling this request.</u>
  </p>
  <p>
    <b>exception</b>
    <pre>javax.servlet.ServletException: !!!ConcurrencyException!!!
com.kapdion.mdm.server.servlets.filter.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:
47)
com.kapdion.mdm.server.servlets.filter.ServletFilter.doFilter(ServletFilter.java:
53)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
96) </pre>
  </p>
  <p>
    <b>note</b>
    <u>The full stack trace of the root cause is available in the
JBossWeb/2.0.1.GA logs.</u>
  </p>
  <HR size="1" noshade="noshade">
  <h3>JBossWeb/2.0.1.GA</h3>
</body>
</html>

On 17 Feb., 12:32, Thomas Broyer <[email protected]> wrote:
> In that case, aren't you getting a StatusCodeException? You can then look at
> the getStatusCode (e.g. if 401 => sign the user in) and the
> getEncodedResponse (you can then include some "magic number", or JSON, etc.
> in your response; instead of using the default servlet error pages)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to