Posts

Java Beans Program

Index.jsp <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">         <title>JSP Page</title>     </head>     <body>               <form action="process.jsp">            <input type="text" name="uname" value="name" onclick="this.value="/><br/>             <input type="text" name="uemail" value="emailid" onclick="this.value="/><br/>            <input type="password" name="upass" value="password" onclick="this.value="/><br/>             <input type="Submit...

Send Redirect example

reg.html  <html>     <body>            <form action="reg" method="post">       <table border="3" bgcolor="magenta">                          <tr>               <td>   eid:<input type="text" name="eid"/><br/><br/> </td></tr>           <tr><td>ename<input type="text" name="ename"/><br/><br/> </td></tr>           <tr><td>salary:<input type="text" name="esalary"/><br/><br/> </td></tr>       </table>     <input type="submit" value...

Html -> Servlet Page-> JDBC

Write a Servlet Program that verifys and updates the data in the use html as front end?    CREATE TABLE  "REGISTERUSER"     (    "NAME" VARCHAR2(4000),      "PASS" VARCHAR2(4000),      "EMAIL" VARCHAR2(4000),      "COUNTRY" VARCHAR2(4000)    )    register.html     <html>      <body>      <form action="Register" method="post">            Name:<input type="text" name="userName"/><br/><br/>      Password:<input type="password" name="userPass"/><br/><br/>      Email Id:<input type="text" name="userEmail"/><br/><br/>      Country:      <select name="userCountry">      <option>India...

Servlet and XML

Servlet to dislay Xml Content import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class NewServlet extends HttpServlet {              public void service(HttpServletRequest request, HttpServletResponse response)             throws ServletException, IOException {         response.setContentType("text/xml");        PrintWriter out = response.getWriter();                          out.println("<table border='1'><tr>");             out.println("<th>celebrity</th>");             out.println("<th>profession</th>");     ...

CSS PROGRAMS

Inline CSS : Inline CSS contains the CSS property in the body section attached with element is known as inline CSS. This kind of style is specified within an HTML tag using style attribute. <html>      <head>          <title>Inline CSS</title>      </head>             <body>          <p style = "color:#009900;                      font-size:50px;                      font-style:italic;                      text-align:center;">          KBN COLLGE</p>      </body>  </html>     Internal or Embedded CSS: This can be used when a single HTML document must be styled uniquely. The...

DHTML PROGRAMS

PROGRAM1: <html>      <head>          <title>Create an alert</title>      </head>             <body>          <h1 id = "para1">DQQQQQQ</h1>          <input type = "Submit" onclick = "Click()"/>          <script style = "text/javascript">              function Click() {                  document.getElementById("para1").style.color = "#009900";                  window.alert("Color changed to green");              }          </script>      </body>  </html>    PROGRAM2: <html>  ...

Basic Servlet Program

import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class HtmlSrv extends HttpServlet {        protected void processRequest(HttpServletRequest request, HttpServletResponse response)             throws ServletException, IOException {         response.setContentType("text/html;charset=UTF-8");         try (PrintWriter out = response.getWriter()) {             /* TODO output your page here. You may use following sample code. */             out.println("<!DOCTYPE html>");             out.println...