How to convert InputStream to String? There many ways to do so. We will see four ways.
How to convert InputStream to String?
Authentication “Who are you?” & Authorization “What can you do?” can be managed using Spring Security. Here we will see a simple example of using Spring Security to authenticate and/or authorize a user to access Spring MVC controller.
This is a complete example showing how to send jQuery.Ajax() POST request containing data in JSON format to the server, and how to receive this JSON content, parse it and map it into Java objects in the server “servlet” side. Also, we will see how to send the list of all received data back to the client in JSON format and how the client can parse this data and display it.
jQuery-File-Upload js library is “so far” the most elegant, smart, simple..etc js library I have used to upload files. Simply it is amazing. It supports async upload “Ajax”, multiple files upload, drag&drop, progress update and a lot more. Here we will see how to upload multiple files to Java “Servlet” app and how to deal with uploaded files using Java Servlet API or Apache FileUpload Library. Bootstrap has been used in this example to make the UI more attractive.
google-gson is Java library to convert Java object to JSON and JSON to Java object.
Copyright © 2013 hmkcode.com All Rights Reserved.