Questions tagged [applicationcontext]

The Spring `ApplicationContext` class

The Spring ApplicationContext class is the central interface to provide configuration to any Spring application.

869 questions
0
votes
1 answer

Application object in spring MVC

I used to write web development application using Servlets and jsps, recently i have started learning spring. Using Servlets i had built an application in which i have maintained the two objects using application context and some objects using…
0
votes
2 answers

Maven web project is not loading spring context xml file

I have created a web project then converted it to maven project, I then configure the web.xml with cxf servlet and all the dependencies in the pom.xml file but when I run application in Tomcat nothing about spring context is loaded: it behaves like…
Rachid
  • 165
  • 2
  • 5
  • 16
0
votes
1 answer

Apache HTTP Client Spring Application Context XML for Version 4.3.1

I am trying to Spring inject org.apache.http.impl.conn.PoolingHttpClientConnectionManager and org.apache.http.config.SocketConfig. I am trying to set the default number of connections, max connections and soTimeout values. We are using apache…
Farhan Syed
  • 336
  • 3
  • 15
0
votes
1 answer

Eclipse Spring MVC Project Configuration Files

I have created a Spring MVC project through eclipse. I believe I used some plugins to generate the project directory. I find here there configuration files. web.xml root-context.xml servlet-context.xml I am kinda of familiar with Spring MVC & its…
Ace
  • 1,501
  • 4
  • 30
  • 49
0
votes
1 answer

what are possible properties for transaction manager? What do they mean?

Following is my part of my applicationContext.xml I am getting lazyinitialization exceptions for simple finder methods. How can I change following xml to avoid lazy loading exceptions? I also want to know what are possible prop keys. In my XML I see…
hrishikeshp19
  • 8,838
  • 26
  • 78
  • 141
0
votes
2 answers

Spring Singleton and concurrent access

My question is : let's assume that i have a spring bean : a DAO one (it's a singleton of course) So, when we have lot of users who want to use this bean at the same time : what happens? or, for every user, spring instantiate a DAO bean for him? ==>…
Zied.Jabnoun
  • 140
  • 1
  • 2
  • 10
0
votes
2 answers

Passing MainActivity in params

I need to start AsyncTask in UI thread, but the Constructor has (MainActivity parentActivity) parametr. I don't really understand why it should be implemented and how I must pass it. Here Eclipse says "Cant resolve MainActivity to a variable." Same…
Mabjik
  • 255
  • 3
  • 5
  • 10
0
votes
0 answers

Resources in Spring/Restlet project instantiated twice per request

I have a Spring 3.1/Restlet 2.0 web application. I see that the beans for my resources are instantiated twice per request. I suspect that this is because an instance is created for both the root and servlet contexts, but I can't figure out how to…
gavinmh
  • 257
  • 4
  • 9
0
votes
1 answer

FileNotFound exception while reading file from classpath in constructor argument in Spring

I have a file mydoc.txt at the following location C:/Tomcat6.0/webapps/myapp/WEB-INF/classes/document/mydoc.txt I have to get this file location through constructor injection and read the file. public DocumentReader(String path) throws…
user3244519
  • 661
  • 5
  • 18
  • 36
0
votes
0 answers

Axis2 with Spring inside AAR cannot find Spring libs

I use Axis2 with Spring and Hibernate. All the Spring libs are located in the AAR/lib folder. But when starting the initializing method this is thrown: ...Caused by: java.lang.ClassNotFoundException:…
0
votes
1 answer

Error kundera.client property is missing for persistence

I'm using Kundera with Spring. kundera version is 2.10, with other version I get different errors. I've tryed to declare Client class in kundera.properties, but it had no effect. With version 2.8 even examples from off website doesn't work. Error…
0
votes
2 answers

How to construct Map> data structure in Spring

I'm trying to implement this Java data structure in Spring (which I am new to): Map> I tried the below (and variants of it), but am getting the following exception: Caused by: org.xml.sax.SAXParseException; lineNumber: XX;…
NYCeyes
  • 5,215
  • 6
  • 57
  • 64
0
votes
1 answer

How to make maven project recognize xml from third party jar?

In my project I use a third party jar. This jar depends on jndi.xml and jndi.properties files. Structure of the stand-alone third party jar: / |- TP.jar |- jndi.xml |- jndi.properties Inside the applicationContext of this jar -…
user811433
  • 3,999
  • 13
  • 53
  • 76
0
votes
1 answer

Upload the images out of server context and load it as image in jsp

I need to upload an image to a folder, the folder name can be configured in a configuration.properties file. The file path can be outside the application context. After uploading the image, i need to show it in as image in JSP via img tag How could…
0
votes
1 answer

PointCut not triggered in Spring Controller

I define an Aspect and its config in the application-context.xml like this:
jl276
  • 1
  • 2