Replace JSP with Thymeleaf in Legacy Application - spring

My company wants to level up by deploying our web-application as spring boot executable jar:
Specifications (Legacy Webpap):
classic web app (25 years old) but now with Spring
Over 100 jsp files
And more jsp files generated by our custom jsp generator
Custom jsp tag lib with more than 30 java classes
All jsp files are html 4 files with Active X components.
Problem
One of the main problems is that jsp rendition is not supported in executable jars. Therefore I consider using Thymeleaf. My best guess is to replace the rendition process in our custom jsp generator. In the future (don't know when that is) we plan to migrate to a single page web app but for now I need to run the web app as jar and with our existing templates and tag library.
Draft
My Question
Is it possible to use Thymeleaf along with our custom tag library?

Related

How to implement Vue.js applications with Spring MVC or other server-sided frameworks?

I've already read the official Vue.js documentation about building app. What I understood is, by using vue-cli, *.vue files are built (or compiled ?) into a javascript file which is injected in index.html file.
What if I don't have any index.html ? In my current application, html documents are built at runtime from jsp template files, how can I have Vue inject js and 'asset' built files into a chosen jsp template ?
Plus, node server should be used in development mod, is this mandatory ?
I would copy the generated javascript file and put it in the public/static folder. Then on the jsps that would use it, just add a script tag that would point to it and the empty div#app.

Spring-boot folder structure

I'm starting writing a Spring/boot Angular 4 application and I have a small question. In the Angular 4 app we create a folder called LocalEvent (or something) which houses the module, controller, service, html template and css file. How would I create a structure for Spring?
I've seen Spring folder examples where everything is divided into /services /controllers. I understand that Java uses packages, so having 10 folders would mean having 10 packages which could get confusing fast. But I would like to hear from a few more experienced developers how they set up their Spring structure.
There is no Spring Boot structure as far as I know. The service and controller packages structure are the way how Java programmers architect their applications following the popular MVC pattern. Next, there is a Maven standard project structure where other Java or JVM based languages build tools follow

Can we run Java code review rules on scriptlets in jsp pages?

We have implemented automated code review in our project using SonarQube. We have some legacy application where all the coding was done on JSP pages. We will eventually migrate them to MVC design using Spring, but for now we have to do a code review for the existing java code inside JSP pages.
My question is: can we run Java rules on JSP files? If yes, how do we start with that?
No, you cannot analyze Java code inside JSP files.

Multiple development environments for one project in IntellijIDEA

I am developing large web project, using IntellijIDEA (11.1.3).
I would like to have some environment, where I will be working under HTML templates. I won't use any server-side programming there, just HTML markup, CSS style sheets and JavaScript.
As well, I need different environment, where I will create dynamic application, using not only markup, style sheets and client-side programming, but also Maven, Spring MVC, Hibernate, PostgreSQL and, probably, other technologies.
I will use Tomcat to deploy both my template and my final application into container to view it in browser.
The question is how to structure my project?
That would be absolutely great if someone could show me step-by-step instructions of creating sample project, but any advises are appreciated.
IntelliJ IDEA 11 has a special Web module type for the plain HTML/JS projects, create one module of this type and another Java module for the rest of the technologies.

Pluggable pages in a Spring MVC application

I'm developing a Spring application which needs to support pluggable modules - add the JAR to the classpath and it will automatically find and load the module's Spring application context XML. This part is already working.
The problem right now is figuring out a way for the modules to provide custom JSP pages. Each module will require a configuration page, which contains form fields specific to that module.
How can I use Spring MVC to implement such pluggable pages? It should work something like so, that the module's JAR file contains the configuration page (as JSP) and its Spring MVC controller, which the surrounding application will then include into the rest of the application (maybe as a JSP fragment inside the application's page template).
If this cannot be done with Spring MVC and JSP, then what would be a good alternative?
Try adding a ResourceBundleViewResolver config to each pluggable module (not sure if having multiple resolvers will work or not, but it allows you to define views via the classpath, not specific locations. See http://static.springsource.org/spring/docs/current/reference/view.html.
If having multiple resolvers in your modules don't work, then try ResourceBundleViewResolver in the main app config, and then have all pluggable modules follow the same view location setup internally to the JARs.

Resources