Search Posts

Category: java

Spring MVC + REST + AngularJs 404 Not Found

Facing problem in calling a REST Controller with Json. Getting 404 error. But not able to find the problem. The Controller is defined. No Spelling mistake. P.S. To use REST do we need configuration in web.xml or servlet-config.xml . I have jackson-databind and jax-rs in dependencies. NewBie in Spring Angular . Need help. I am trying to call ‘/addintoexp’ controller File File : expense.js ‘use strict’; var addexp=angular.module(’emsExpenseApp’,[ ]); addexp.controller(‘addExpCtrl’,[ ‘$scope’, ‘$http’, ‘$location’ ,function($scope,$http,$location){ console.log(“Reached […]

How to Process chunked Http response sent from play-java in angularJs with $http post

I have a huge data (List) to send as a http response from play-java to frontend. I am sending the response in chuncks as shown in below snippet. Chunks<String> chunks = StringChunks.whenReady(out -> callOutChannelAndWriteInChuncks(out,response)); return ok(chunks); How to access the complete response sent as chuncks using angularjs $http service. angular.module(‘myApp’).factory(‘ApiFactory’, [‘$http’, function ($http) { function patchDeferred(defer) { defer.always = function (callback) { defer.then(callback, callback); }; return defer; } return { callApi: function (dataa) { var […]

the request sent is not recognized by the sprig controller when parameters are sent as RequestBody and RequestParam

I am working on spring application with angularjs. I am trying to send JSON object as a RequestBody and a RequestParam information from angularjs to spring controller, but the spring controller is not recognizing the request sent from angularjs. js: (function () { ‘use strict’; var myApp = angular.module(‘app’); myApp.controller(‘fileWithJSONController’, function ($scope, fileUploadService) { $scope.uploadFile = function () { var file = $scope.myFile; var uploadUrl = myApplnURL + ‘/showInfo/getInformationTest’;”, //Url of web service $scope.emailData = […]

Why does this error occur? An established connection was aborted by the software in your host machine

Stack:AngularJS v1.6.5, java 8, spring boot, tomcat. After about 1 week of work , the application not response with such an error. Why this happening? Frontend: $http({ url: ‘find’, method: “post”, data: { ‘month’ : $scope.month,’year’ : $scope.year, ‘payTime’ : $scope.payTime,’waitTime’ : $scope.waitTime,’scanTime’ : $scope.scanTime,’gbNumber’ : $scope.hyper} }) .then(function(response) { .. }); } Backend: @RequestMapping(path = “/find”, method = RequestMethod.POST) public ReportResponse find(@RequestBody RequestSearch params, HttpServletResponse response) throws DataNotFoundException { … } Stacktrace: 2018-04-02 09:37:44.738 […]

unable to send multiple file attachments information to spring controller – showing status:500 in browser console

I am trying to pass the attached files(multiple/single) information to the spring controller from agularjs controller. I could able to pass single file information to the sprig controller, but when user selects multiple files and click on send it is showing error on browser console. Error message: Response data: {“status”:500,”error”:null} Other issue i saw is even when multiple files are selected only the last selected file information is shown near Choose files button instead of […]

Path customization for a File Uploader

I’m using Fineuploader in an html page (with AngularJS) from an application based on JHipster. When I put a file inside my dropzone, it send it to a folder using a path which is predefined in the code. I would like to be able modifiy this path by using information contained in a form BEFORE making the uploading. My idea was to submit this path in a form and then update the path variable before […]

Allow Users To Select IP Addresses by Country/State

I want to allow users to create black/whitelists based on location instead of typing out email addresses manually. Is there any way for me to allow users to select a list of IP’s based on location? For example, if a user wants to blacklist everything outside of PA, or blacklist Canada, how can I allow them to do that? Using Javascript and angularjs on the frontend, with Spring Java on the backend Source: AngularJS

Next Page »