Posts

Spring practice 2

package com.spring.practice; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller @RequestMapping("/hi.mandip") public class MySpringMvcAnnotationController { @RequestMapping(method = RequestMethod.GET) public String sayHi(ModelMap model) { model.addAttribute("message", "Hi All! Welcome to Spring MVC Framework. WHHHOOOOOO!!"); return "hi"; } } ------------------------------- package com.spring.practice; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller @RequestMapping("/hello.mandip") public class MySpringMvcAnnotationControllerHello { @Req...

REST API

REST - REpresentational State Transfer is a web based architecture and uses HTTP protocol for data communication. The following HTTP methods are commonly used in REST architecture: GET, PUT, DELETE, POST 1) Create "Dyanamic Web Project" - Add web.xml while creating Java Dynamic Web Project. 2) Import Jersey Jar file inside lib folder in WEB-INF. (Get Jersey Jar File from https://jersey.github.io/download.html)

Jersey JAX RS Jar

Go to: https://jersey.github.io/download.html Jersey JAX-RS 2.1 RI bundle  bundle contains the JAX-RS 2.1 API jar, all the core Jersey module jars as well as all the required 3rd-party dependencies.

Tomcat Installation Steps for Windows & add tomcat to eclipse

Tomcat is an open source java application server provided by Apache, it is the most popular application server for java environment. 1. Prerequisite Tomcat doesn’t work without java, so before installing tomcat on the machine, you should install a compatible java runtime version and setup  JAVA_HOME   environment variable. Both java and tomcat versions should be compatible so i recommend to always install the same version for java and tomcat, in this tutorial we use java 8 and tomcat 8. 2. Installation Download the windows service installer from  here :  https://tomcat.apache.org/download-80.cgi Install the downloaded file, pass all the setup until reaching  Configuration Options . here you can set the service name, the shutdown port and the running port of tomcat, by default tomcat runs on port 8080,  so i recommend to keep the default configuration as it is, you can always change these configuration after the in...

Spring Practice 1

package com.spring.practice; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; //controller class @Controller public class StudentController { @RequestMapping(value = "/studentForm", method = RequestMethod.GET) public ModelAndView studentForm() { return new ModelAndView("studentForm", "command", new Student()); } @RequestMapping(value = "/addStudent", method = RequestMethod.POST) public String addStudent(@ModelAttribute("SpringWeb") Student student, ModelMap model) { model.addAttribute("id", student.getId()); model.addAttribute("name", student.getName()); model.addAttribute("age", student.getAge...

SVN 2018

Install visualSVN server from here: https://subversion.apache.org/packages.html#windows Set Port No., Username and Password when installing. Go to eclipse marketplace to install new software. Use this video to import SVN repository and commit changes of the project: https://www.youtube.com/watch?v=BTiPePJuh6M Search visual SVN Server in laptop and start creating and importing projects Or also you can use localhost:portno in your web browser to access your repository

React JS 2018

Image
React is a front-end library developed by Facebook. It is used for handling the view layer for web and mobile apps. ReactJS allows us to create reusable UI components. It is currently one of the most popular JavaScript libraries and has a strong foundation and large community behind it. ReactJS is JavaScript library used for building reusable UI components. According to React official documentation, following is the definition − React is a library for building composable user interfaces. It encourages the creation of reusable UI components, which present data that changes over time. Lots of people use React as the V in MVC. React abstracts away the DOM from you, offering a simpler programming model and better performance. React can also render on the server using Node, and it can power native apps using React Native. React implements one-way reactive data flow, which reduces the boilerplate and is easier to reason about than traditional data binding. React Features JSX  ...