Posts

Showing posts from July, 2019

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="click here"/>       </form>         </table>     </body>                   </html>   reg.java  import java.io.*;     import java.sql.*;     import javax.servlet.ServletException;     import javax.servlet.http.*;          public class reg extends HttpServl

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</option>      <option>China</option>      <option>other</option>      </select>            <br/><br/>      <input type="sub

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>");             out.println("<tr><td>sachin</td></tr>");             out.println("<td>ccricketer</td>");             out.println("<tr&

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 CSS rule set should be within the HTML file in the head section i.e the CSS is embedded within the HTML file <html>      <head>          <title>Internal CSS</title>          <style>              .main {                  text-align:center;                 }              .GFG {           

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>      <head>          <title>Validate input data</title>      </head>  <body>          <p>Enter graduation percentage:</p>          <input id="perc">          <button type="button" onclick="Validate()">Submit</button>

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("<html>");             out.println("<head>");             out.println("<title>Servlet HtmlSrv</title>");                        out.println("</head>");             out.println("<body>");             out.prin

SERVLET PROGRAM TO DISPLAY DATE AND TIME

import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import java.util.*; import javax.servlet.*; public class NewServlet extends HttpServlet  {     public void service(ServletRequest request, ServletResponse response)             throws ServletException, IOException  {         response.setContentType("text/html;charset=UTF-8");       PrintWriter out=response.getWriter();       Date d=new Date();       String s=d.toString();       out.println("<b>Date and Time:"+s+"</b>");       out.close();                    }     }

WHY PYSPARK AND MACHINE LEARNING

Image
In a world where data is being generated at such an alarming rate, the correct analysis of that data at the correct time is very useful. One of the most amazing framework to handle big data in real-time and perform analysis is Apache Spark. Together, Python for Spark or PySpark is one of the most sought-after certification courses, giving Scala for Spark a run for its money. So in this PySpark Tutorial blog, I’ll discuss the following topics: What is PySpark? Apache Spark is a fast cluster computing framework which is used for processing, querying and analyzing Big data. Being based on In-memory computation, it has an advantage over several other big data Frameworks. Originally written in Scala Programming Language, the open source community has developed an amazing tool to support Python for Apache Spark. PySpark helps data scientists interface with RDDs in Apache Spark and Python through its library Py4j.  There are many features that make PySpark a better framework th