Closed gogognome closed 5 months ago
你发的邮件我已经收到。会在近期内查看。
@gogognome I have no experience for JSF, but for classpath, you can check the jars are in $user_home/.SmartTomcat/
In the scenario where we encountered the issue with Tomcat 7.0.109 not scanning annotations like @WebServlet and @WebFilter, we discovered a workaround by manually creating a context.xml file in the /webapp/META-INF/ directory. Here's the content we added:
`<?xml version='1.0' encoding='utf-8'?>
`
This manual intervention ensures that the JarScanner component is instructed to thoroughly scan all directories, thus recognizing the annotations within our project.
Considering the capabilities of the SmartTomcat plugin, an enhancement that seems both logical and beneficial would be to enable SmartTomcat to automatically generate and include this specific context.xml content within the conf/context.xml. This feature could greatly simplify project setups by ensuring annotations are automatically scanned, reducing the manual configuration tasks we need to handle.
I am working on a JSF application with ICEFaces 3, JSF 2, deployed on Tomcat 7. I use IntelliJ ultimate, which uses a different plugin to deploy an exploded WAR file in Tomcat. One colleague of mine uses Eclipse to run Tomcat. Recently we have a new team member who uses IntelliJ Community Edition with Smart Tomcat. He is the only team member that has problems when running the application in Tomcat.
The application works well when it is deployed with Smart Tomcat. However, we discovered that some managed beans are not available to the application when it its deployed with Smart Tomcat. This breaks a couple of pages in our application that use those beans. We discovered that all beans that are configured in faces-config.xml are working fine, but all beans that are configured using annotations (e.g. @ManagedBean and @Session) are absent at runtime.
We debugged the annotation processing code and discovered that some annotated classes are actually discovered: the classes in the dependencies of our application (e.g., ICEFaces jars). We suspect that the way that Smart Tomcat deals with classpaths somehow breaks the annotation scanning of the classes of our own application.
Is there some configuration we can change in Smart Tomcat to fix this?