how to configure Spring framework in java

Can anybody give me easy configuration step of spring framework for jsp?i am trying to use spring-framework-2.0.2.
[121 byte] By [Pappowa] at [2007-11-26 15:07:28]
# 1

import javax.servlet.ServletContextListener;

import javax.servlet.ServletContextEvent;

import org.apache.log4j.Logger;

import org.springframework.context.ApplicationContext;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**A quick and easy way to get access to the Spring context from anywhere in the application.

*/

public class SpringContext

implements ServletContextListener {

private static final Loggerlogger = Logger.getLogger(SpringContext.class);

private static ApplicationContext context;

private static String errorMessage;

public static ApplicationContext getContext()

{

if ((context == null) && (SpringContext.errorMessage != null)) {

throw new RuntimeException(SpringContext.errorMessage);

}

return context;

}

public void contextInitialized(ServletContextEvent arg0) {

try {

logger.debug("SpringContext::Starting Spring configuration.");

String appContextPathName = "applicationContext.xml";

context = new ClassPathXmlApplicationContext(appContextPathName);

} catch (Exception x) {

logger.error("Error loading Spring Context " + x.getMessage(), x);

SpringContext.errorMessage = x.getMessage();

}

}

public void contextDestroyed(ServletContextEvent arg0) { }

}

tolmanka at 2007-7-8 8:57:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Try to use a "kickstarting" application like AppFuse (http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse). This application has all

pre-configured parts of good web-application, check it out. There are some options of web-frameworks, and Spring MVC amongst them. So, you can learn how to configure Spring and use it.

agomilkoa at 2007-7-8 8:57:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thank you for your answer.I am very glad and helpful to get your answer.Thanks
Pappowa at 2007-7-8 8:57:31 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...