I've been having loads of problems trying to get a Spring/Hibernate web application to generate Jasper Reports. I have a model populated as a HashMap and the report will display the single entries fine: language, format, date, etc. by getting a parameter that corresponds with a key in the model e.g.
model.put("language", "en"); - java
...
I am running queries against an Oracle 10g with JDBC (using the latest drivers and UCP as DataSource) in order to retrieve CLOBs (avg. 20k characters). However the performance seems to be pretty bad: the batch retrieval of 100 LOBs takes 4s in average. The operation is also neither I/O nor CPU nor network bound judging from my observatio...
I use the following spring application context:
<!-- Hibernate session factory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<!--
<prop key="h...
Hi
I am brand new to Spring web MVC. I am trying to create a simple 1 paged site that will check the users browser and display the current theme for that browser.
If its a mobile app, I need to allow the user a button to switch to the regular site.
Also the current theme for mobile and non-mobile is stored in a database, which inclu...
I have a web application running in tomcat where I'm using a ThreadPool (Java 5 ExecutorService) to run IO intensive operations in parallel to improve performance. I would like to have some of the beans used within each pooled thread be in the request scope, but the Threads in the ThreadPool do not have access to the spring context and ...
How can I create a bean of type Class?
I found a way using getClass() but that requires an instance and cannot be used via factory-method since it is not static. It also requires an extraneous bean be created for this express purpose:
<bean id="foo" class="Foo" />
<bean id="fooClass" factory-bean="foo" factory-method="getClass" />
T...
I have what should be an easy issue to solve, but I'm having no luck.
In my servlet-servlet.xml file, I have the following beans (in addition to others):
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<prop...
As you may know, properties are usually written in files in key=value format but can also be written in XML format.
The question is if (and how) can Spring's ResourceBundleMessageSource be configured to load properties in XML format.
...
I want to scan all the classes in a package that that are subclasses of the particular class.
Then I want to take these classes and for each of them instantiate a bean of same type, using the class as a property.
Then I want to gather all these anonymous beans and put them into collection. Is it possible to configure spring context in XM...
I want to define in my Spring XML context a bean that has a property of the type List of classes: i.e. List<Class<?>> classes
How do I send that bean a number of classes, say java.lang.String and java.lang.Integer?
The list needs not be reusable, i.e. I will not refer to it in another bean.
...
hi there,
has any one using Spring MVC with Jquery!
i have got a strange problem when handling Spring MVC tags with Jquery.
i used tags of spring MVC to get radiobuttons binded.
<form:form name="Form1" method="post" action="Form1.do" commandName="Page1Command">
<form:radiobutton path="group" value="TTSE" id="DevGroup_TTSE" />
<for...
I have a spring mvc application and we run tests with it using jetty.
Sometimes the loading of the context totally fails, because bad xml or because Class Not Found exception or because a bean throws an exception in the constructor, setter or init method.
In such a case I would like to to stop the application with System.exit(1) or tak...
I have a spring context xml file with this
<context:property-placeholder location="classpath:cacheConfig.properties"/>
<bean id="cacheManager"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="cacheManagerName" value="cacheName"/>
<property name="shared" value="false"/>
<property name=...
For example, with the URL
foo.com/bar/99
99 will be available directly to a method in the controller as an argument. The controller is mapped to /bar
For anyone familiar with ASP.NET MVC or Django, this would be similar to routes.MapRoute in the former and using (?P\d+) in urlpatterns in the latter.
It would be possible to process ...
What I am looking to accomplish is a filter (or similar) that would handle the authentication model for my Spring MVC application. My application is also hosted on Google App Engine.
The authentication on this application can tend to be very dynamic and the permissions are not something that would fit cleanly into a predefined Role stru...
Hi guys,
While a lot of posts have been written on the subject of Spring's OpenSession/EntityManagerInViewFilter, I couldn't find any that mentions its flaws. From what I understand, and assuming a typical layered web application architecture using a @Transactional service layer, the filter works as follows:
The filter intercepts a se...
Is there a public Maven repository that contains spring-core 3 yet?
I can find 2.5.4 all day long but not 3. If there answer is yes, please include the location in the answer.
...
What is the best way to start with spring framework, I've already got a book Spring in action 2nd edition august 2007, but here is the thing, I'm missing some general knowledge concerning this framework and java. I've started reading the book but its not very clear to me, its clear what the author is trying to accomplish but I can't seem...
I have a java web application wired using Spring on Tomcat.
I need a way for a user to initiate a background process in the server and return a response to the user without waiting for the background process to complete.
The background process is programmed in java and integrated with my application.
Since i am using tomcat JMS is no...
Using Spring 1.2.1 and oracle.jdbc.pool.OracleDataSource 10.2.0.3.0 I sometimes get a stack trace like below. I think it is caused by the connection pool being full. Does anyone know the cause for sure? Also do newer versions of spring or Oracle JDBC handle this better?
java.lang.NullPointerException
at org.springframework.jdbc.c...