Moving resources under WEB-INF

What is the easiest method for me to safely move all html/js/images folders under the WEB-INF without breaking all links/forwarding to resources in these folders and make sure these resources are not directly accessible? You’re making a thiniking mistake here. HTML/JS/image (and CSS) resources need to be directly accessible anyway. For JSPs the story is … Read more

Is security-constraint configuration for Tomcat mandatory?

No, it’s not necessary. It means that your web application only available through HTTPS (and not available through HTTP). If you omit the <transport-guarantee>CONFIDENTIAL</transport-guarantee> tag (or the whole <security-constraint>) your application will be available through both HTTP and HTTPS. If your web.xml contains <transport-guarantee>CONFIDENTIAL</transport-guarantee> Tomcat automatically redirects the requests to the SSL port if you … Read more

Referencing Environment Variables in web.xml

You can use Ant-style variable substitution in any of the tomcat xml config files, such as: <servlet-mapping> <servlet-name>mvc-dispatcher</servlet-name> <url-pattern>${foo}</url-pattern> </servlet-mapping> Where foo is a Java System Property (sysprop). You can’t use OS Environment Variables (envvars) directly, I think… To use envvars, you can put set “CATALINA_OPTS=-DsomeJavaSysProp=%SOME_OS_ENVVAR%” in bin/setenv.bat (or similarly in bin/setenv.sh for *nix). You … Read more

Eclipse Language Servers: There is ‘1’ error in ‘javaee_7.xsd’

This is a bug in Eclipse which manifested since 2021-03. It’s broken down here: https://github.com/eclipse/lemminx/issues/1042#issuecomment-859778034: Ok I can reproduce the issue with a fresh Eclipse IDE (the last). I can explain the problem but I don’t know how to fix it (for the moment). When you have “There is ‘1’ error in ‘jakartaee_9.xsd'” error, you … Read more

“The Struts dispatcher cannot be found” error while deploying application on WebLogic 12.1.3

If you are using Struts tags inside JSP page that has listed in the welcome-file-list it should be removed. welcome-file-list in web.xml: The welcome-file-list element of web-app, is used to define a list of welcome files. Its sub element is welcome-file that is used to define the welcome file. A welcome file is the file … Read more