spring-mvc

How to access proprietary .js file in Spring MVC?

Hi guys, I am newby in Spring, but have a task, and I am learning on the fly. I used Roo to generates for me part of the code, but now I have to make some dynamic list binding, which is done with form, popping-up in new window, and when the submit button is pushed I have to insert the new values in the parent window. For the purpose I...

Testing if a User is Logged in Via JSP/Spring-MVC

Using Spring 3 MVC and JSP, I simply want to test if a user is logged in, I'm not interested in using Spring Security currently <jsp:useBean id="myAppUser" type="com.xxx.MyUser" beanName="myUser" scope="session" /> <c:choose> <c:when test="myUser.loggedIn"> //dostuff </c:when> <c:otherwise> //dootherstuff ...

Spring-MVC Opening New Tabs For No Apparent Reason

there is a form with a submit that logs in a user <div class="logInDIV"> <form action="login.do" target="login.do" method="post"> <span style="font-size:77%;"> <label>email:</label> <input path="userName" cssClass="textfield" cssStyle="width:160px;" title="user name" name="userName" type="text" /> ...

Spring MVC: disable DefaultAnnotationHandlerMapping

I'm using Spring MVC with <mvc:annotation-driven /> I've implemented my own mapping handler extending DefaultAnnotationHandlerMapping, but I'm not sure how to use it. I've declared it like this: <bean class="es.kcsolutions.boulevard.DispatcherMappingHandler" /> It works, but, obviously, DefaultAnnotationHandlerMapping works too and a...

Tiles 2 And No mapping found for HTTP request with URI - Spring-MVC

I want to use Spring-Tiles intergration. Here you can see how my app looks like. So my question is: why Spring-MVC dispatcher Servlet can not resolve my Target page ??? ...

Maximize a JSR168/Spring portlet when it changes to Edit mode

Related/similar question: 2795890 Our team is working on a portlet that has a rather comprehensive configuration view. Currently we are using the maximized view of the portlet to display the configuration page -- but really we should be taking advantage of the Edit view and put the configuration there. The problem is that when our porta...

Confused about using SpringMVC Vs JEE project in Netbeans

Hi all, I want to start a my first JEE project. I have read a lot that springMVC framework is a good choice (never used though) My earlier experience with java is not much. only some small app development using Netbeans. so I have some experience using Netbeans. but I see that I can start a JEE project in Netbeans. so what kind of ...

Spring MVC, forward

Is there any difference between public class Controller1 extends AbstractController { @Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { return new AnotherController().handleRequest(request, response); } } and @Controller...

Spring MVC 3 - How come @ResponseBody method renders a JSTLView?

I have mapped one of my method in one Controller to return JSON object by @ResponseBody. @RequestMapping("/{module}/get/{docId}") public @ResponseBody Map<String, ? extends Object> get(@PathVariable String module, @PathVariable String docId) { Criteria criteria = new Criteria("_id", docId); return genericDAO.getUniqueEnt...

Custom property editors do not work for request parameters in Spring MVC?

Hello, I'm trying to create a multiaction web controller using Spring annotations. This controller will be responsible for adding and removing user profiles and preparing reference data for the jsp page. @Controller public class ManageProfilesController { @InitBinder public void initBinder(WebDataBinder binder) { binde...

Using a Session Scoped Bean

The following code is returning null: AController.java private MyAppUser getMyAppUser(HttpSession session) { MyAppUser myAppUser = (MyAppUser) session.getAttribute("myAppUserManager"); return myAppUser; } I also have tried this: AController.java @Autowired MyAppUser myAppUser; Despite the fact that I have ...

Class 'org.springframework.http.converter.ResourceHttpMessageConverter' not found - how to correct?

Eclipse STS is reporting I have problem with my spring project. It's a fresh project generated from the Spring Web MVC Project Template (File->New->Spring Template Project->Spring Web MVC ). When I create the project it has no problems - it's only once I modify the pom (by adding the hibernate dependencies) that STS then picks up the...

How to redirect to the same view using ModelAndview in Spring MVC framework

I have a page with a link. On clicking the link a page opens up in a separate window. This new page has a form. On submitting this form, some operation takes place at the server. The result of which needs to be redirected to the same page. However after the operation on using the following: return new ModelAndView("newUser"); //Thi...

Spring 3 MVC - Does Anything Just Work? Very Simple Use Case Not Working

index.jsp ... <h1> ${myobject} </h1> ... HomeController.java @RequestMapping(value = "/index") public ModelAndView indexPath() { System.out.println("going home"); return new ModelAndView("index", "myobject", "isastring"); } Output: going home The <h1> on index doesn't show anything, how is this even possible? I absolute...

Spring 3 MVC - Form Failure Causes Exception When Reloading JSP

EDIT: NEW SIMPLER VERSION OF THIS QUESTION - http://stackoverflow.com/questions/3014579/spring-3-controllers-maintaining-model-through-flow Using Spring 3 MVC, please bear with the long code example, it's quite simple, but I want to make sure all relevant information is posted. Basically here is the use case: There is a registration p...

Spring Annotation trailing slash

I have a controller with @RequestMapping for root path "/". There are other controllers with say a @RequestMapping of "/test" etc. My application seems to be mapping correctly for paths like /appname/test, but if I add a trailing slash to the path, like so "/appname/test/ then it maps to the controller that has the @RequestMapping for ro...

How to stop Spring MVC blocking all other Servlets?

Hi, I'm using Spring 2.5 MVC and wan't to add another third-party Servlet. The Problem is, that Spring MVC catches all request, so the Servlet isn't getting any request. Here a web.xml Snippet: <servlet> <servlet-name>SpringMVC</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <l...

Why (Spring 3) HandlerMethodResolver#init() method finds annotations on methods of Object class?

Hi I was playing with My First SpringMVC based app..... (3.0.2.RELEASE) I noticed that AnnotationMethodHandlerAdapter invokes constructor of ServletHandlerMethodResolver, and this constructor invokes init() method of HandlerMethodResolver. public void init(Class<?> handlerType) { Class<?>[] handlerTypes = Proxy.isProxy...

Spring 3 Controllers - Maintaining Model Through Flow

I'm sure there is some way to accomplish what I'd like here, but I haven't been able to find it in the documentation import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; @Controller @RequestMapping(value = "/test") public class TestControll...

Tiles locale change only refreshes tiles that come through controller

Tiles locale change only refreshes tiles that come through controller and not tiles that are just jsp pages that are called from tiles definitions. Is there some way to make all tiles refresh without writing some javascript refresh function or writing controllers for every tile? ...