spring

Spring security 2.0.5. custom login form. Cannot see errors in language other than English.

Hello, I've got my Spring Security custom login form working. It displays errors if the user has input bad credentials, or is expired, etc. Looking inside spring-security-core-2.0.5.RELEASE.jar, I notice the following files in the org.springframework.security package: messages.properties messages_cs_CZ.properties messages_de.propertie...

Spring - Ingres RDBMS support in sql-error-codes.xml error code mapping file

I have a Java project connecting to an Ingres database and using the Spring Framework. This issue is related to the error codes list configuration. According to Spring Framework API: Class SQLErrorCodes: JavaBean for holding JDBC error codes for a particular database. Instances of this class are normally loaded through a bea...

It is possible to bind a whole class in spring?

I use spring web flow 2 with hibernate annotations. I have a question that may sound stupid but I have to ask it: is there possible that in my jsp using form tags to bind a whole class? I am asking this, because when I generated my entity classes from SQL Server 2008 using Intellij it autogenerated also my @ManyToOne column (it's about 2...

System properties can't be resolved in Spring XML using Maven

My application needs to know the path to a directory where it can store its data. I tried to set a Java system property and use that variable as a placeholder in my Spring XML. In Eclipse I added that property to the environment of my run configuration and it works just fine. Spring resolves ${dataDir} to the correct path. But when I t...

how to conditionally show jsp content to logged in users with Spring security

I want to show content to any user that is logged in and to hide if they are not logged in. I'm using jsp's and spring security. Obviously a home grown solution is easily done. But what's the cleanest standard way of achieving this? Spring security tags don't seem to have nice way that will allow for the addition of new roles in the ...

Is it possible to bind a whole class in spring?

Hi,I use spring web flow 2 with hibernate annotations. Is there possible that in my jsp using form tags to bind a whole class? I am asking this, because when I generated my entity classes from SQL Server 2008 using Intellij it autogenerated also my @ManyToOne column (it's about 2 tables: one named Leader-with idLeader,name..and so on and...

Mock object and Spring annotations

I am using Spring annotations in my code to do the DI. So lets say I have a class class1 that depends on another class class2, I define class1 as below: @Component public class class1 { @Resource private interface2 object2; } class2 is an implementation of interface2. Now lets say I want to mock class2 and pass it to class1, I don...

Spring + SOAPExceptionImpl: Error during saving a multipart message

I have a spring web application with jsp pages that calls different web services and displays the results in a jsp page. The spring web application has username/login spring security attached to it. I am adding a call to a web service that handles security. For the WebServiceGateway, I added a security interceptor. (See below) <bean i...

Is there any free library which can be used to generate Graphs in J2EE environment?

I am using JSP with Springframework, and i have to generate Graphs ( Bar , Pie ... ). Is there any free library/api which can be used to achieve this? ...

Recommended to use Lingo with Spring?

I'm going through some examples for how to configure asynchronous JMS messaging with Spring, and the book I'm going through, Spring In Action, 2nd Edition (I know there's a 3rd edition out there), mentions using Lingo (http://lingo.codehaus.org/ for messaged-based RPC asynchronous messaging. The latest version of Lingo is a couple yea...

Spring MVC binding parameters to backing object

I am using Spring MVC and in my controller, I want to be able to automatically bind incoming parameters to my Java object. It seems like this should be pretty easy to do. The only wrinkle is that the incoming parameter names (e.g. "username") may not match up exactly with the field name in the java object (e.g. "name"). From the Spring ...

what do the terms formBackingObject and ModelAttribute mean in Spring MVC?

I guess I don't understand the difference between a "FormBackingObject" and a "ModelAttribute" in spring MVC. Seems like both gets initiated and populated by Spring with an incoming request. ...

how do i check for errors in spring - security ?

I have an application that supports multiple types of login using username+password, using open id, etc. Technology used : GWT. Login url = Login.html and Login Failure url = Login.html?error=true as shown above, the login page (made in GWT) can determine that whether its just opened for first time or whether its opened after an error....

Best way to do Spring MVC without JSP?

I wish to use Spring MVC to provide a REST web service. However, running through some books and tutorials, it looks like ModelAndView always returns a parsed JSP file. I guess I could make the JSP build my XML document, but is this the best way to go about things? I thought that perhaps a more structured XML building approach might be ap...

Spring (Java) - register vs list

I have the following: List<Color> acceptableColors; Using Spring, would it be best to instantiate this list this way: <bean> <list> <value ref="orange" /> <value ref="yellow" /> .... </list> </bean> Or, is there a way to do a register scheme, where we use Spring to perform the following Java code: ColorRegister...

Creating a web service for use in an internal application and exposing it to others

For my web application, I am thinking about using the Spring framework. Initially, I was thinking of having different actions like create user or login, but now I have to expose some functionality to other applications. Should I create a web service that I call from my application and others do as well, or create an action from Spring ...

Does HibernateTemplate work with Envers? If so, how?

I am trying to use Envers on a project that also uses Hibernate and Spring - and I appreciate a lot the code reduction offered by HibernateTemplate. I configured Envers under JPA, and after a few tweaks I was able to have the schema generated by the EnversHibernateToolTask Ant task (including the auditing tables). However, when I write ...

How can I configure a JPA EntityListener via a Spring XML configuration file?

Hello, I have two webapps, that are built together and respectively provide a client and admin access to a database. I'd like to register two JPA EntityListeners to a given class, one in each app. To do that, I'm trying to find a way to register the listeners via the Spring XML configuration file that configure each app's JPA context.....

Spring 2.5 Form validation - Dynamic data lost if validator is called?

I have a simple form that has a select box populated by the database. When validation is triggered the select box is empty. I'm new to spring and I seem to be missing something. Any help is appreciated? Thanks in advance. In the controller below sites is the dynamic content. @RequestMapping("/registration/registration.html") public Mo...

Error suggests springmvc-servlet.xml is wrong but on inspection it looks right?

I am learning Spring and building a sample app. I am getting the error: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Bean name '/list_cars.html' is already used in this file Offending resource: ServletContext resource [/WEB-INF/springmvc-servlet.xml] I previously got a similar error ...