spring

suggestion for ebook

please suggest spring security 3 pdf at beginner level in java which is available for free download. ...

Spring 3 MVC: Show validation message with custom validator

Hi, I need help. I am beginner in jsp, MVC. I want to validate form input with custom validator in Spring 3 MVC. My validator class package validators; import models.UserModel; import org.springframework.stereotype.Component; import org.springframework.validation.Errors; import org.springframework.validation.ValidationUtils; im...

Tutorial for using spring beans in jsp pages

Hi guys, (I am not familar with technologies related to HTML delivery, like JSP... But I know basic concepts...) In my application I use Spring Beans and Spring Security together with Blaze DS to communicate with Flex applications over AMF protocol. Everything works just fine. Now I have a task to deliver some services via HTTP/HTML e...

Hibernate aggregates + Spring MVC

Hi, I am using Hibernate with my Spring MVC project. Lets say my model has 2 objects each linked to Oracle tables, respectively USERS (USERID, NAME) and USERMONEYDATA (CATEGORY, USERID, AMOUNT) My users can add , edit and remove rows in USERMONEYDATA, that belongs to them of course. Now, I want to have a view that aggregates those da...

How to encode a url in spring framework ?

greetings all I have a post method in a controller, which redirects to a new page I a way such like: @RequestMapping(method = RequestMethod.POST) public String post(HttpServletRequest request) { return "redirect:http://www.x.appName.com/myPage"; } suppose that the user already has a session before the redirection an...

android webservices method getting null parameter value while calling

when I invoke webservices method working fine without parameters. But with parameters I am getting null in the inside the webservice method. Here my code and wsdl file private static final String METHOD_NAME = "getCityList"; private static final String SOAP_ACTION = "http://service.country.com/" + METHOD_NAME; private static final ...

Spring hierarchical context

I have following problem: I'm trying to implement Spring in existing ear application (using Jboss as App Server and Hibernate as ORM). The ear application consists of war(basically few simple servlets), har(hibernate archive which has only the data model-as classes and the corresponding hibernate mapping files - as xmls), sar(only one pa...

Spring @Bean configs and java polymorphism

I've been making increasingly heavy use of the new @Bean configuration style in Spring 3, as a more type-safe alternative to XML bean definition files. Occasionally, though, this type-safety can prevent you do what should be valid things, due to a combination of Java's lack of type expressiveness, and Spring scoped proxies. A full unit...

Castle Windsor - Lookup Method Injection for transient instances

Hello all, The short question: Does Castle Windsor have something similar to Spring.Net's "Lookup Method Injection" that can be configured from XML, which provides the ability to fetch transient instances from the container without the class being aware of the IoC container? The long question: I'm a long time Spring/Spring.Net user and...

hibernate spring: PrePersist the place for business-logic?

Hi, I am using Spring + Hibernate to create and store a record in a MySQL database. Just before persisting a record I want my system to generate a random-string which will be stored in a field in the entity that is being stored. This random-string of characters will be used later as an access-key to retreive the record and confirm the ...

Unable to locate Spring NamespaceHandler for element 'flow'

I am developing a spring webflow (2.0.7) project using SpringSource Tool Suite. I am trying to setup a basic flow. My someflow.xml looks like this: <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework....

JSF/Rich Faces Drop down funtionality suggestion

Hi friends, I am using JSF/Rich Faces with Spring Webflow. I am implementing a functionality where in I have a drop down menu, where with each selection I need to trigger different transition in the webflow. For Example I have a drop down with values [Admin, Home, Logout, Search] On select of any of these items I should fire an approp...

Integration Test which simulates Exceptional / Rollback condition with AbstractTransactionalJUnit4SpringContextTests

I have a JUnit4 test which extends AbstractTransactionalJUnit4SpringContextTests. I have a business object that I've marked as a unit of work with @Transactional. The unit of work updates the database that a user has been notified & then attempts to send them a notification message. I have configured the method to rollback for a MailEx...

Multiple Invocations of Spring Scheduled Task

Hey everyone, So I am having a bit of a problem with some scheduled tasks I have declared using Spring's @Scheduled annotation. First off here is my app-config: <beans <!--Namespaces-->> <!-- Search for annotated beans --> <context:component-scan base-package="com.my.package.task"/> <task:annotation-driven executor="myExe...

org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize;

I am getting the following error org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize All my classes implements serializable. Acutally I am fetching one list from DB and using it's value to fetch another result. ...

LCDS / Spring integration for Assemblers

I have a Flex / Spring / LCDS project, and I'm trying to use the Spring/Flex integration module. It works fine for exposing simple destinations & messaging end-points, however I'm unsure how to configure to use Assemblers. The vanilla, no-Spring-integration-way involves declaring a destination such as: <destination id="book.service"> ...

How to stop embedded images in email being displayed as attachments by GMail?

I am sending HTML emails with embedded images (as attachments) and the images display as expected in GMail. However they also show up as attachments under the email. Does anyone know how to avoid this i.e. I want them in the email only and not listed as attachments. I have used "Content-Disposition: inline". I am using Spring and JavaMai...

Can I replace a Spring bean definition at runtime?

Consider the following scenario. I have a Spring application context with a bean whose properties should be configurable, think DataSource or MailSender. The mutable application configuration is managed by a separate bean, let's call it configuration. An administrator can now change the configuration values, like email address or databa...

dependency injection framework Guice vs Spring

I am planning to use dependency injection framework. what should I choose? Guice or Spring? I will use java configuration both ways. also my application is pure java j2se, not web/j2ee application and I don't plan to use spring's rich capabilities. my main concern about guice is that it is much less popular and not in common use. I want ...

session scoped bean not created by DispatcherServlet

I've created a RESTful web service using spring. I have controllers that are session scoped. When i try to perform a GET request it actually works great but i get an ignored exception while DispatcherServlet tries to determine Last-Modified value. 2010-10-28 11:32:50,487 [http-8080-2] DEBUG org.springframework.web.servlet.Dispatcher...