Based on the Model-View-Controller (MVC) pattern, Spring MVC helps you build web-based applications that are flexible and decoupled from the underlying view technologies.
0
votes
0answers
7 views
How to clean up mocks in spring tests when using Mockito
I'm pretty new to Mockito and have some trouble with clean up.
I used to use JMock2 for unit tests. As far as I know, JMock2 preserves the expectations and other mock information in a context which ...
1
vote
0answers
20 views
Spring Security: how to use the hashed password stored in the database as the salt of the password encoder
I'm new to Spring (and to web development in general), but I've managed to create a simple web application and now I'm trying to add authentication support to it so that users are required to sign in ...
-3
votes
1answer
29 views
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class when new class is added [on hold]
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.eman.itsm.eaclm.service.util.BulkImportASA.java] for bean with name 'asaFileImport' defined in URL ...
0
votes
1answer
33 views
How to automatically reload messages.properties files in Java/Spring?
I've been working on an interntaional website using Java/Spring using #springMessage() tags and message.properties files. See my recent question: In Java/Spring, how to gracefully handle missing ...
2
votes
2answers
41 views
In Java/Spring, how to gracefully handle missing translation values?
I'm using Java + Spring for an international website.
The 2 languages are ZH and EN (Chinese and English).
I have 2 files: messages.properties (for English key/value pairs) and ...
2
votes
1answer
14 views
Spring MVC Controller Exception Test
I have the following code
@RequestMapping(value = "admin/category/edit/{id}",method = RequestMethod.GET)
public String editForm(Model model,@PathVariable Long id) throws NotFoundException{
...
0
votes
0answers
12 views
406 Not acceptable Error in jquery autocomplete
I am trying to use jquery autocomplete with spring mvc
I am using spring 3.2.3 jars along with
jackson-mapper-asl-1.9.7
jackson-datatype-json-org-2.0.2
jackson-core-asl-1.9.7
jackson-core-2.0.2 for ...
0
votes
1answer
24 views
How to handle back button using spring security
I am using spring security and i was wondering how to solve this back button or problem of the browsers.
The thing is that after i login , when i click the back button . I am coming to the login page ...
0
votes
2answers
27 views
Spring return JSON / XML / JSON-P based on suffix
I have set up my controller so that it will return the data in the format as requested through HTTP Accept-Type header set by the client:
<bean ...
0
votes
1answer
23 views
How to use HTML5 tags and attributes in spring MVC
Recently learnt HTML5 new tags and attributes. But how will i be able to use with Spring MVC. Till now all spring mvc jsp pages does not have support for HTML5.
For example if i want to use ...
0
votes
1answer
18 views
Type The prefix “mvc” for element “mvc:annotation-driven” is not bound
I have googled as much as I could ... all seems right with this xml, but I am still getting the error. Please help.
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans
...
0
votes
1answer
12 views
where is the svn repository for all the spring view technologies
Looking into spring view technologies, trying to reproduce very custom views.
Does any one know where to get the spring svn repository url for all the view technologies?
Thanks for the help in ...
0
votes
1answer
18 views
@Autowired field is null in one SpringMVC controller while others work
I've a quite simple and classic page with a Spring MVC controller and a jsp (the JSP is not relevant here):
@Controller
public class PlayListListController extends BaseController<PlayList> {
...
0
votes
0answers
9 views
Dynamically adding a list of bean references to bean definition
I'm trying to dynamically register some spring beans in my ApplicationContext by using the ApplicationContextAware interface. I'm using the BeanDefitionBuilder to build the bean definitions and I ...
0
votes
1answer
20 views
Is it possible to create multiple cache stores using Spring's cache abstraction with redis?
I'm developing a web application using Spring MVC and I'm using using spring's cache abstraction with Redis to cache my database queries. But I am not able to create multiple cache stores using ...
0
votes
1answer
41 views
java.lang.NoClassDefFoundError: scala/collection/immutable/List$
First of all I want to mention that I'm new to java development.
I created Spring project "bookstore" and referenced Scala "businessLayer" to it:
When Scala project uses only java.util.List and ...
0
votes
0answers
11 views
Having the pre and post update of a hibernate object at the same time
I need to audit certain db fields. The audits will be stored in an Audit table with messages similar to the following.
Customer <field> has been updated from <previous field value> to ...
0
votes
0answers
17 views
The request sent by the client was syntactically incorrect STATUS:400
I am using Spring bind property to submit Data into Database.
I have used a button on click on this action part is:
/something/submit
And For this I have used request mapping
...
3
votes
2answers
48 views
Creating JSP templates (views) dynamically from Database
I am developing an application using Java and Spring MVC. As usual, stored one JSP file in /WEB-INF/view/ folder which is working as the View for all the requests.
Normally we have this JSP ...
-1
votes
1answer
9 views
Sprin mvc mapping
In servlets for mapping I use @WebServlet("/path")
It means, that I can write in form's action "/path" and button click would be handled by my servlet.
In spring mvc I map controller's method as
...
0
votes
0answers
21 views
@ManyToMany IllegalArgumentException calling getter id
I'm having a hard time solving this exception
org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.mypackage.campaign.domain.Promotion.id
at ...
1
vote
2answers
24 views
Converting Buffered Image to MultipartFile
Using Spring MVC & JSP
My scenario-
User uploads image file (gif,jpg,png) and if the file doesnt match dimensions then file needs to be scaled and disaply on jsp as preview.
I have ...
0
votes
1answer
11 views
Spring MVC: how to require POST parameters in the request body and ignore query string parameters?
I have a simple controller that provides an authentication web service. It accepts username and password as POST parameters and returns a JSON result. Because password is being submitted, I don't ...
0
votes
0answers
34 views
SpringMVC controller: how to stay on page if form validation error occurs
I have next working code in my SpringMVC controller:
@RequestMapping(value = "/register", method = RequestMethod.GET)
public void registerForm(Model model) {
model.addAttribute("registerInfo", ...
0
votes
1answer
11 views
Load data on server start up and refresh on regular time interval using spring 3.1
I am new to spring framework. I would like to pull data from database and set that data in application context. When ever we change data in database according data should be refresh. Please help me ...
5
votes
1answer
32 views
Cleanest way to call multiple AuthenticationSuccessHandlers?
I have a java webapp using Spring 3.1. My Spring security context defines multiple authentication filters, each corresponding to a different authentication path (e.g. username/password vs. Single Sign ...
0
votes
0answers
10 views
Set values in servletContext using springs
I am using spring 3.1 and trying to set object in servletcontext and access these in one of interceptor.But i am getting null. Here you can see the code.
/**
*
*/
SiteDetailsHelper.java class ...
0
votes
0answers
22 views
Spring MVC: No conversion from text to application/xml
Getting this error while posting form values with jQuery POST. Data reaches to the controller but response comes back with this error message.
Request:
$('form').submit(function () {
...
0
votes
0answers
2 views
how to handle cvc-complex-type.4: Attribute 'base-package' must appear on element 'context:component-scan'
I am new to spring and hiberent my spring config file throws Exception
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
...
0
votes
0answers
11 views
how to list open sessions on a java app using acegi and spring mvc?
On my web app, I need to manage user sessions by listing open sessions, kicking one user (close the user's session), kicking all users, etc.
The app uses Spring MVC and acegi. At this moment, ...