spring-mvc

Can any framework project use Struts-taglib

I have read here that one disadvantage that some may find with using Spring MVC over Struts is that Struts has tags that output HTML code, while Spring has tags that don't generate HTML. My question is can't you just use the Struts tag-lib in a Spring MVC project (or any other kind of framework project), by dropping the right jar into t...

Is it possible to use the Spring MVC on JBoss App server?

Hi. Is it possible to use Spring MVC on JBoss App server? If so, how? Used the Spring MVC with Tomcat Apache server, but now i have to move my project to a JBoss app server. But i'm getting an error, and i'm not sure why. It seems like i can't use my classes. 125 ERROR [Engine] StandardWrapperValve[project]: Servlet.service() for ser...

Multiple config files for spring security

Hello all, I'm quite new to all things spring, and right now I'm developing an application that uses Spring, Spring MVC and Srping Security. My problem is that I'm using two dispatcher servlets, one for /csm/*.html and another one for *.html and I'd like to have one spring security configuration file per servlet. Is this possible at al...

Spring MVC POJO Bind Explanation

I am trying to understand how the binding of objects works in spring mvc. I have a Controller set up as follows, and want to have the freemarker template bind to the accessRequestBean. In the template I have '<@spring.bind "command.accessRequestBean" />' but that causes errors... How do I bind a form to a POJO? @Controller @PreAuthori...

database design to speed up hibernate querying of large dataset

I currently have the below tables representing a bus network mapped in hibernate, accessed from a Spring MVC based bus route planner I'm trying to make my route planner application perform faster, I load all the above tables into Lists to perform the route planner logic. I would appreciate if anyone has any ideas of how to speed my per...

LazyInitializationException in Spring

Hello, I'm getting a LazyInitializationException in my Spring Application. I have the OpenEntityManagerInViewFilter configured so I have all my relations set as FetchType.LAZY and they all work. The problem is when I try to access the user which is in session via Spring Security and print LAZY information in the JSP, something like this...

Spring mvc: controller returns [][], usable in jsp with foreach, but how to bind?

I'm building a spring mvc application. Now the problem I have is the following. I have a controller which adds a DayInfo[][] to my ModelMap. (DayInfo has an id, a title (String) and Text(also String). Now the problem I have is that I have no problem displaying this DayInfo[][] with <foreach> tags in my jsp. However I'm outputting the ...

Annotation based view mapping

I am trying to get my head around annotation based mappings and I am having some trouble mapping requests directly to jsp. Do all request have to go through a controller? Is it possible to make it just go to a jsp without declaring a RequestMapping for GET? I am using a InternalResourceViewResolver. Below is my app-servlet.xml <contex...

JPA IndirectSet changes not reflected in Spring frontend

EDIT: Solved, but I don't know what was different now. If anyone can explain what happened differently, I'd appreciate it. The way it's working now is by merging only the Parent, not the Child at all, like so: Parent parent = child.getParent(); parent.getChildren().add(child); getJpaTemplate().merge(parent); Now, it seems to be worki...

Passing Request Object into Service Layer

In a spring mvc + spring core app, we have have a view layers, a facade, a service layer, a dao layer and a stored-proc based persistance layer. The service layer is unaware of the clients that utilitize its methods. Is it fine to propagate raw http requests into the service layer? Or is it bad practice and a violation of the loose coup...

How to perform Spring validation in MultiActionController?

How to perform Spring validation in MultiActionController? ...

Spring Web MVC: Use same request mapping for request parameter and path variable

Good people: is there a way to express that my Spring Web MVC controller method should be matched either by a request handing in a ID as part of the URI path ... @RequestMapping(method=RequestMethod.GET, value="campaigns/{id}") public String getCampaignDetails(Model model, @PathVariable("id") Long id) { ... or if the client sends in ...

Alternatives to JSP for Spring MVC view layer

I'm looking to create a new app from scratch and will probably use Spring MVC and possibly Spring Web Flow. The projects created by Spring Roo use Spring MVC and optionally Web Flow. What are some good alternatives for view technology, or is JSP with spring and jstl taglibs and jquery the way to go? ...

Server side aggregation using Spring MVC Controllers

Hi! We have a web site with multiple pages each with lot of AJAX calls. All the Ajax calls go to a data proxy layer written in Spring 3 MVC application. In order to reduce the load on the server we are planning to aggregate calls on the client and send to the proxy layer. For ex: we have two calls /controller1/action1 and /controlle...

UnsupportedEncodingException thrown when using Resin and Grails

I've encountered a strange problem in a Grails webapp running under Grails: java.io.UnsupportedEncodingException is thrown quite frequently due to various unknown encoding strings (such as "ISO8859_10", "ISO-8859-10"), and the strange thing is that this is done entirely within the Resin and Grails code. That is - no custom code is invol...

How to get error text in controller from BindingResult

I have an controller that returns JSON. It takes a form, which validates itself via spring annotations. I can get FieldError list from BindingResult, but they don't contain the text that a JSP would display in the tag. How can I get the error text to send back in JSON? @RequestMapping(method = RequestMethod.POST) public @ResponseBody...

JPA returning null for deleted items from a set

This may be related to my question from a few days ago, but I'm not even sure how to explain this part. (It's an entirely different parent-child relationship.) In my interface, I have a set of attributes (Attribute) and valid values (ValidValue) for each one in a one-to-many relationship. In the Spring MVC frontend, I have a page for an...

Spring Framework 3 and session attributes

I have form object that I set to request in GET request handler in my Spring controller. First time user enters to page, a new form object should be made and set to request. If user sends form, then form object is populated from request and now form object has all user givern attributes. Then form is validated and if validation is ok, th...

Is there a maven 2 archetype for spring 3 MVC applications?

I'm experimenting with the spring 3 MVC framework. Since i use maven 2 to manage my project, i'm searching for a archetype to create a spring 3 MVC application. ...

Spring MVC: easiest way to see incoming requests

I am debugging a Spring MVC (3.0) app, deployed on tomcat. I want to see in my console or log files all the incoming requests. Including 404s, both generated by my app or by spring because it didn't find an appropriate controller. I'd like to see something like this: GET /index.html GET /img/logo.png GET /js/a.js GET /style/b.css POST...