Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7914763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:13:26+00:00 2026-06-03T14:13:26+00:00

There is documentation for DWR exception handling for Client side: http://directwebremoting.org/dwr/documentation/browser/errors.html But I’m looking

  • 0

There is documentation for DWR exception handling for Client side:

http://directwebremoting.org/dwr/documentation/browser/errors.html

But I’m looking for documentation for DWR Server side Exception handling. Basically the problem that I’m running into is: verbose errors(stacktrace) is returned to the client side, exposing web application details. Need to ensure no stacktrace is returned to the client.

DWR Version: 3.0

Any pointers on server-side exception handling for DWR? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:13:28+00:00Added an answer on June 3, 2026 at 2:13 pm

    In that case I would wrap the exception with a try/catch block.
    The question is: Where should you do that?

    Well, DWR has a Filter mechanism which is much like filters in Java Servlet API.

    You could write something like this:

    public class ExceptionFilter implements org.directwebremoting.AjaxFilter {
      public Object doFilter(Object obj, Method method, Object[] params, AjaxFilterChain chain) throws Exception {
        Object res;
        try{
          res = chain.doFilter(obj, method, params);
        } catch(Exception e){
          // throw your Exception with no "extra" data
          throw new RuntimeException();
        }
        return res;
      }
    }
    

    You may need to do some configuration in the dwr.xml file (which I leave to your reading: http://directwebremoting.org/dwr/documentation/server/configuration/dwrxml/filters.html)

    (edit 1)
    Some more explanation:

    What this does is intercept the DWR remote call and forward the call on to the execution chain. What I added to that call (chain.doFilter) is a try/catch block; In case your code should throw any exception, it will end up in the catch block and then its up to you what to do next.

    I hope this will help you :]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's documentation to build the android source code base. But it's hard to find
There is documentation for test users in the Facebook Developer online documentation but how
Is there any documentation for configuring Bitronix Transaction Manager (BTM) in Tomcat 7? Is
Is there a documentation system which is simple, will generate some friendly, hyperlinked documentation,
Is there official documentation on the Python website somewhere, on how to install and
According to the documentation : There is no way to block signals temporarily from
In the pickle module documentation there is a snippet of example code: reader =
I've trawled the web and according to the documentation there doesn't appear to be
There is little documentation on how to use the low level api for datastore
Is there any good documentation on implementing new refactorings in Eclipse? Specifically, I'd like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.