Professional Documents
Culture Documents
Sl.
No.
Program Topic Date Page Sign
No
1. Write an HTML program to design an entry
form of student details andsend it to store at
data base server like SQL ORACLE or MS
Access.
2. Write HTML/Java script to display your CV
in navigator, your institutewebsite and
Tutorial website for specific subject
3. Write program using java script for Web
Page to display browsersinformation.
4. Write a java applet to display the
Application Program screen i.eCalculator
and other.
5. Writing program in XML for creation of DTD.
Which specifies set of rules. Create a style
sheet in CSS/XSL & display the document in
internetexplorer.
6. Program to illustrate JDBC connectivity.
Program for maintaining database by sending
queries. Design and implement a simple servlet
bookquery with the help of JDBC & SQL.
Create MS Access Database, create on ODBC
link, Compile & execute JAVA JDVC Socket.
7. Install TOMCAT web server and APACHE.
Access the above developedstatic web pages
for books web site, using these servers by
putting the web pages developed.
8. Assume four user1,use2,user3 and user4
having the passwords pwd1,pwd2,pwd3 and
pwd4 respectively. Write a servlet for doing
the following . create a cookie and add these
four user id’s and password tothis cookies.2.
Read the user id and password entered in the
Login formand authenticate with the values
available in the cookies.
HTML FILE :
<!DOCTYPE html>
<html>
<head>
<title>PHP insertion</title>
<link href="css/insert.css" rel="stylesheet">
</head>
<body>
<div class="maindiv">
<!--HTML Form -->
<div class="form_div">
<div class="title">
<h2>Insert Data In Database Using PHP.</h2>
</div>
<form action="insert.php" method="post">
<!-- Method can be set as POST for hiding values in URL-->
<h2>Form</h2>
<label>Name:</label>
<input class="input" name="name" type="text" value="">
<label>Email:</label>
<input class="input" name="email" type="text" value="">
<label>Contact:</label>
<input class="input" name="contact" type="text" value="">
<label>Address:</label>
<textarea cols="25" name="address" rows="5"></textarea><br>
<input class="submit" name="submit" type="submit" value="Insert">
</form>
</div>
</div>
</body>
</html>
<?php
$connection = mysql_connect("localhost", "root", "");
Connection with Server
$db = mysql_select_db("colleges", $connection);
Server
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$contact = $_POST['contact'];
$address = $_POST['address'];
if($name !=''||$email !=''){
//Insert Query of SQL
$query = mysql_query("insert into students(student_name, student_email,
student_contact, student_address) values ('$name', '$email', '$contact',
'$address')");
echo "<br/><br/><span>Data Inserted successfully...!!</span>";
}
else{
echo "<p>Insertion Failed <br/> Some Fields are Blank. .. !!</p>";
}
}
mysql_close($connection); // Closing Connection with Server
?>
<html>
<head>
<title>CV</title>
</head>
<body>
<div id="header">
<p id="name">Saurabh Kumar </p>
<a href="mailto:sk7619007@gmail.com" target="_blank"><p id="email">sk7619007@gmail.com</p></a>
<p id="contact">+91 1234567890</p>
</div>
<div class="left">
</div>
<div class="right">
<h3>CV Highlights</h3>
<p>
<ul>
<li>Currently going through XYZ company</li>
<li>Learnt basic Python, JavaScript, HTML, CSS </li>
<li>An independent, dedicated, efficient person. These attributes are proved through the series of courses I
have taken or I am taking as of now independently through online platforms.</li>
<li>Good Communication Skills, Presentation Skills, attitude towards leadership, authorisation and
delegation, conflict resolution and negotiation and a very good team worker.</li></ul>
</p>
<h3>Professional Experience</h3>
<h4 id="company-name">XYZ Pvt Ltd</h4>
<p id="job-title"><strong>Support Engineer (Technical Support)</strong></p>
<p id="job-responsibilities">Job Responsbilities</p>
<p>
<ul>
<li>Answer customer queries over email / ticketing system</li>
<li>Interact with our engineering team to get software issues and bugs resolved</li>
<li>Occasionally interact with customers over Skype or telephone</li>
<li>Contribute ideas to the team on how customers can be delighted</li></ul>
</p>
<h3>Educational Qualifications</h3>
<table border="1" width="200px" height="auto">
<tr id="heading">
<td>Qualification</td>
<td>Board</td>
<td>Percentage / Grades</td>
<td>Year</td>
</tr>
<tr>
<td>HighSchool</td>
<td>MDS</td>
<td>87%</td>
<td>2015</td>
</tr>
<tr>
Roll No:1880210024 Page 6
<td>12th</td>
<td>DAV</td>
<td>83%</td>
<td>2017</td>
</tr>
<tr>
<td>B.Tech CSE</td>
<td>NITRA Technical Campus</td>
<td>A Grade</td>
<td>2022</td>
</tr>
</table>
<h3>Independent Courses</h3>
<p>
<ul>
<li>
<span id="course-name">HTML & CSS for Beginners – Web Fundamentals</span>–
Codecademy.com</li>
<li>
<span id="course-name">Python – Fundamentals and Dynamic Programming </span> -
Codecademy.com</li>
<li>
<span id="course-name">JavaScript – Programming Basics, JS Apps and Build Games </span> -
Codecademy.com</li>
<li>
<span id="course-name">CS101: Introduction to Computer Science - Building a Web Crawler</span> -
Udacity.com</li>
<li>
<span id="course-name">CS50x – Introduction to Computer Science I</span>– edX.org & Harvard
University</li>
<li>
<span id="course-name">Calculus One</span> - Ohio State University & Coursera.org</li>
<li>
<span id="course-name">Introduction to Finance</span> - Coursera.org & University of Michigan</li>
</ul>
<h3>Technical Skills</h3>
<p>
<ul>
<li>
<span id="course-name">Operating Systems:</span> DOS, Windows 98, Windows 2000, Windows XP,
Windows NT, Windows Server 2003, Windows Vista, Windows 7, Macintosh Computers (OS X), Linux
(Ubuntu, Fedora)</li>
<li>
<span id="course-name">Application Software:</span> Office 97-2003; Office XP, Office 2007, Office for
Mac 2011, iWork ’09, Sage Accounting Software, Sage 50 (Accounting Software), Excel 2003/2007 for
Financial Modelling spreadsheets.</li>
<li>
<span id="course-name">Programming Skills:</span>HTML, CSS, Python, JavaScript, learning C and
C++</li></ul>
</p>
<h3>Personal Information:</h3>
Roll No:1880210024 Page 7
<p>
<ul>
<li>
A young, determined hard and smart working person. I believe in task based roles and complete
ownership of work.
<li>
<span id="course-name">Languages Known:</span>English, Hindi, Gujarati and Sindhi</li>
<li>
<span id="course-name">Hobbies:</span>I love reading Finance and IT related books / magazines, playing
Chess, swimming, listening music, surfing Internet, self-learning through e-courses.</li></ul>
</p>
<h3>Other Information</h3>
<p>
<ul>
<li>
<span id="course-name">Expected Salary:</span>As per company standards</li>
<li>
<span id="course-name">Area of Interest:</span>Software Development, Programming, Start-ups, Coding,
App Development, Technical Support, Support Engineer, Customer Happiness, Client service, Investment
Banking, Corporate Finance, Hedge Funds, Mergers & Acquisitions, Analyst, Equity Research, Business
Analysis</li>
<li>
<span id="course-name">Joining Date:</span>Immediate</li></ul>
</p>
<h3>Declaration</h3>
<p>
I hereby declare that the details furnished above are true and correct to the best of my knowledge and
belief.</p>
</div>
<div id="footer"></div>
</body>
</html>
<html>
<script
language=javascript>
function show()
{
document.write("Name "+navigator.appName+"<br>");
document.write("Version "+navigator.appVersion +"<br>");
document.write("Codename " +navigator.appCodeName +"<br>");
document.write("Cookie enable"+navigator.cookieEnabled +"<br>");
document.write("Java Enable"+navigator.javaEnabled +"<br>");
document.write("Mime type"+navigator.mimeTypes +"<br>");
document.write("Platform"+navigator.platform +"<br>");
document.write("Plug ins"+navigator.plugins +"<br>");
document.write("System Language"+navigator.systemLanguage +"<br>");
document.write("User language"+navigator.userAgent +"<br>");
document.write("User Agent"+navigator.userAgent +"<br>");
</script>
</head>
<body>
<form id="form1">
<div>
<input id="Button1" type="button" value="Click me" onclick="show()" />
</div>
</form>
</body>
</html>
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class Calculator extends Applet implements ActionListener
{
TextField inp;
//Function to add features to the frame
public void init()
{
setBackground(Color.white);
setLayout(null);
int i;
inp = new TextField();
inp.setBounds(150,100,270,50);
this.add(inp);
Button button[] = new Button[10];
for(i=0;i<10;i++)
{
button[i] = new Button(String.valueOf(9-i));
button[i].setBounds(150+((i%3)*50),150+((i/3)*50),50,50);
this.add(button[i]);
button[i].addActionListener(this);
}
Button dec=new Button(".");
dec.setBounds(200,300,50,50);
this.add(dec);
dec.addActionListener(this);
5. Writing program in XML for creation of DTD. Which specifies set of rules. Create a
style sheet in CSS/XSL & display the document in internetexplorer.
Program in XML for creation of DTD
Displaying XML Documents Using CSS and XSL
1. Review-1 <ul><li>A well-formed document is one that conforms to the basic rules of XML.
</li></ul><ul><li>A valid document is well formed and is also validated against a DTD.
</li></ul><ul><li>The DTD specifies the grammatical structure of an XML document, thereby
allowing XML parsers to understand and interpret the document’s contents. </li></ul><ul><li>The
use of the SYSTEM keyword indicates to the parser that this is an external declaration, and that the set
of rules for this XML document can be found in a specified file. </li></ul><ul><li>EMPTY element-
content type specifies that the element has no child elements or character data. </li></ul>
2. Formatting the Text - 2 <ul><li>The different font properties that can be set are:
</li></ul>font-family font-size font-style font-weight font-variant Font.
4. Boxes -2 Border
5. Margins, Border and Padding <ul><li>The padding property is used to specify the distanceor
space between the border and its contents. </li></ul>Boxes margin-top margin-bottom
margin-left margin-right margin Margins Border border-top border-bottom border-left border-
right border padding-bottom padding-top padding-right padding-left padding Padding.
6. Controlling Layout <ul><li>The CSS layout properties can control the box on the screen.
</li></ul><ul><li>The boxes can be overlapped using the z-index property. </li></ul>A
paragraph that is two inches by one inch and with a scroll bar is displayed
8. XSL - 2 XML Document XSL HTML document displayed in the Web HTML CSS
12. Operators XSL supports the se operators: / ./ // .// * @ = /*/name */* @* //name
13. Filtering and Logical Operators <ul><li>Filter operations can contain expression such as
Boolean expression, AND, OR, and NOT expressions </li></ul><ul><li>The different
logical operators that can be used are: </li></ul>Operator Description AND Logical and OR
Logical or NOT Negation = Equal != Not equal > Greater than < Less than >= Greaterthan or
equal to <= Less than or equal.
14. Templates <ul><li>Templates are the instructions in an XSL style sheet, which control the
conversion of element and its content. </li></ul><ul><li>It is represented by
<xsl:template>…</xsl:template> </li></ul><ul><li>It is applied with the <xsl:apply-
templates/> element </li></ul><ul><li>The template has two parts:
</li></ul><ul><ul><li>The matching part </li></ul></ul><ul><ul><li>The processing part
</li></ul></ul>Matching part Processing part.
15. Types of Matching Matching Matching by name Matching by ancestry Matching several
names Matching the root Wildcard matches Matching by ID Matching by attributes.
16. Handling Expressions <ul><li>XSL supports five types of Expressions. These are:
</li></ul><ul><ul><li>Node Sets </li></ul></ul><ul><ul><li>Booleans
</li></ul></ul><ul><ul><li>Strings </li></ul></ul><ul><ul><li>Numbers
</li></ul></ul><ul><ul><li>Result Tree Fragments </li></ul></ul>.
17. Switching Styles Data Islands 1 XML document Data Islands 2 Data Islands 3 XML
document with XSL style sheet 1 XML document with XSL style sheet 2 XML document
with XSL style sheet 3.
18. xsl:import and xsl:include <ul><li>Style sheets created by other developers can be imported
using the xsl:import </li></ul><ul><li>The syntax for importing style sheets is:
</li></ul><ul><li><xsl:import href= ‘another stylesheet.xsl’/>
</li></ul><ul><li><xsl:import href= ‘another stylesheet1.xsl’/> </li></ul><ul><li>All the
different style sheets imported are arranged in an import tree. </li></ul><ul><li>A new node
is created in the import tree when a style sheet is imported </li></ul>
7. Install TOMCAT web server and APACHE. Access the above developed static
web pages for books web site, using these servers byputting the web pages
developed.
Installation of TOMCAT web server
Eclipse is a very powerful development environment for Java. Mainly for Web
Developmentproject you need Web Server. Apache Tomcat is the best production ready web
container
Step-1
Download Apache Tomcat from this link. I’m using version 9.0.10.
Click on ServersTab
server...
Program:-
First, create a database and table for User using the following SQL scripts:
Database.java
package com.bari.util;
import java.sql.Connection;
import java.sql.DriverManager;
public class Database {
public static Connection getConnection() {
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection
("jdbc:mysql://localhost:3306/dbname","root","dbpass");
return con;
}
catch(Exception ex) {
System.out.println("Database.getConnection() Error -->" + ex.getMessage());
return null;
}
}
public static void close(Connection con) {
try {
con.close();
}
catch(Exception ex) {
This (addUser) Method is used to insert the USER NAME, PASSWORD, EMAIL,
REGISTRATION
Installation
Installing MySQL on your Windows server is as simple as downloading an MSI
Installer package and clicking through a few options.
1. Download the MySQL Installer from dev.mysql.com . The two download options are a
web-community version and a full version. The web-community version will only download
the server, by default, but you can select other applications (like Workbench) as desired. The
full installer will download the server and all the recommended additional applications.
(You’ll also be asked to create a user account,
but you skip this part by scrolling down to the bottom and clicking “No thanks, just
start my download ”.)
JSP to connect to that database and extract data from the tables anddisplay
them
1. import java.sql.*;
2. class MysqlCon{
3. public static void main(String args[]){
4. try{
5. Class.forName("com.mysql.jdbc.Driver");
6. Connection con=DriverManager.getConnection(
7. "jdbc:mysql://localhost:3306/sonoo","root","root");
8. //here sonoo is database name, root is username and password
9. Statement stmt=con.createStatement();
10. ResultSet rs=stmt.executeQuery("select * from emp");
11. while(rs.next())
12. System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
13. con.close();
14. }catch(Exception e){ System.out.println(e);}
For creating registration form, you must have a table in the database. You can write the database logic
in JSP file, but separating it from the JSP page is better approach.Here, we are going to use DAO,
Factory Method, DTO and Singletion design patterns. There are many files:
1. <form action="process.jsp">
2. <input type="text" name="uname" value="Name..." onclick="this.value=''"/
><br/>
3. <input type="text" name="uemail" value="Email ID..." onclick="this.value='
'"/><br/>
4. <input type="password" name="upass" value="Password..." onclick="this.v
alue=''"/><br/>
5. <input type="submit" value="register"/>
6. </form>
This class inserts the values of the bean component into the database.
1. package bean;
2.
3. import java.sql.*;
4.
5. public class RegisterDao {
6.
public static int register(User u){
7.
int status=0;
8.
try{
9.
10. Connection con=ConnectionProvider.getCon();
11. PreparedStatement ps=con.prepareStatement("insert into user432 values(?,?
,?)");
12. ps.setString(1,u.getUname());
13. ps.setString(2,u.getUemail());
14. ps.setString(3,u.getUpass());15.
16. status=ps.executeUpdate();
17. }catch(Exception e){}18.
19.return status;
ConnectionProvider.java
This class is responsible to return the object of Connection. Here, driver class isloaded
only once and connection object gets memory only once.
1. package bean;
2. import java.sql.*;
3. import static bean.Provider.*;
4.
5. public class ConnectionProvider {
Provider.java
This interface contains four constants that can vary from database to database.
1. package bean;
2.
3. public interface Provider {
4. String DRIVER="oracle.jdbc.driver.OracleDriver";
5. String CONNECTION_URL="jdbc:oracle:thin:@localhost:1521:xe";
6. String USERNAME="system";
7.
String PASSWORD="oracle";
8.
9. }
User.java
It is the bean class that have 3 properties uname, uemail and upass with its setter and getter m
1. package bean;
2. public class User {
3. private String uname,upass,uemail;
4. public String getUname() {
5. return uname;
6. public void setUname(String uname) {
7. this.uname = uname;
8. public String getUpass() {
This jsp file contains all the incoming values to an object of bean class which ispassed
as an argument in the register method of the RegisterDao class.
1. <%@page import="bean.RegisterDao"%>
2. <jsp:useBean id="obj" class="bean.User"/>
3. <jsp:setProperty property="*" name="obj"/>4. <%
5. int status=RegisterDao.register(obj);
6. if(status>0)
7. out.print("You are successfully registered");8. %>
we are using the Oracle10g database to connect with the database. Let's firstcreate
the table in the Oracle database:
Program:-
<!DOCTYPE html>
<!-- saved from url=(0030)http://technobita.appspot.com/ -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Global site tag (gtag.js) - Google Analytics -->
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-141737823-1');
</script>
<!-- Adsense script -->
<script async="" src="./Technobita-Full specifications and reviews of mobile phones and
laptops_files/f(2).txt"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-3537783124277522",
enable_page_level_ads: true
});
</script>
.dropdown-menu a:hover {
background-color: powderblue;
}
</style>
<!--Search Bar-->
<li class="nav-item">
<a href="http://technobita.appspot.com/login" class="nav-link">Login</a>
</li>
<li class="nav-item">
<a href="http://technobita.appspot.com/signup" class="nav-link">Signup</a>
</li>
<section class="sticky-top">
<nav class="navbar navbar-light secondaryNavbar d-md-none" id="secondaryNavbar">
<div class="container-fluid my-0 justify-content-center">
<ul class="list-inline my-0">
<li class="list-inline-item">
<a href="http://technobita.appspot.com/">Home</a>
</li>
<li class="list-inline-item">
<a href="http://technobita.appspot.com/">All Brands</a>
</li>
<li class="list-inline-item">
<a href="http://technobita.appspot.com/login">Login</a>
</li>
<li class="list-inline-item">
<a href="http://technobita.appspot.com/signup">Signup</a>
</li>
<li class="list-inline-item">
<span href="" class="text-white" onclick="openSearch()" id="searchIcon">
<iclass="fas fa-search"></i></span>
</li>
</div>
</section>
<div class="row">
</div>
</a>
</div>
</div>
<div class="row">
</div>
</a>
</div>
</div>
</div>
<div class="row">
</div>
</a>
</div>
</div>
</div>
</div>
</section>
function openSearch() {
if (searchBarNav.style.display === "block") {
function validateForm() {
var mobileSearch = document.forms["myFormMobile"]["s"].value;
var desktopSearch = document.forms["myFormDesktop"]["s"].value;
var warningSmall = document.getElementById('warningSmall');