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.

learn more… | top users | synonyms

0
votes
0answers
5 views

Correct way to use spring form

I am trying to switch from html form to spring form so that I can use message properties which I think is a pretty cool feature. But I have encountered error Http 500: ...
1
vote
1answer
6 views

Injecting context into Spring MVC controller similar to Jersey InjectableProvider

I have a custom InjectableProvider in my Jersey project that does some work with the request/session to conjure up a user id that my RESTful service needs. It means I can write service methods like: ...
0
votes
1answer
23 views

Not able to resolve static resources in spring mvc using annotation

I tried to load static resources like js,css and img in Spring webapp configured using annotation but it shows 404 error for static resources. Here is my ApplicationConfig.java : public class ...
0
votes
1answer
11 views

Unable to generate a WAR file for a spring MVC application using intelliJ 13

I am unable to define a war artifact. In intelliJ, you can define artifacts in the deployment tab (see image). When I try to define the war artifact, I get this error message TomEE required to ...
0
votes
1answer
24 views

Spring bean injection throwing null pointer exception

I'm trying to inject beanB into beanA, but for some reason, spring injection isn't working. When I try to use beanA in beanB, I'm getting null pointer exception. Here is my configuration... web.xml ...
0
votes
1answer
11 views

Wrap spring controller return value before handled to MessageConverters

I am using spring 4 - RestController. Whatever I am returning from the rest controller method should be wrapped into another object before MessageConverters handles the return value. I want message ...
0
votes
0answers
11 views

RedirectAttributes Not working

I am using SimpleUrlHandlerMapping in my application. I don't want to use the AnnotationHandlerMapping because of a special reason. I need to remove <mvc:annotation-driven /> to use the ...
0
votes
0answers
8 views

Passing Data from jsp to controller in Spring mvc

I am new to Springs and I am stuck at passing data from jsp to controller What i have here is a listing page where user is allowed to click on the primary key and then that primary key should pass to ...
0
votes
1answer
28 views

@RequestMapping with @PathVariable URI is different

hi i have a problem i am learnig how to pass values with PathVariable, i have a form with a input text and a button when you press the buttom it takes you to other page and show the value but it dont ...
0
votes
0answers
8 views

spring-data-rest doesn't expose all repository

Using SpringMVC with Spring-data-rest, I created 3 entity: Dimension, DimensionValue and ProductTemplate. I then created repository to expose these 3 entities. When I run the project and I call the ...
0
votes
1answer
13 views

Unable to convert String to Date by requestBody in spring

