0
votes
0answers
5 views

Akka Peer-to-Peer (Remoting) vs. Client-Server (Websockets)

My app requires bidirectional continuous communication with a high volume of clients (which are java agents installed on user machines) in addition it includes a spring mvc webapp which provides a ...
0
votes
0answers
3 views

Spring security login on Db not working and now giving any error

after studying Spring security login with username and password set inside the security-config file, I'm trying to study a login system to query a DB. My problem is that I just get the message "Bad ...
0
votes
0answers
13 views

Spring map one url to another without a redirect

What's the best way in a spring web application to allow the root url / to alias a page index.html? The premise is a webjar that contains all web resources, css files, javascript, web pages and an ...
-2
votes
0answers
12 views

How the solve this issue? am getting the error while sending an automatic email when user is registered

How to resolve this issue. am getting the below error when am sending the mail when user is registered Sorry, the email was not sent because of the following error: Authentication failed; nested ...
0
votes
1answer
13 views

security util using SecurityContextHolder in spring application

in my spring application I have some aspects for controller methods where I do some security checks. beacause of I need several checks more often I wrapped them into static helper methods of a ...
0
votes
1answer
11 views

How can I retrieve long response from mongodb?

In Spring mvc + mongodb application, I have 4 lakh documents. Assuming if I need to return 3 lakh documents when a query is made, how can I do that? Following is the stack trace, HTTP Status 500 - ...
0
votes
0answers
20 views

Spring Web MVC Environment @Autowired To Get Only System Property throws NullPointerException

i'm using Spring 4.1.1.RELEASE and i got NO properties file, just in case i want to set some runtime variables by System.setProperty() and then get it by Spring via Environment variable, but it says ...
0
votes
0answers
13 views

Bind abstract class attribute Spring mvc

Let´s say that I have an abstract class A, that class is inside my MainClass, then I have the implementation of this class B and C. Using ModelAndAttribute I render in some scenarios MainClass with B ...
0
votes
1answer
21 views

append dispatsher servlet mapping to url

I am trying to create a Spring MVC app, I have multiple dispatcher servlets in my web.xml like this: <servlet> <servlet-name>one-servlet</servlet-name> ...
0
votes
1answer
22 views

Spring Form Submit using Java script

