SPA with JDeveloper and WebLogic by Anirban Mukherjee


This article steps out the key requirements of deploying a single-page-application on WebLogic server. Essentially, there are just three important gotchas in this process, which I will lay out in detail. The SPA, in this use-case, is an Angular 8 application. I have put the source code as part of the JDev application. I have customised the build process of the Angular application to generate the artifacts inside the public_html folder of the RESTWebService project. You may go with the usual build directory and then manually copy the generated files into the public_html folder.
Gotcha # 1:
The SPA should be built with the html file having a base-href property same as the context-root of the JDev application.

Gotcha # 2:
If you are using routing in your Angular application (you will obviously), then you will usually keep a component to display in case there is no route match (the wildcard ** path). In this case, the Angular routing handles the 404 page-not-found and redirects you to the appropriate component.
But in our case, our application is served by WebLogic, which sends its own 404 error page. To bypass this behaviour, we need to set our index.html page itself as the error page in web.xml, so that the 404 error is handled by Angular, and not by WebLogic. Read the complete article here.

Developer Partner Community

For regular information become a member in the Developer Partner Community please register here.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.