I guess I'm misunderstanding you. When I don't want my model data to be passed as a URL parameter, I store it in the session, then retrieve it in the JSP (like I said). And there are more elegant and...
Type: Posts; User: veraction; Keyword(s):
I guess I'm misunderstanding you. When I don't want my model data to be passed as a URL parameter, I store it in the session, then retrieve it in the JSP (like I said). And there are more elegant and...
For these XML based documents, you need to make sure that your start tags match with your end tags (like brackets in Java, or something).
Anyways, you have a few errors with ending your tags too...
I'm thinking that this was the common issue that if you redirect, and you want model data to go to the JSP, it'll rewrite the URL. If you don't use a redirect, it should work fine. Otherwise, if you...
I personally ran each of those 5 'solutions' before I posted them and each had the desired result.
It is interesting how return new ModelAndView( new RedirectView( "http://google.com" ) ) doesn't...
Well, I'm still fairly new to Spring, but I don't see why there is an issue. There are varying levels of complexity you could go into, with some of the more complex ones being better designs.
...
I have an application which uses a similar setup. An Enum for possible day values Monday...Friday. A select box which sets the current item to be selected, etc.
It works fine here, and seems...
Isn't it necessary to have the spring:bind tag in the formView anyways?
I'm guessing that you've looked at that one new book, Agile Java Development with hibernate & spring (or whatever the name is)... since that code for outputting messages is what the author does.
I...
No, you don't need an action attribute for the form tag. It may be considered bad, but for all of my ~10 forms in my app, I don't use it.
I assume there is a page /WEB-INF/jsp/Success.jsp ?
You...
Problem Solved
I just decided to not use the ${} syntax anymore. I just directly pass in the string name of the attribute:
<courses:courselist coursesVar="courses"/>
Then, I retrieve it by...
I have a Controller which returns a custom object of type Course:
return new ModelAndView( getSuccessView(), "course", myCourseObject );
Then, in my JSP view, I try to output it by:
...
I finally discovered the source of my confusion...
Apparently in my includes.jsp file (to include spring, fmt, etc.), there was a line for
<%@ page session="false" %>
I don't know why...
I'm having a lot of problems with using session variables in my JSP pages.
For my controller, I have:
request.getSession().setAttribute("message", "foo session message");
return new...
My application, which makes use of Spring MVC and Hibernate, has a standard login type system, with administrator accounts. When I 'release' this software, I suppose I'd distribute it such that the...
I'd like the users of my app to be able to refresh the page they are at after a form submit, without it causing any unintended side effects (e.g., adding new row in table twice or something).
It...
Thanks for the quick response. That seems like something I'll have to utilize in an application I'm working on.
By the way, are these two things the same:
...
I also have been struggling with this issue.
@vasya10's last post:
This is the best solution, right? How would a code sample look for this? Googling "spring +pagecontext" doesn't return...
Problem Fixed
I fixed the problem, yet I don't understand it yet.
I was using the implicit commandName = 'command'.
I changed it to use commandName='login' in the bean xml file, than replaced...
I now realize that the other form type views seem to be fine. So, everything is fine except for this login screen which apparently doesn't bind, or something.
Still debugging..
I typically develop my application with Eclipse WTP, and run Tomcat using their Servers plugin tool. I have now tried to use an ant build.xml file to create a warfile for distribution purposes.
...
Thanks, that does just what I was looking for
My goal is to have the successView being the same as the formView. E.g., after one clicks submit, a message may be generated then displayed on the same form.
I've been working with a simplified...
I'm not sure exactly what you mean
Setting 'successView' seems to do the same thing as returning a new ModelAndView referencing the same thing.
[edit] I may not understand exactly what a...
Example: I have a SimpleFormController where I am editing simple data (e.g., first name, last name). I want the functionality to be that once I update the fields, and click submit, a message comes up...
Is it possible?
Specifically, I want to do something like
request.getSession().getAttribute("user");