Monthly Archives: January 2014

How to use Spring properties values in a jsp

I had a property value that contained the host of the server that I was going to be deployed on. There was more to it, because there were profiles, etc, but that is the gist of it. There is a … Continue reading

Posted in JSP, SpEl, Spring | Leave a comment

Include JSP resources from another webapp

The servlet 3.0 spec defines a way to share webapp resources via a dependent jar (See Servlet 3.0 spec, section 10.5) If you have a Maven dependency that is a jar, you can package resources and have them available to … Continue reading

Posted in IntelliJ, Maven, Servlet Spec | Leave a comment

Getting the Spring Security Principal in a Spring MVC Controller method

You will need to create a Spring configuration class and annotate it with @EnableWebMvcSecurity The documentation then says to add a method parameter to a Spring MVC controller method with @AuthenticationPrincipal and you are done, like the following: What they … Continue reading

Posted in Spring, Spring MVC, Spring Security | Tagged , , , , , | 16 Comments