spring

SpringMVC validation : No property 'commandClass' found

I'm trying to implement validation in a springmvc app, I followed the example described at http://maestric.com/doc/java/spring/form_validation When I run the app, I get the following error : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanNameUrlHandlerMapping' defined in ServletCon...

spring security changing spring_security_login form

i am using spring security and i am wondering how to change the default login form i have found out that i need to point to my new form location. i want to keep the existing functions of the existing default form that has all the login exception display. so i must know how to reproduce it first. in my research i come across with it ...

conditional beans using spring

I am trying to write a ValidatorFactory which will give me a validator based on its type public Validator getNewValidator(ValidatorType type){ switch: case a : new Validator1(); break; case b : new Validator2(); break; } I want to write using spring xml beans definition I can use method inje...

Should I duplicate validation in my MVC layer and Service layer?

I'm feeling a little conflicted at the moment. I have a web application using Stripes for an MVC framework and Spring/Hibernate for the back-end. I have an account registration method in my MVC layer which requires the following validation: Username is not already taken The provided email address is not already associated with another...

Richfaces + Spring DataTable DataScroler problem

I try to use Richfaces DataTable with DataTableModel to have server side paging and sorting. My tebaleModel is a spring bean with scope "request" and " proxyMode = ScopedProxyMode.TARGET_CLASS". On the page is a keepAlive tag for tebaleModel bean. When I click next the bean is initialized but it should be restored. Can anybody help....

Please recommend a good Spring MVC 3 book

I am new to spring and am trying to find a good book, all the books Ive found so far are at latest published in 2008, can someone recommend any Spring books? Unfortunately the company I work for is not prepared to send me on any of the courses and apart from the reference documentation there's next to no Spring 3 user guides, tutorials ...

Package Java web app along with jboss, mysql and activemq for deployment

I have a springframework web application that uses JBoss, MySQL and ActiveMQ. At the moment, I have to install and configure JBoss, MySQL and ActiveMQ and JBoss manually. What is the best way to package the application so a user can maybe do a one click install (on Linux platform, maybe Windows too?) ...

Grails - access only for object's owner

Hi! I'm still working on my first Grails application. This time, my problem is to limit access to some actions for particular users. Assume users add some object, e.g. books. I would like to give access to edit a book only to admin and the user that added the book. I'm currently using Acegi plugin. I know there is newer version of that...

Spring Optimistic Locking:How to retry transactional method till commit is successful

Hi, I use Spring 2.5 and Hibernate JPA implementation with Java and "container" managed Transactions. I have a "after user commit" method that updates data in background and need to be committed regardless of ConcurrencyFailureException or StaleObjectStateException exception, because it will never be shown to client. In other words, ne...

With Spring Transactions with Hibernate, how can you get 2000+ inserts to not slow down in the same transaction?

I have a curious little problem. I have a service that needs to create 2000 records in the database, minimum on various tables. While it would be nice to have them run in the same transaction, the performance gets to be really bad around 400-600 inserts. For some reason, the inserts go slower and slower. I suppose that Hibernate needs t...

What could spring add to hibernate?

I'm trying to build JSF application and I'm using hibernate as ORM solution. The problem is that I got my code full of replicate code Transaction tx = null; Session session = SessionFactoryUtil.getInstance().getCurrentSession(); try { tx = session.beginTransaction(); tx.commit();} catch(Exception){} in every function. Can spring...

NetConnection.Call.Failed happening sporadically in Flex3/Tomcat/BlazeDS/Spring.

I have a very large problem. I've written a large app using Flex3/Tomcat/BlazeDS/Spring that has worked very well while developing locally, fine when I deployed to a common dev environment, but then fails very often when deployed to our test environment. The failures seem to happen most when a remoting request takes a good bit of time ...

Java Web Application - Deployment Strategy Alternative to WAR - Managing UI Changes Separately from Full Code Base Patches

I've heavily edited this question because responses indicated I wasn't being clear problem: UI changes to a Java web project can be tedious and time consuming because every web-app file is contained within the WAR my proposed solution: Manage the JSP's, CSS, JS and Tags separately from the application code base which for the purpose ...

spring security j_spring_security logout problem

i am working on spring security. but the j_spring_security serlvet seems not working. how do i debug the problem, or at least look for the root cause? i dont see any useful log files... <?xml version="1.0" encoding="UTF-8"?> <!-- - Sample namespace-based configuration - --> <beans:beans xmlns="http://www.springframework.org/sc...

Does spring mvc have response.write to output to the browser directly?

I am using spring mvc with freetemplate. In asp.net, you can write straight to the browser using Response.Write("hello, world"); Can you do this in spring mvc? ...

Spring Distributed Transaction Involving RMI calls possible?

Background I have Spring Client application that provisions a service to two servers using RMI. In the the client I save an entity to the database (easy) and make rmi calls to two servers with details of the entity. I am using Spring 3.0.2 on the servers and the client is a simple Spring-mvc site. Requirements My requirement is that ...

how to call stored procedure using spring and hibernate

I get an error message as java.lang.reflect.UndeclaredThrowableException and Invalid column name. Can you help me why am i getting this error. ...

Uploading files to server and storing files to disk with Spring Framework 3

I need to upload files to server and that part I have successfully done, but now I need to know what is best practise to save files that are related to database items to disk with Spring and how that is actually done with Spring. I thought it could be good way to use database table id in folder for example: context_path/table_name/id/f...

The decorator pattern and @Inject

When using Spring's based XML configuration, it's easy to decorate multiple implementations of the same interface and specify the order. For instance, a logging service wraps a transactional service which wraps the actual service. How can I achieve the same using the javax.inject annotations? ...

Write object with transient attributes to stream (Java)

I want to write an object into a stream (or byte array) with its transient attributes to be able to reconstruct it in another VM. I don't want to modify its attributes because that object is a part of legacy application. Standard Java serialization mechanism doesn't help. What other options do I have? Update: The reason I'm asking the...