Debugging Web Client Applications

Is there a way in IntelliJ to proxy calls to rest services to a different web context than the war file containing the actual html and js? The war file containing our html and js code is named 'webui'. However, the REST calls made from within the java script code are in a separate war file called 'managers'. So, when I launch the browser from within IntelliJ (by clicking the appropriate browser icon in the upper right of the html page), my browser opens appropriately pointing to my index.html. However, any backend call displays a 404 since it tries to use the same context to call the REST call. Here is the error I see:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:63342/managers/PlatformConfiguration/security/authenticate

The problem is that IntelliJ expects every server call to be made within the same war context. I would like to be able to proxy these calls to the backend server. The only way we get this to work right now is to use 'grunt serve' to proxy the calls. This means we are stuck using the debugger inside the browser, which is less than optimal.

Rick

Please sign in to leave a comment.