JSP Servlet with AJAX Example

JSP Servlet with AJAX Example Ajax is a great feature implemented almost in all the websites in some way. It gives really a very good user interface, since things are loading/populating without refresh. It is commonly used in username availability checking, register/login page db level/business level validations etc. We are going to use Ajax with JSP and servlet to calculate […]

 1,194 total views

» Read more

EMI Calculator using JSP, Servlet and Bootstrap

EMI Calculator using JSP, Servlet and Bootstrap: Designing a responsive website reduces the startups to invest separately on android and ios apps. Here we are writting a very simple web application for emi calculator using JSP, Servlet and bootstrap. We used bootstrap in this to integrate responsiveness with JSP pages.     Requirement: Download bootstrap CSS and JS files from […]

 2,710 total views

» Read more

Pass values from one jsp to another jsp file

Pass values from one jsp to another jsp file: Form values from one jsp can be sent to another jsp file with action parameter in form and getParameter method in the second jsp file. Things to remember: Mention the jsp2.jsp file in the form action of jsp1.jsp file. In jsp2.jsp file use getParameter() method and pass the name of the […]

 1,059 total views

» Read more

Installing Maven in eclipse

Installing Maven in eclipse: Maven can be installed in eclipse by two ways, 1. Through eclipse marketplace [Help -> Eclipse Marketplace] Search M2E or Maven Integration for Eclipse    M2E – Maven Integration for Eclipse then install this package. 2. Install New Software [Help ->  Install New software] Enter the below URL and select all then click next and finish […]

 1,389 total views,  2 views today

» Read more

JSON in Servlet with Ajax call

JSON in Servlet with AJAX call

JSON in Servlet with Ajax call: JSON is a amazing alternate for XML to pass/transfer the informations. It is required to know how to handle JSON in servlet. In servlet it can be handled like this, [plain] request.setCharacterEncoding("utf8"); response.setContentType("application/json"); // json is the JSON object. response.getWriter().print(json); [/plain] But if you want to call your servlet through ajax, then we should […]

 1,479 total views

» Read more

clicked value passing from one jsp to another jsp

Create the first jsp named main.jsp and paste the below code,   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <html> <head> <title>agn</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="GENERATOR" content="Rational Application Developer"> </head> <body> <!–<iframe src="http://www.w3schools.com"> <p>Your browser does not support iframes.</p> </iframe> –> <a href="/ToCapitalLetter?a=javadomain">click me</a> </body> </html> Create a servlet named ToCapitalLetter.java and […]

 1,180 total views,  2 views today

» Read more

spring mvc hello world example step by step

Spring hello world…!!! Step 1:  Create a dynamic web project named “JavadomainSpringMVC”. Step 2: Download and add the below mentioned spring jar files to lib folder which is in WebContent/WEB-INF/lib. Required Spring jar files: 1. commons-logging-1.0.4 2. jstl-1.2 3. org.springframework.asm-3.1.0.RELEASE 4. org.springframework.beans-3.1.0.RELEASE 5. org.springframework.context-3.1.0.RELEASE 6. org.springframework.core-3.1.0.RELEASE 7. org.springframework.expression-3.1.0.RELEASE 8. org.springframework.web.servlet-3.1.0.RELEASE 9. org.springframework.web-3.1.0.RELEASE 10. spring-web-3.2.1.RELEASE Download all jar files Step 2: Create […]

 1,338 total views

» Read more

Jelastic to host your java web application for free

Is it ? Yes Now you can host your java website with database connection for free. Who all are providing java web application host for free ? Many sites providing us to host the free java web application, But rightnow I checked only http://jelastic.com/ Jelastic free java web application steps: 1. You have to create the free account in jelastic.com […]

 1,638 total views,  2 views today

» Read more

Session Validation in Ajax

Session validation in servlet: Usually if it is a servlet we can simply check if(session != null ){ // Business code }else{ // Redirection code }   Session validation in ajax: If you call the servlet from ajax then the above steps won’t work, since ajax gets everything as response, so the code which you have written in the else […]

 1,102 total views

» Read more

Passing clicked value from jsp to jsp/servlet

Passing value from jsp to jsp/servlet: We can pass the value from jsp to servlet using, request.getParameter(“text”); //servlet code to get the jsp value where text is the name of the input fields (text field). Passing clicked value from jsp to jsp/servlet: We have to pass the clicked value as get parameter in the href link like below, <a href=”/Myservlet?input=javadomain”> […]

 2,791 total views,  4 views today

» Read more
1 2