Upgrade Struts Code to latest version 2.5.20 working on Tomcat not at Weblogic12c - struts2

Description:
I have an application which is implemented in latest version of Struts 2.5.20 with tiles implementation, While deploying WAR file on weblogic12c Server it cause error.
scenario:
I have maven project, create WAR file and deploy on tomcat server then all functionality working fine same WAR file I deployed on Weblogic12c server then it cause error.
I download the whole sample example from below URL: https://github.com/apache/struts-examples/tree/master/tiles
One minor change I made in sample pom.xml that replace ${struts2.version} with 2.5.20
Expected Results: WAR file need to work on Tomcat and weblogic12c server.

Related

Failed to execute goal org.wso2.maven:mi-container-config-mapper:5.2.18:config-mapper-parser in wso2 docker image

this is came from yesterday onwards, when i run the maven for docker project i am getting
Failed to execute goal org.wso2.maven:mi-container-config-mapper:5.2.35:config-mapper-parser (config-mapper-parser) on project ESBDockerExporter: Exception while parsing the deployment.toml file
this is the plug-in i added in docker pom.xml
There is a known issue that happening due to the new HTTPS template URL. So with the new URL HTTPS config, the older "mi-container-config-mapper" plugin has some issues.
So in order to correct this update the version in the k8s project pom file as below.
<artifactId>mi-container-config-mapper</artifactId>
<version>5.2.35</version>

Grails 3.1.5 dont produces jar file

In version to 3.1.5, the command "package" not produces a jar file in "project/build/libs"
I ran a simple "create-app" and "package" with versions 3.0.9 and 3.1.5. Only the first produces a jar file. No error appears in both.
Someone knows how I create a executable JAR, in version 3.1.5?
The documentation states...
If you prefer not to operate a separate Servlet container then you can
simply run the Grails WAR file as a regular Java application.
And then provides the following example:
grails war
java -Dgrails.env=prod -jar build/libs/mywar-0.1.war
So basically, the generated war file is a jar file.

Can tomcat7 maven plugin used in to configure Tomcat8 Server - Tomcat Maven Plugin

I am using JAVA 1.8 and Maven_3.3.9.
Trying to automatically deploy the war file to the Tomcat8 using maven plugin.
Can I use tomcat7 plugin to run and deploy war file with using TOMCAT 8 Server.
If you can share any pom.xml with following best practice of structuring, It can help me to steady my basics.
Do I need to change any value in Settings.xml or pom.xml for generating and deploying the war file Properly ?

Problems creating a Struts 2 project in Eclipse

Im having some problems creating a Struts 2 project from Maven. I saw this post on tackOverflow here which talks about creating your own remote catalog, however Eclipse is telling me that the catalog is empty.
Also after following myKongs notes I get to the part of converting the generated Maven project into a Java Web Project by entering mvn eclipse:eclipse -Dwtpversion=2.0 However this seems to only create a normal Java project - it cannot be run on a server.
What am I doing wrong?
Cheers

Tomcat Maven plugin and multi-module Maven projects

We have an application that until recently was a single Maven WAR project. We were using the Tomcat Maven plugin to run the application on local developer workstations using:
mvn tomcat:run
We were able to change JSP files while the embedded Tomcat instance was running and the changes would appear in web browsers just fine. I understand (from the plugin documentation) that when using the tomcat:run goal, the WAR is loaded as a dynamic web application and hence changes made to JSP files at source are picked up by Tomcat at runtime without restart.
The application has reached a fairly large size and we needed to reuse a large number of classes in a few different places besides the web project, so we refactored the code base into a multi-module Maven project. The structure is now:
parent Maven POM
|
---- artifact1.jar
|
---- artifact2.jar -> depends on artifact1.jar
|
---- artifact3.jar -> depends on artifact1.jar
|
---- artifact4.jar -> depends on artifact2.jar and artifact3.jar
|
---- artifact5.war -> depends on artifact1.jar, artifact2.jar, artifact3.jar and artifact4.jar
After the refactoring we were unable to use tomcat:run from the project's root directory to run the WAR project as the plugin was unable to detect the JAR artifacts. So, we switched to using the tomcat:run-war-only plugin. The WAR module now launches fine.
However, from the documentation, it seems that the run-war-only goal treats WAR files as packaged web applications. Therefore, any changes we make to JSP files now are not picked up by the embedded Tomcat server while running. For every change to JSP files we have to restart the server.
Is there a way for us in this multi-module Maven set up to run WAR projects as dynamic web applications so that at least changes to JSP files are picked up by Tomcat without restarting?
Just do an mvn install first and then
mvn -pl artifact5 tomcat:run
First use new version of the tomcat plugin now located at Apache see http://tomcat.apache.org/maven-plugin-2.0/.
Then if you use maven3, you simply use tomcat6/tomcat7:run from the top. All classes from modules will be added to your webapp classloader (will save some ios as you don't need to install all jars first !) see http://tomcat.apache.org/maven-plugin-2.0/run-mojo-features.html
HTH!

Resources