I am trying to submit a spring form based on confirm condition using java script. following is my Controller @RequestMapping("/loadPage.do") public ModelAndView loadPage() { ModelAndView ...
0
votes
0answers
34 views

Why am I getting java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet error?

I am trying to learn Spring MVC. So far I have done the following: web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
0
votes
0answers
18 views

Java Session ID Not Found in Servlet

I've got a Java issue that has been baffling me. Below is my quick explanation of the flow of this web app. A user clicks a button on a jsp page which calls the server The server code ...
0
votes
2answers
20 views

How to use SpringApplicationConfiguration or ContextConfiguration to load smaller app portions

I am working on a spring-boot based project, which is fairly new to me. At present, I am using the @WebApplicationContext annotation to get any of my Junit test to run, as I cannot seem to get the ...
0
votes
0answers
8 views

WebApplicationInitializer not detected in Weblogic 12.1.3

I've just upgraded from weblogic 12.1.2 -> 12.1.3 and I am having problems to get de application working. I have detected where the problem is, and I am not sure if it is a problem of ...
0
votes
0answers
10 views

Server HTML pages with Spring 4

I am using Spring 4, Backbone with HTML pages. HTML page is at ROOT of web-app. I am trying to server html page using the ROOT of my webapp. localhost:8080 rather than using ...
0
votes
0answers
24 views

Spring MVC: Bind Input field to multiple properties

I am trying to get Spring MVC to bind the value from one input field to multiple properties. My use-case is a forum, that contains a form to create a new topic. That dialog actually create a topic and ...
0
votes
1answer
29 views

Am using Trigger to get auto increment string in my sql to ID

Am using Trigger to get auto increment string in my sql to ID. POJO class: @Entity @Table(name="CUSTOMER") public class Customer implements Serializable{ private static final long ...
0
votes
0answers
23 views

When the “context” attribute is specified, values of both “context” and “url” must start with “/”

When I try to access my application home URL localhost:8080/CP/index.do am getting the below stacktrace javax.servlet.ServletException: javax.servlet.jsp.JspTagException: In URL tags, when the ...
0
votes
1answer
32 views

No mapping found for HTTP request with URI (spring 4.1 annotation configuration)

first of all, please don't lock this thread, please. I've read all the questions, and they still cannot solve my problem. I'm studying how to use annotation on spring without configuring xml files. ...
0
votes
1answer
21 views

Spring MVC @ModelAttribute Not Binding Form

I am trying to POST to a Spring MVC controller method via ajax. Using Chrome's developer tools, I can tell that the values from the form are being sent, but in the method, the form values are null. ...
0
votes
1answer
16 views

Coudn't hit the contextroot in Spring MVC

I am a newbie to Spring MVC, trying to develop a small application. My problem is when i try to hit the application with localhost:8080/MyFirstApplication I get an error saying request resource is ...
0
votes
2answers
24 views

How to remove auth request in Spring?

This message says: Required authorization. To access on the server http://localhhost:8080 you should enter login and password. Server message: Spring. I'm using Hibernate 4, Spring 4 and Gradle. ...
0
votes
1answer
23 views

Spring Roo project failed to run with Spring 4.1

I have created a spring project with spring roo 1.2.5 and I changed the in the pom.xml file to 4.1.1.RELEASE. The project failed to start with the following error from the tomcat 8 server: ...
0
votes
1answer
17 views

Custom view resolver missing in Spring test

I am doing integration tests of my Spring web app and need to verify generated HTML pages. I am testing withing full Web Application Context but there is a problem with custom view resolver (JTwig). ...
0
votes
0answers
34 views

Using Spring java , can you able to save instance fields thread-safely?

Is it possible to batch requests together, so they are done safely. For example: Trying to save all buying/selling orders to group each users orders within 10 minutes. This means you need to store ...
1
vote
1answer
18 views

Spring security with google Oauth

I have been working on a web application in which I have used Google oauth and Spring MVC. I have implemented the google oauth in which the user is directed to the desired URL if the user is ...
0
votes
1answer
18 views

some special chinese character in spring requestMapping params can't access to the method

While there are some Chinese characters in SpringMVC RequestingMapping params. The method can't be accessed, but some others Chinese character can access to the method. For example, the method is as ...
0
votes
1answer
57 views

How can I filter the result given by c:forEach using the value selected in a drop down?

Following is my jsp code. <c:forEach items="${nameList}" var="studentList"> <tr> <td style="padding-bottom: .5em;"> <a id="student" ...
0
votes
2answers
44 views

Referring css files in Spring project

I'm referring my resources in my Spring project as below dispatcher-servlet.xml <mvc:resources mapping="/resources/**" location="/resources/" /> jsp files <script src="<c:url ...
0
votes
2answers
58 views

Spring MVC Form Validation Does Not Work

I am following this guide to use Spring Form Validation but I cannot get the form to validate in my own program. I follow everything exactly how it's presented in the guide it just doesn't work in my ...
0
votes
1answer
43 views

Cannot update after a successfull save

I'm relatively new at Spring MVC. In my uploadPub.java file dService.saveDocument(doc); method runs successfully. I call it to get an Id for the record. Then i want to update the same record with new ...
0
votes
2answers
32 views

Spring Framework MVC 4, JPA, Atmosphere-jersey, Real time Notifications

I need to make push notifications on our webapp. Currently we built the app using Spring Framework MVC in Maven using Spring Tool Suite. All features are done but we need to add this real time ...
0
votes
1answer
31 views

spring security 3.x + mvc - exception handling

I am new in spring security 3.x so maybe my question is rather silly. Use case: Login page, customer enters wrong data (e.g. wrong pasword), then should some error message be displayed on login page ...
1
vote
1answer
986 views

Sending message to specific user on Spring Websocket

How to send websocket message from server to specific user only? My webapp has spring security setup and uses websocket. I'm encountering tricky problem trying to send message from server to specific ...
1
vote
1answer
421 views

spring - jstl - Error 404 - The requested resource is not available

When I want to access on my website, I've the following error : The requested resource is not available. I noticed that the problem is in the mvc-dispatcher-servlet.xml file on the line ...
1
vote
1answer
858 views

Spring security does not parse xml

I have a problem that I can't using spring mvc 3.2.4 and spring security 3.1.4. They throw and exception that they can't parse spring-security.xml. This is my sample code: Controller: ...
2
votes
2answers
2k views

Spring Rest POST Json RequestBody Content type not supported

When I try to post new object with post method. RequestBody could no recognize contentType. Spring is already configured and POST could work with others objects, but not this specific one. ...
2
votes
1answer
2k views

Changing file size limit (maxUploadSize) depending on the controller

I have a Spring MVC web with two different pages that have different forms to upload different files. One of them should have a limitation of 2MB, while the other should have a 50MB limitation. Right ...
5
votes
2answers
11k views

logging with AOP in spring?

I am new to spring in my office . So there is no guidance for me. I need to implement the logging with the AOP using the log4j. I have implemented the logging without AOP in basic spring MVC ...
1
vote
1answer
2k views

Syntactically incorrect request sent upon submitting form with invalid data in Spring MVC (which uses hibernate Validator)

Login form: <f:form class="form-horizontal" method="post" action="/login" commandName="logindata"> <fieldset> <legend class="text-info">Login</legend> ...
2
votes
2answers
8k views

java.lang.ClassCastException: com.sun.proxy.$Proxy0 cannot be cast to org.andrea.myexample.myDeclarativeTransactionSpring.StudentJDBCTemplate

I am trying to implement this tutorial about Declarative Transaction in Spring Framework application but don't work because when I try to execute the MainApp class to test the application behavior I ...
27
votes
2answers
16k views

@RequestParam vs @PathVariable

What is the difference between @RequestParam and @PathVariable while handling special characters? + was accepted by @RequestParam as space. In case of @PathVariable, + was accepted as +.
6
votes
2answers
5k views

Spring mvc 3.1 integration tests with session support

I'm using the new spring-test in the 3.1 version to run integration tests. It works really well but I can't make the session to work. My code: @RunWith(SpringJUnit4ClassRunner.class) ...
11
votes
6answers
48k views

How to resolve “failed to lazily initialize a collection of role” exception?

I have the problem with the "org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: mvc3.model.Topic.comments, no session or session was closed" Here is the ...
1
vote
2answers
4k views

Spring MVC form with foreach

I have a question about Spring, particularly the MVC component. I have a jsp page which contains the following code. <form:form modelAttribute="sentenceModelAttribute" method="POST" ...
9
votes
4answers
1k views

Best practices for sharing web-tier code (Controllers and JSPs) between similar web apps

I'm working on rewriting some aging web applications. There are two in particular that are very, very similar, yet share no code today and I aim to fix that. The projects are being rewritten with ...
1
vote
1answer
4k views

List of Objects as RequestParam in Spring MVC

I want to send a list of object id's (generated by the user selecting checkboxes) by POST to an action, so I can get a java.util.List<MyObject> converted using an MyObjectEditor. So, is it ...
6
votes
2answers
15k views

Spring Security custom filter

I would like to customize Spring security 3.0.5 and change login URL to be /login instead of /j_spring_security_check. What I need to do, is to to allow login to "/" directory and to secure ...
72
votes
3answers
42k views

Multiple Spring @RequestMapping annotations

Is it possible to use multiple @RequestMapping spring annotations in a method? Like: @RequestMapping("/") @RequestMapping("") @RequestMapping("/welcome") public String welcomeHandler(){ ...
9
votes
3answers
4k views

Benefits of using JSTL vs Velocity for view layer in MVC app?

I'm currently building a Spring MVC application. I was looking to use JSP pages with tag libraries for handling the view layer and formatting of the HTML, but I've come across another group in my ...