Can I use in Spring the Message Resource Bundle when calling a JSP directly -


I am using Spring 3.0 and working with spring protection for login. I have kept the login.jsp page in the webapp folder and I am trying to use the message for localization support eg .:

   Unfortunately, JSP messaging error can not be found:  

javax.servlet.ServletException: javax.servlet.jsp.JspTagException: any message Not found locale code 'label.title' for 'en_US'

When I use message code in a jsp, which goes through the controller, then it works fine Does.

Spring security redirects to login.jsp page when the user is not logged in, the page is processed without the controller (straight).

Nobody knows how to make the JSP resource bundle even without going through the controller?

thanks

let you login to the spring page. JSP is to be presented, which is not actually managed by Spring. Therefore, create a dummy controller:

  / ** * UI controller that renders signin-form. * / @ Controller Public Class Signin Controller {/ ** * Provide the signin form to the person in the form of HTML in your web browser * To resolve the visual template to clear the request-to-view-name in the kick-in Returns zero and returns in translation. * / @RequestMapping (value = "/ login", method = RequestMethod.GET) public zero login () {}}   

and the name of "Login" based on your used ViewResolver Create a view of (Tiles WeaverRSOllover, URLBJVOrosolar ...)

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -