spring

FileNotFoundException..Classpath resource not found in spring?

I have code like this in Main.java : AbstractApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml"); until recently it was working..but i dont why it started failing with the below exception: Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException pa...

How to run Spring Samples?

I check out mvc-ajax project into eclipse from this svn address https://src.springframework.org/svn/spring-samples and run it on server,but got the following error: org.apache.jasper.JasperException: Unable to read TLD "META-INF/c.tld" from JAR file "file:/home/tom/source/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/mv...

How can I easily use a JSP page as an email template using Spring?

My emails will need to be HTML anyway and I don't want to introduce another HTML generation mechanism (e.g. Velocity) into my project if I don't have to. It would be nice if image references in the generated HTML could be converted into attachments automatically. ...

Spring, Hibernate, Java EE in the 3 Tier architecture

Hello! I need to get a start as to where I put those technologies in the 3 Tier architecture: This is what I have... presentation layer: HTML, JSP app. layer: Java EE, Spring data access layer: Hibernate, PostgreSQL database ...

@PostConstruct method is not called in Spring

SampleBean: package com.springexample; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; public class SampleBean { private BeanTypeOne beanOne; private BeanTypeTwo beanTwo; public void init() { System.out.println("This is from the init() method"); } @PostConstruct public vo...

Spring 3 Portlet - data not updating on a page refresh

I'm trying to write a simple portlet using Spring 3 to run in Liferay. It's two pages - you can view an ordered list of items (they are just strings), and if you go to the edit page, you can change the order of the items in the list. On the edit page, you can either move an item up or down, one level at a time. So for example, when you c...

AspectJ Advice on Spring Security ProviderManager throws exception on startup

Does anyone know why when I try to create an advice around the "doAuthentication" method of the Spring Security (v3.0) ProviderManager my application throws an exception on startup? I am autowiring an instance of my spring authentication-manager bean into a controller and when the autowire is attempted my app fails to deploy. Here is ...

Spring Security and AOP

Is it possible to create a custom @Aspect and apply it to the Classes/Methods within Spring Security (3.0.3)? I'm trying to do some logging of logon/logoff requests and none of my Advices are being triggered. I'm using @AspectJ annotations and here is how I'm decorating my method: @After("execution (* org.springframework.security.aut...

Is using a JDBC scrolling strategy for paging of tabular data going to result detrimental performance?

We currently have a system that displays a page tabular data on the screen without any paging support in the user interface. It is running on Java 1.5 / Spring JDBC / T-SQL stored procs / SQLServer 2000 stack. In the absence of the ability to skip rows in the result set (limitation of SQLServer 2K without using dynamic SQL); I am explo...

Is it possible to set a domain object as a hidden field in spring forum bean ?

greetings all i have a domain class named car and i have an object from car retrieved from the DB and i want to save this object in the form as a hidden field in order when submitting to get this object but when i tried <form:hidden path=carObj /> it didn't work, any ideas why, and how to do such behaviour ? ...

Redirect using SAML is not landing in my configured page

I am facing an issue while using SAML to implement SSO on my web application. After successful login I want to redirect to my application’s dashboard / main menu. But, it gets redirected to http://:/IDBUS/first-idau/IDP-1/SAML2/SSO/POST. The flow is, I request my application’s context url in browser. In josso I have configured it to ...

Integrating EJB3 with Spring

Hello All, I'm building application with EJB and Spring 3. I have three maven modules - Spring jars, EJB jar and web part. In the web part I want to call my EJB session bean. Here comes the code of it: @Controller public class IndexController { @EJB PaymentRemote paymentRemote; } I have also an application context file, with the c...

Is there an alternative to hierarchical Spring security roles?

Can Spring roles only be defined in relative hierarchical terms as in this example? Is there any way to define the roles in absolute terms? <beans:bean id="roleHierarchy" class="org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl"> <beans:property name="hierarchy"> <beans:value> ROLE_ADMI...

How to inject FactoryBean instead of object it produces?

Let's say I have following Spring config (version of Spring is 3.0.3): <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/bean...

Spring JDBC vs JDBC

I have been trying to use spring 3.0 SimpleJdbcTemplate and it takes 5 mins to insert 1500 records, whereas it take me a few secs. to insert using straight JDBC. Not sure what I am doing wrong. ...

Spring Security with OpenId Checkin for isAccountNonLocked

I have an application that is using Spring Security 3.0.3 and OpenID as its main authentication provider. I am curious as to why in my UserDetails Object the "isAccoutNonLocked" method is never called? Is this solely for form-login implementation, or am I missing something? If someone can point me in the right direction on a handler or ...

spring ntlmV2 not support

i know that JCIFS not support ntlm version2 , mean i cannot use spring-nltm to do ntlm2 . in that case, what library should I use with spring to do ntlm2? ref: http://jcifs.samba.org/src/docs/ntlmhttpauth.html (see blue line) from info i get The NTLM HTTP Filter does not and can never support NTLMv2 as it uses a main-in-the-m...

is there an elegant way to inject a spring managed bean into a java custom/simple tag

I have a bunch of java custom tags that use spring managed beans.. since i cant find a way to inject into a custom tag, i created a helper class that provides static methods to "getTheObjectINeedBean()" for all the spring bean objects i need.. I do not like this approach at all. i really want to be able to inject a spring managed bean ...

Why does using spring 3.0 and struts yield: HTTP Status 404 - Servlet action is not available

Using Spring and Struts together gives no error message in the console, but only a: HTTP Status 404 - Servlet action is not available in the Browser. The logs give no clue whatsoever. ...

com.sun.jndi.ldap.LdapCtxFactory : class not found in servlet

Good morning / afternoon, I have a problem with LDAP connector, when I use it in my unit test no problem, but when it was called in a application server environment, it seems to have classpath issue, but this class is delivred with java 1.6.17 (version I use). I use spring-ldap to initiate my connection. public static LdapContextSourc...