Unveiling the Mystery: Extra Info Messages from Struts During Weblogic 12c Startup
Have you ever encountered a flurry of information messages during Weblogic 12c startup, seemingly related to Struts? These messages can be confusing and raise concerns, especially if you're not familiar with Struts' inner workings. This article will delve into the root cause of these messages, provide clarity on their significance, and offer solutions to manage them effectively.
Scenario:
Imagine you're starting up your Weblogic 12c server and encounter a series of messages similar to these:
INFO: [Struts] - Struts 2.3.34 is running.
INFO: [Struts] - Struts 2.3.34 is not configured to scan for actions.
INFO: [Struts] - Struts 2.3.34 is not configured to scan for packages.
INFO: [Struts] - Struts 2.3.34 is not configured to scan for results.
INFO: [Struts] - Struts 2.3.34 is not configured to scan for interceptors.
INFO: [Struts] - Struts 2.3.34 is not configured to scan for exception mappings.
While these messages don't inherently indicate a problem, they might feel excessive and leave you wondering:
- What are these messages, and why are they appearing?
- Are they related to a potential issue in my application?
- How can I control or suppress these messages?
Understanding the Messages:
These informational messages are generated by the Struts 2 framework during initialization. They reflect the default configuration of Struts 2.3.34, which is designed to be highly flexible and customizable. Since you haven't explicitly configured any scanning for actions, packages, results, interceptors, or exception mappings, Struts is informing you that it's not performing these operations automatically.
In essence, these messages are simply stating that Struts is operating as intended in its default state.
Why are these messages appearing during Weblogic startup?
Weblogic, being a Java EE application server, starts up all deployed applications, including your Struts-based web application. This initialization process triggers the Struts 2 framework to initialize and report its configuration, resulting in these messages.
Managing the Messages:
While harmless, these messages can be considered verbose, especially in a production environment. Here are a couple of ways to manage them:
-
Customize Struts Configuration: If you're actively using features like action scanning or package scanning, explicitly configure these settings in your Struts configuration file (struts.xml). By explicitly defining these settings, you'll provide clear instructions to Struts, preventing it from reporting its default behavior.
-
Log Level Control: If you find these messages distracting and want to suppress them entirely, adjust your logging configuration (e.g., log4j.properties, logback.xml) to reduce the logging level for Struts-related messages. By setting the logging level to "WARN" or "ERROR", you will filter out these informational messages.
Key Takeaways:
- The informational messages generated by Struts 2 during Weblogic startup are normal and reflect the framework's default configuration.
- These messages are harmless and don't indicate a problem.
- You can manage these messages by either explicitly configuring Struts or adjusting your logging levels.
Additional Information and Resources:
By understanding the nature of these messages and adopting appropriate management techniques, you can ensure a cleaner and more streamlined Weblogic startup experience.