spring

Unable to locate Spring NamespaceHandler for XML schema namespace

I'm getting the following error when I try to run a simple app (JPA + Hibernate + Maven). It works fine when I deploy a war file into an app server but it doesn't work from my IDE (Eclipse). Is it possible to run it without app server? If yes, what is a problem? Exception in thread "main" org.springframework.beans.factory.parsing.BeanDe...

Should I put my ThreadLocals in a spring-injected singleton?

Several people (eg at serverside http://www.theserverside.com/news/thread.tss?thread_id=41473) suggest that using ThreadLocal objects is as bad as using global variables. I imagine this is true if you make them public static variables. The problem then is that it can be hard to tell where it is used, where it's changed, etc. In my sprin...

Dojo -webflow multiple submit buttons

I am trying to use dojo on my jsp page.I have multiple submit buttons and based on what is clicked we have the webflow configured to go the respective view.something like Next-->Goes to the next page Cancel Exit->Goes to the exit page when i use dojotype form and click on any of these submit buttons they act like "next button" and goes t...

Spring MVC 3.0: how do I define an interceptor with annotations?

I am developing an app with Spring MVC (3.0). I defined some controllers with annotations, how can I define an intereceptor with annotations too. ...

How to use Grails dataSource in resources.groovy?

I have an external java library I am using in my Grails project. It needs a DataSource via the Spring configuration. However, the dataSource appears to not be accessible from resources.groovy. How do I get access to it? I'm using the following in resources.groovy: beans = { eventDao(com.JavaClassRequiringDataSource) { //dataSourc...

Apache Tiles 2.1.4 with CSS

Hi, I am using Apache Tiles 2.1.4 with Spring MVC 3. I have managed to configure these together and everything works fine. My next step is to add CSS and this is where I am having an issue - this is most probably a simple one but I can't get my template jsp to pick up the css. Snippet from my tiles-defs.xml <definition name="baseLayou...

Spring Timers on JBoss don't stop when undeployed

I'm using the spring Quartz SchedulerFactoryBean to run a task (SimpleTriggerBean) every 10 seconds. It works great, except when I undeploy the app, the timer carries on running. The only way to stop it is to restart the server! Is there some JBoss or Spring configuration which will stop the timer when the app is undeployed? ...

Tapestry 5: contributeRequestHandler in unit tests only

I'm trying to use PageTester in conjunction with spring security but am running into this exception: java.lang.RuntimeException: java.io.IOException: Can only process HttpServletRequest I think there is a solution (as below) but does anyone know how I can use the following contribution so that it gets called only during tests? public ...

How does Spring resolve views?

I've been having a little trouble with View Resolution under Spring 2.5.5. Basically I'm just trying to show my view with a message from the controller passed in. The issue comes when the Controller returns the ModelAndView but the DispatcherServelt says it can't find a Handler. All the files seem to be in the correct place. I think the...

NetBeans: add Spring IOC to maven based Swing Application Framework project

Hello. I want to add spring IOC to maven based Swing Application Framework project. So I added to pom.xml dependencies: <!-- Spring IOC --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.0.0.RELEASE</version> <scope>runtime</scope> </dependency> <!-- log4j for Spring --> ...

questions on spring mvc form handling form's and validation

With spring MVC, do you have to use one of the special form controllers or it just makes things easier? I want to create a form, which doesn't directly map 1:1 to a particular entity, and perform server side validation on them data. For the front end, I want to use jQuery. Does spring tie itself to a particular javascript library or c...

Trying IntelliJ with spring 3.0 MVC, how to import required libs?

I'm trying out intelliJ's commercial editor with spring mvc 3.0 It seemed to have imported the files into the lib, but I guess I am missing something. I have downloaded spring 3.0 in my downloads folder, but I haven't imported them into the editor since it set things up for me automatically. The annotation: @RequestMapping is not being...

Adding new users in Spring Security

I have basic spring security set up in my Spring / Java EE web app. I can restrict access to certain pages and force login (with roles etc.). There needs to be a form where new users can register and specify a login name and password. I am wondering if, to create new users, I simply query and update the appropriate spring security tab...

write too frequent ,datastore contention timeout

I read app engine wiki, on datastore contention if too frequent write more than 5 times in 1 seconds. The wiki introduced use "shard" approach" as workaround. May i know if we use spring @transactional on this, this can prevent datastore contention timeout right since writing in done concurrently ? ...

Display results from solr with JSP

Hi, I am trying to work out the best way to display solr results in JSP. I am a bit new to JSP but it seems as if there are a whole bunch of ways of doing it e.g. Hibernate, Spring MVC, JSP page itself, struts. It would be great to find out if anyone has any experience with consuming Solr or XML and which of the above solutions is th...

Spring 3.0 set and get session attribute

I want to read a domain object (UserVO) from session scope. I am setting the UserVO in a controller called WelcomeController @Controller @RequestMapping("/welcome.htm") public class WelcomeController { @RequestMapping(method = RequestMethod.POST) public String processSubmit(BindingResult result, SessionStatus status,HttpSession ses...

spring xml config

I have all my configuration details like (queries bean, url mapping etc) in one file (businesscaliber-servlet.xml) but i want separate out how do i do? ...

What is the meaning of using proxy ( dynamic proxy) in spring framework?

I don't know the meaning of using proxy in spring. what is efficient? ...

How to correctly implement OpenSessionInView with Spring 3.0 and Hibernate 3 (in liferay portlets)?

Hello, I have some problems in implementing the OpenSessionInView pattern. From various resources on the web i configured my application in this way: 1) in my dispatcher-servlet.xml I have an interceptor that should get all my requests with a spring class OpenSessionInViewInterceptor: <bean id="urlMapping" class="org.springframework....

Using spring framework with maven instead of ant

Is there a tutorial somewhere which shows how to use spring framework with maven instead of ant? This one seems very good but it's all built with ant. EDIT I really don't know which answer to accept both are valid. I'll wait for some time let the community decide ...