I have the below Code : DTO : Class MyDTO { import java.util.Date; private Date dateOfBirth; public Date getDateOfBirth() { return dateOfBirth; ...
-1
votes
0answers
10 views

conflict with multiple ID when using JSTL <form:form> tag mutiple times in DOM

I have an AJAX based web application with SPRING MVC and I am using SPRING tags. In the app I am handling several forms with the same bean (the 'commandName' attributes pointing to the same bean) - ...
0
votes
1answer
17 views

How to do Multiple File Upload in Spring - Java Config

I been trying to find a example of how to do multiple file upload in Spring MVC without using XML only Java Config. So far have found nothing and a lot of people that just either want hits to sites or ...
0
votes
0answers
12 views

Mongodb driver cannot determine the spring version

Forgive my ignorance, I am a newbie to Spring, MongoDB and reflections. I recently started working on a project, where I started facing this issue. Please help. In package ...
1
vote
0answers
13 views

Spring MVC Security Contraint - web.xml

I am trying to secure my controller paths on Spring MVC as follows: web.xml <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" ...
0
votes
0answers
5 views

Can not work internationalization in spring mvc with thymeleaf

I have started a project with Spring MVC with thymeleaf. I want to that it is internationalize. I had copied official spring tutorial. But When I click tr button , words aren't changed. I am pasting ...
0
votes
1answer
22 views

Play2 template engine extension

Is there any way to write custome template tag, which when called will, retrieve some data from db and render it using some template, all this as a bypass from controller. For example I would like to ...
0
votes
1answer
11 views

unable to run spring web app on tomcat (eclipse)

I Have created a very small spring web app however cannot get it to deploy on tomcat using eclipse. I can see in log that web app gets initalised. However tomcat doesnt actually deploy it and if i try ...
0
votes
1answer
22 views

How to get the errors message with spring mvc in tomcat's catalina.out

I request a test link https://terran.gamebox.com/facebook/issueOrder.jhtml?amount=5&gameId=1&serverId=1&role=role I can see the message in page but the exception did not show in ...
1
vote
1answer
21 views

Jquery Function is not Calling onchange event in Spring MVC

I am working on spring mvc and with that i am using ajax Jquery and but i am able to add element in it. but i am not able to call jquery when i am making change event into the Dropdownbox. can i have ...
0
votes
0answers
15 views

Controller returns 406, HttpMediaTypeNotAcceptableException

I have this controller method @RequestMapping(value = { "/{name:.+}" }, method = RequestMethod.DELETE) public @ResponseBody Response doSomething(@PathVariable("name") final String name) { final ...
0
votes
1answer
26 views

Controller mapping works but jsp giving 404

I have a jersey webapp running and i'm trying to integrate spring mvc in to it. couple of breakpoints later i found that when controllers request mapping is accessible but the jsp is giving a 404. Any ...
0
votes
0answers
8 views

SpringData: How Map AngularJS page with @RepositoryRestResource?

I follow this tutorial about Data Accessing: http://spring.io/guides/gs/accessing-data-rest/ So, I have this structure http://i.stack.imgur.com/wUnrx.png "Project" is the Model package Serveur; ...
0
votes
0answers
37 views

Accessing another java service application in spring mvc

I'm trying to communicate with the Network Element(Switch) from my Spring MVC web application through a java application (which is like an agent or mediator between web app and NE). This agent or ...
0
votes
1answer
25 views

how to add spring security in login form

I have a login page with email address and password. How can i use spring security for the secure login. I'm don't understand how to do it..? In my web app the first page is the login page with with ...
0
votes
1answer
8 views

Thymeleaf, Spring MVC Missing the form backing object on form submit: null

Basically, the form-backing object from a form submit is always null. Can anyone see why this is so? I have a simple controller that displays a list of devices. The devices can be selected and ...
0
votes
1answer
33 views

MultipartFile - how to detect real path of file on user's machine

I'm facing the following problem: I use MultipartFile to sumbit an image with some other information like email etc. Consider a situation when we have two fields: input = text with email and input ...
1
vote
1answer
14 views

How to configure Spring Security with already existing WebApplicationInitializer?

I am doing a web site project with Spring/ Spring MVC I learned how to configure a spring with the java classes and annotations approach, which by far is better than the XML. Now I want to use ...
0
votes
0answers
22 views

Dynamic client side validation using server side rules with Spring/RESTEasy

I've a RESTful web applications where all the server side validations are in place. For example, there is a request object for creating saleOrder: public class WsSaleOrder { @NotNull ...
5
votes
2answers
40 views

How to prevent making a empty zip file

I am producing a zip of image files.But if image does not found then it generates an exception like java.util.zip.ZipException: ZIP file must have at least one entry . I am handling the exception but ...
1
vote
0answers
23 views

Validation in service Layer with Spring MVC

I would like to know how to perform a clean code to organize validation in my service layer. So, I have this service: public interface PersonService { public Person getPerson(int idperson); ...
0
votes
1answer
27 views

Dynamic URL from database and MVC in JSP

I am learning JAVA and Spring Framework. I wanted to know that is it possible in java to create Dynamic URL in spring framework using values from url and fetching from database. I am trying to make ...
0
votes
2answers
27 views

Spring Security User Information

I have a quick question in regards to Spring Security and obtaining further information(Instance variables) for the current logged in User. By default, without the necessity to write your own ...
0
votes
0answers
18 views

Why can`t deploy spring mvc application on tomcat in jar file

I wanna deploy a small Spring MVC test project on Tomcat and it works fine if I deploy it in war file. Someday I try to separate the java source from web project to a independent java project and ...
0
votes
1answer
29 views

Security configuration with Spring-boot

I created a Spring Security configuration class for Spring-Boot. My login page has resources css, js and ico files. The resources are getting denied for security reasons and redirected to login page ...
1
vote
0answers
9 views

architecture multilayered vs mvc

I'm developing a website using spring mvc , and I have to specify the conception of my application. I have these components in it : Controller Domain object model Service Repository DTO View Is ...
0
votes
1answer
10 views

spring hibernate handle value not found

What is the best way to handle NullPointerException in spring and hibernate? My methods in dao layer current surround with try catch block and it looks quiet messy and abundant. I read some article ...
0
votes
3answers
33 views

Dependency injection with Spring fails

I am using Spring4. I have 3 classes: MyController, ADao and BDao. viewAs() method in MyController class calls getAs() method in ADao, getAs() method from ADao calls getB() method in BDao. ...
0
votes
2answers
27 views

how to pass values between pages using thymeleaf in a spring mvc web application

i have a string variable that i create in a controller class and i want to print it in a jsp page using this ${time} my code work if i dont use a thymeleaf view resolver but if use one it dont ...
1
vote
1answer
19 views

Maven tomcat7 deploy integration tests failure

I'm using Spring Tool Suite 3.5.1 to develop a Spring Roo 1.2.5 project. I have generated entities (without Active Record) with EclipseLink (JPA), services (implementations and intefaces) and a simple ...
0
votes
0answers
21 views

Bean property 'eraseCredentialsAfterAuthentication' is not writable or has an invalid setter method

I am running a grails app version 1.3.7. Grails compile is good but when I do grails run-app, I get the following error. Any help on why this is thrown? ERROR context.GrailsContextLoader - Error ...
0
votes
1answer
11 views

SpringMVC Request method 'GET' not supported?

It is a very simple code, that I am working on to get started with Spring MVC, I have tried every option to solve this problem, but I couldn't make it. The Code runs fine to display the ...
0
votes
1answer
19 views

How to use JSoup to grab a specific value?

I'm trying to parse html text to grab a specific value after a keyword. For Example on the code below: <table> <tr> <td class="odd">TW-Central</td> <td ...
1
vote
0answers
5 views

Error: tomEE required to support EAR/EJB deployment error message

I'm attempting to configure a spring MVC app so it builds a war file when the application is deployed. When I add the examqa:war artifact, I get the following error message (seen at the bottom of ...
0
votes
1answer
22 views

Embedded Jetty and Spring MVC not mapping index.jsp

I am relatively new to Spring MVC, and have a working knowledge of Embedded Jetty. We have an existing Spring MVC webapp which I can compile into a war and drop into Tomcat, and it works fine. However ...
0
votes
2answers
55 views

Spring servlet not available

I am developing a Spring MVC based application with Maven and Hibernate. When I try to run it on Apache server, Apache server gives me an error as "Spring Servlet not available" on the 2nd line. Here ...
0
votes
0answers
13 views

Spring MVC + Thymeleaf Layout - best practice issue

I'm using Spring Boot and Thymeleaf Layout. I put HTML files into src/main/webapp/WEB-INF. I have a layout.html which contains: .... <div layout:fragment="content"></div> .... And I ...
1
vote
0answers
37 views

Spring optional @PathVariable?

Is it possible to somehow get a hold of a @PathVariable in a @ControllerAdvice given that the PathVariable is only present in some requests? If this was in a Controller, I could write 2 different ...
0
votes
1answer
11 views

Continuous polling of output using spring ,rest and angular js

I am working on a web application the frontend of which is developed in angular js and spring mvc and which consumes the data from a RESTful webservice. There is a scenario wherein the REST webservice ...
0
votes
1answer
20 views

How to read unique key in spring for every request

I have requirement to access a particular variable in every service and dao classes. This variable is generated in controller class and passed to service layer and dao layer. e.g. in Service layer : ...