Did you ever find an answer to this?
I have the same problem and do not wish to put the file in the classpath.
Type: Posts; User: monteslu; Keyword(s):
Did you ever find an answer to this?
I have the same problem and do not wish to put the file in the classpath.
I'd like to have answer to that as well. Seems like it should be a simple thing to do.
In the mean time, you can always just put what you need in the Model with your Controller and access it with...
Thanks for the response.
Having to do my own validation on it loses some convenience.
I never want to return a 400 or 500 to the user, and will always prepare for anything they try and do to...
I like the RESTful MVC stuff as it is every convient to bind a method parameter to something in the URL path.
One thing I don't understand is how I'm supposed to do any error handling.
Let's...
You should be able to just add a spring Interceptor to your handlermapping.
What I've been doing is simply having a header.jsp and footer.jsp that I include in the jsp/jstl views. The header and footer can contain the bulk of the html code (menus, css, javascript, etc.)
...
Thanks! That fixed it.
Really strange default behavior though. I can see how it could be useful, but not something I'd want to happen most of the time.
I'm using 3.0 RC1
I've tried to do redirects in @RequestMapping functions by either returning a ModelAndView with the view being a new RedirectView ("/") or by just returning a string of...
Thanks for the quick response, jpreston.
What I settled on was doing a "/" mapping so that I could have a dyanmic default page, and then I just keep all the static content in another webapp.
...
Is this still broken?
It looks like util:list still doesn't have a lazy-init property.
I'd like to have webapp's first document be served up from spring MVC.
I could just redirect to a "home" servlet mapping from index.jsp, but I'd rather the start page was just...
So it sounds like the view is XML.
It's still MVC. The php server makes a call to the spring server and asks for a page. The controller does its logic and puts things in a model. The model is...
In tomcat 6.0.14 this still wont work because by default the view will do a forward with the request dispatcher. And tomcat overrides the view and viewresolver. It even ignores the directive on the...
Found a workaround
Since I have a custom DispatcherServlet that allows for the setting of a specific viewResolver, I configure two different ones.
First is for JSP generated html files:
...
This is a bug
The problem happens in org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel()
/**
* Render the internal resource given the specified model....
This doesn't work for InternalResourceView
This no longer works. And having a view with the correct content type doesn't seem to either.
See this:
http://forum.springframework.org/showthread.php?p=223959
Digging deeper...
I had to write my own Dispatcher servlet to be able to specify which resolver bean name to use.
I woudn't have had to do that if...
Does anyone know which class actually does the figuring out of which viewResolver to use?
If there is a hook in the Controller or Handler or ModelAndView or Servlet, then I could override the...
It seems like it isn't possible to have a SpringMVC app with multiple content types using InternalResourceViewResolver.
The content type put on a response in a controller's handleRequestInternal...