spring

Populating collection from request via Spring?

I've got a page where a purchase can be entered, along with all of the foos bought. I've got three elements in a html document that are parsed into a comma-separated format. function submitStuff() { //grab each cells value from dynamically built table based on user entries //appending comma document.form.ids.value=Ids; docume...

How to make spring4gwt export more than 1 service ?

I successfully follow GWT and spring4gwt's tutorials and transform the StockWatcher's demo into a Spring(3.0) enabled service , by the following configurations : web.xml : <servlet-mapping> <servlet-name>springGwtRemoteServiceServlet</servlet-name> <!-- stockWatcher module is rename-to="stock" --> <url-pattern>/stock/spri...

Catch Spring MVC Maxupload Size Error

Hi, I know its hard to check the file size at the client side(browser) with just pure javascript only. Now, my question is, Is there a way at the server side to catch an exception such as this? org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size of 2000000 bytes What happens is that, it does not rea...

remove object from session in hibernate?

Hi there, my case is that, i've loaded an object X from DB using hibernateTemplate find by id, then i get some attributes from that object and added it to another object Y from the same type which was also loaded by the same X id, then i tried to saveOrUpdate object Y, hibernate thrown exception 'a different object with the same identif...

ManyToOne reference with encrypted fields gives doesn't exist error using Jasypt

I have a problem on the following situation: In my Spring, Hibernate application I got a User Entity and a UserCategory Entity. The table of the user entity got a username as identifier. This indentifierfield can't be encrypted because this table is also used by an older program without the possibility to do this. To make a ManyToOne...

Quartz Spring CronTrigger fired more times than configured

I have a cronTrigger for a job "digestJob": <bean id="digestCronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail" ref="digestJob" /> <property name="cronExpression" value="0 35 15 * * ?" /> </bean> Here is my schedulerFactoryBean configuration: <bean class="org.springframework...

Define Spring JAXB namespaces without using NamespacePrefixMapper

[Heavily edited as understanding progresses] Is it possible to get Spring Jaxb2Marshaller to use a custom set of namespace prefixes (or at least respect the ones given in the schema file/annotations) without having to use an extension of a NamespacePrefixMapper? The idea is to have a class with a "has a" relationship to another class t...

Dynamic fields in JSF beans

Hi! I want to let my client create his own fields and bean in the CMS dynamically. As well, once he creates a form, I need to create an Hibernate Entity that could be saved to the database. Is there a way to do it? I am using JSF2 and Hibernate 3 With recompiling and without? ...

Loading spring context in web application after some servlet

Hi all, We need to load the spring application context in our web application after one of our servlets is initialized, so I wonder what is the best way to do it? I know that it's recommended to use the listener in web.xml, but it's obviously not good for us because in this case the context will be loaded before the first servlet. I s...

ReloadableResourceBundleMessageSource unable to find message when default locale is "en"

Why is the spring "ReloadableResourceBundleMessageSource" unable to find the proper message associated with a code when Locale.getDefault() returns en, but able to find the proper message when it returns en_US Default Locale: en_US key: CODE_1, Locale: Locale.US = Hit key: CODE_1, Locale: Locale.CANADA = Hit key: CODE_1...

Intercept the view/response in Spring MVC 3

I am new to Spring MVC 3 and I understand the basic concepts. I am able to do simple things like create controllers and services and views. However, I haven't made a foray into more advanced territory. Hence, I apologize if this question seems silly (or impossible). I am wondering if there is a way to intercept the view and/or response ...

How to define JPA?

Hi, I have just joined a on going project based on spring framework. It usage hibernate as ORM system. and it is well integrated. I have learned a lot with this project. But some how i am not satisfied with my understanding of hibernate, JPA, when they are mixed together. It has been very confusing for me to understand when my PM is tal...

Spring classpath prefix difference

Documented here it states This special prefix specifies that all classpath resources that match the given name must be obtained (internally, this essentially happens via a ClassLoader.getResources(...) call), and then merged to form the final application context definition. Can someone explain this? What is the differ...

Threads with Spring, wait, notify?

Hi All, I haven't used any of Spring's threading support before. Does it support any high level concept of the Thread class's wait and notify? ...

JavaScript OPTIONS cross-site data sending with Firefox

I'm having an issue with sending post data to server when using Firefox. The server is running on Google App Engine. Here is what I have in my javascript. $.ajax({ url: 'http://someurl/example/myform.json', type: 'post', dataType: 'json', data: { 'value.title': title, 'value.info.first': first, 'value.info.second': val...

Custom json in Spring

Hello, I have configured in an Spring 3 application a ContentNegotiatingViewResolver so when I invoke a controller with a URL which looks like **.json it returns a json object using jackson library. If I call this method: @RequestMapping("/myURL.json") public List<MyClass> myMethod(){ List<MyClass> mylist = myService.getList(); ...

Passing Messages back to Client using Spring MVC

Greetings all... I have a simple, yet annoying question regarding Spring Web MVC. I come from about 7 years of Struts development and have gotten used to all of the ins-and-outs that come with Struts, however, I've decided to take the plunge into using Spring MVC and so far I love what I see. One thing that I cannot seem to figure out...

Spring security - Spring doesn't check on isAccountNonLocked for UserDetails on correct login

I'm using Spring 2.5.6 and Spring security 2.0. For login attempts I implements the UserDetails class on my User class. So the User class implements isAccountNonLocked() after a wrong login (dispatch the AuthenticationFailureBadCredentialsEvent, I handle this with a Eventlistener) Spring called this function from my User class to check ...

How to load multiple jax-ws web services inside a single spring container

We are working on a SOA Project consisting of multiple web services. Each web service is based on Metro JAX-WS Framework and internally uses spring and hibernate.Each web service loads as a web-application inside a separate spring container. This means that our deployment architecture consists of multiple web-applications each running ...

JPA Entity is not being persisted after exception

Hi guys! I´m having the following problem: I have 2 classes (A and B). The class A has a method (method1) annotated with @Transaction(noRollBackFor = ExceptionB.class) that calls the method2 from class B. ExceptionB is a non-checked RunTimeException. public class A { ... @Resource private B b; @Transaction(noRollBackF...