Skip to main content

Posts

Showing posts from March 20, 2012

Arithmetic Example in JSP using NetBeans

  Create Arithmetic.jsp <% -- Document : Arithmetic Created on : Mar 21, 2012, 1:03:10 AM Author : dell_pc --%> <%@page contentType=" text/html " pageEncoding=" UTF-8 "%> <!DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.01 Transitional//EN " " http://www.w3.org/TR/html4/loose.dtd "> <html> <head> <meta http-equiv=" Content-Type " content=" text/html; charset=UTF-8 "> <title>Arithmetic Example</title> </head> <h1> Some Arithmetic Example in JSP</h1> <body> a = 13; b = 3; <% int a = 15; int b = 7; int result1 = a + b; { out.println(" <br/> Additon of a and b = " + result1); out. print (" <br> ");

Login Demo in jsp with NetBeans & SQL Server

  Step 1: Open SQL Server –>Create Data Base->Create Table->Insert Value Step 2: Create Data Base   create database JavaTest ( Select line and press F5) use JavaTest ( Select line and press F5) Create table Login ( username varchar (20), userpass varchar (20) ) insert into Login values (' niit ',' password ') select * from Login username userpass -------------------- -------------------- niit password (1 row(s) affected)   Step 3: Create DSN Name for your database follow the my previous blog post http://niitindrapuri.blogspot.in/2012/02/jdbc-demo-login-using-netbeans-and-sql.html Step 4: Open Netbeans Add Login.jsp Page <% -- Document : Login Created on : Mar 21, 2012, 12:15:05 AM Author : dell_pc --%> <%@page contentType=" text/html " pageEncoding=" UTF-8 " import=" java.sql.* " language =" java "%> <!DOCTYPE HTML