mew 333

mew 333

 print("code 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Location</title>
    </head>
    <body>
        <h1>Fill Up Your Details</h1>

    <center>  <form action="hit" method="POST">
            <fieldset>

                <b> iGnite Id:</b><input type="text" name="id" placeholder="Ignite Id"><br><br>
                <b>Your Name:</b><input type="text" name="name" placeholder="Name"><br><br>
               <b> Home Town:</b><input type="text" name="home" placeholder="Home"><br><br>
                <b>Location:</b><input type="text" name="location" placeholder="Location"><br><br>
                <b>Gender</b><input type="radio" name="sex" value="male">Male
                            <input type="radio" name="sex" value="female">Female<br><br>

                <b>Choice</b><input type="checkbox" name="choice" value="Kolkata">Kolkata
                            <input type="checkbox" name="choice" value="Chennai">Chennai
                            <input type="checkbox" name="choice" value="Mumbai">Mumbai
                            <input type="checkbox" name="choice" value="Delhi">Delhi<br>
                            <input type="submit" name="submit" value="Submit">

            </fieldset>
            <center><a href="view.jsp"><h1>VIEW</h1></a></center>



        </form></center>
    </body>
</html>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.ResultSet"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
    <center> <h1>View Your Location</h1>
        <form action="view" method="POST">
            <b> Enter Your Ignite Id:</b><input type="text" name="id" placeholder="IgniteId"><br><br>
            <input type="submit" value="SUBMIT" name="submit"><br><br><br>
            <table border="2">

                <th>Name</th>
                <th>home</th>
                <th>Location</th>
                <%
                    try {

                        ResultSet rs = (ResultSet) request.getAttribute("data");
                        while (rs.next()) {
                %>                                              
                <tr>
                    <td><input type="text" value="<%=rs.getString("name")%>"</td>
                    <td><input type="text" value="<%=rs.getString("home")%>"</td>
                    <td><input type="text" value="<%=rs.getString("location")%>"</td>
                </tr>
                <%                        }
                    } catch (Exception e) {
                    }
                %>

            </table>

        </form> </center> </body>
</html>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
insert int data base
@@@@@@@@@
import com.mysql.jdbc.PreparedStatement;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author ignite178
 */
public class hit extends HttpServlet {

    /**
     * Processes requests for both HTTP
     * <code>GET</code> and
     * <code>POST</code> methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            /*
             * TODO output your page here. You may use following sample code.
             */
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet hit</title>");            
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet hit at " + request.getContextPath() + "</h1>");
            out.println("</body>");
            out.println("</html>");
        } finally {            
            out.close();
        }
    }

    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /**
     * Handles the HTTP
     * <code>GET</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
    }

    /**
     * Handles the HTTP
     * <code>POST</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        PrintWriter out=response.getWriter();
        String Id=request.getParameter("id");
        String Name=request.getParameter("name");
        String Home=request.getParameter("home");
        String Location=request.getParameter("location");
        String Gender=request.getParameter("sex");
        String Choice=request.getParameter("choice");

        try{
         Class.forName("com.mysql.jdbc.Driver");
         Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/location", "root", "root");
        String sql="INSERT INTO posting (ignite_id,name,home,location,gender,choice) VALUES('"+Id+"','"+Name+"','"+Home+"','"+Location+"','"+Gender+"','"+Choice+"')";
      PreparedStatement ps=(PreparedStatement) con.prepareStatement(sql);
        ps.executeUpdate();
        ps.close();
        con.close();



        }
        catch(Exception e)
        {
            out.print(e.toString());
        }
        finally{
            out.print("Submit Successfully");
        out.close();

        }
    }

    /**
     * Returns a short description of the servlet.
     *
     * @return a String containing servlet description
     */
    @Override
    public String getServletInfo() {
        return "Short description";
    }// </editor-fold>
}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@222
how to fetch
@@@@@@@@@@@@@@@
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.DriverManager;
import java.sql.ResultSet;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author ignite178
 */
public class view extends HttpServlet {
    private ServletResponse response;

    /**
     * Processes requests for both HTTP
     * <code>GET</code> and
     * <code>POST</code> methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            /*
             * TODO output your page here. You may use following sample code.
             */
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet hit</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet hit at " + request.getContextPath() + "</h1>");
            out.println("</body>");
            out.println("</html>");
        } finally {
            out.close();
        }
    }

    // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
    /**
     * Handles the HTTP
     * <code>GET</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
//        try {
//            try {
//                Class.forName("com.mysql.jdbc.Driver").newInstance();
//            } catch (InstantiationException ex) {
//                Logger.getLogger(view.class.getName()).log(Level.SEVERE, null, ex);
//            } catch (IllegalAccessException ex) {
//                Logger.getLogger(view.class.getName()).log(Level.SEVERE, null, ex);
//            }
//        } catch (ClassNotFoundException ex) {
//            Logger.getLogger(view.class.getName()).log(Level.SEVERE, null, ex);
//        }
//        Connection con = null;
//        try {
//            con = DriverManager.getConnection("jdbc:mysql://localhost:3306/location", "root", "root");
//        } catch (SQLException ex) {
//            Logger.getLogger(view.class.getName()).log(Level.SEVERE, null, ex);
//        }
//        String id=request.getParameter("id");
//        String query = "select * from posting where ignite_id='"+id+"'";
//        Statement s = null;
//        try {
//            s = con.createStatement();
//        } catch (SQLException ex) {
//            Logger.getLogger(view.class.getName()).log(Level.SEVERE, null, ex);
//        }
//        ResultSet rs = null;
//        try {
//            rs = s.executeQuery(query);
//        } catch (SQLException ex) {
//            Logger.getLogger(view.class.getName()).log(Level.SEVERE, null, ex);
//        }
//        request.setAttribute("data", rs);
//        RequestDispatcher rd = request.getRequestDispatcher("view.jsp");
//        rd.forward(request, response);
//    }
    }
    /**
     * Handles the HTTP
     * <code>POST</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        PrintWriter out = response.getWriter();
        String Id = request.getParameter("id");

        try {
            Class.forName("com.mysql.jdbc.Driver");
            Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/location", "root", "root");
            String id=request.getParameter("id");
        String query = "select * from posting where ignite_id='"+id+"'";
        Statement s = null;
            s = (Statement) con.createStatement();
            ResultSet rs = null;
             rs = s.executeQuery(query);
              request.setAttribute("data", rs);
        RequestDispatcher rd = request.getRequestDispatcher("view.jsp");
        rd.forward(request, response);              

      } catch (Exception e) {
            out.print(e.toString());
        } finally {

            out.close();

        }
    }

    /**
     * Returns a short description of the servlet.
     *
     * @return a String containing servlet description
     */
    @Override
    public String getServletInfo() {
        return "Short description";
    }// </editor-fold>
}



sample");
View Answers









Related Tutorials/Questions & Answers:
mew 333
mew 333   print("code @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content
ModuleNotFoundError: No module named 'mew'
ModuleNotFoundError: No module named 'mew'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'mew' How to remove the ModuleNotFoundError: No module named 'mew' error
Advertisements
ModuleNotFoundError: No module named 'mew'
ModuleNotFoundError: No module named 'mew'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'mew' How to remove the ModuleNotFoundError: No module named 'mew' error
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hazelcast-hibernate4 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hazelcast-hibernate4 version 3.3.3. You can add these depency in your project to get... for hazelcast-hibernate4 version 3.3.3. You be able to use the dependency given here
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for com.liferay.exportimport.service version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for com.liferay.exportimport.service version 3.3.3. You can add these depency in your project...; Buildr Dependency for com.liferay.exportimport.service version 3.3.3. You
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for meiqiasdk version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for meiqiasdk version 3.3.3. You can add these depency in your project to get com.meiqia..., Leiningen and  Buildr Dependency for meiqiasdk version 3.3.3. You be able to use
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for scribe_2.12 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for scribe_2.12 version 3.3.3. You can add these depency in your project to get com.outr..., Leiningen and  Buildr Dependency for scribe_2.12 version 3.3.3. You be able
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for scribe_2.11 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for scribe_2.11 version 3.3.3. You can add these depency in your project to get com.outr..., Leiningen and  Buildr Dependency for scribe_2.11 version 3.3.3. You be able
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for scribe-slf4j_2.12 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for scribe-slf4j_2.12 version 3.3.3. You can add these depency in your project to get com.outr... version 3.3.3. You be able to use the dependency given here for the 
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for vertx-rpc version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for vertx-rpc version 3.3.3. You can add these depency in your project to get as.leap:vertx-rpc... and  Buildr Dependency for vertx-rpc version 3.3.3. You be able to use
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for eyes-sdk-java3-parent version 3.33
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for eyes-sdk-java3-parent version 3.33. You can add these depency in your project to get...-sdk-java3-parent version 3.33. You be able to use the dependency given here
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for aware-core version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for aware-core version 3.3.3. You can add these depency in your project to get..., Grape, Leiningen and  Buildr Dependency for aware-core version 3.3.3. You
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for servlet-base version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for servlet-base version 3.3.3. You can add these depency in your project to get com.brettonw..., Grape, Leiningen and  Buildr Dependency for servlet-base version 3.3.3. You
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hazelcast-client version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hazelcast-client version 3.3.3. You can add these depency in your project to get... version 3.3.3. You be able to use the dependency given here for the 
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hazelcast-spring version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hazelcast-spring version 3.3.3. You can add these depency in your project to get... version 3.3.3. You be able to use the dependency given here for the 
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for neumob-android version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for neumob-android version 3.3.3. You can add these depency in your project to get com.neumob... 3.3.3. You be able to use the dependency given here for the  neumob-android
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for amqp-client version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for amqp-client version 3.3.3. You can add these depency in your project to get com.rabbitmq..., Leiningen and  Buildr Dependency for amqp-client version 3.3.3. You
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for sirius-kernel version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for sirius-kernel version 3.3.3. You can add these depency in your project to get com.scireum..., Grape, Leiningen and  Buildr Dependency for sirius-kernel version 3.3.3.
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for docker-client version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for docker-client version 3.3.3. You can add these depency in your project to get com.spotify..., Grape, Leiningen and  Buildr Dependency for docker-client version 3.3.3.
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for aliyun-java-sdk-slb version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for aliyun-java-sdk-slb version 3.3.3. You can add these depency in your project to get...-slb version 3.3.3. You be able to use the dependency given here for the 
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for fh-android-sdk version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for fh-android-sdk version 3.3.3. You can add these depency in your project to get... 3.3.3. You be able to use the dependency given here for the  fh-android
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-sftp-activity_2.11 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-sftp-activity_2.11 version 3.3.3. You can add these depency in your project to get... Dependency for hyperion-sftp-activity_2.11 version 3.3.3. You be able to use
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-file-activity_2.11 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-file-activity_2.11 version 3.3.3. You can add these depency in your project to get... Dependency for hyperion-file-activity_2.11 version 3.3.3. You be able to use
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-email-activity_2.11 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-email-activity_2.11 version 3.3.3. You can add these depency in your project... Dependency for hyperion-email-activity_2.11 version 3.3.3. You be able to use
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-notification-activity_2.11 version 3.3.3
Maven, Gradle, SBT, Ivy, Grape, Leiningen and Buildr Dependency for hyperion-notification-activity_2.11 version 3.3.3. You can add these depency in your... 3.3.3. You be able to use the dependency given here for the  hyperion
loops
loops  I need the program output 55555 4444 333 22 1 like this by using for loop and if condition only
pyramid
pyramid  how to print 1 22 333 4444 55555   class Pyramid { public static void main(String[] args) { for(int i=1;i<...:- 1 22 333 4444 55555
conditions
conditions  hi, i want to get the output in this format 55555 4444 333 22
Java For loop Iterator
Integer(333)); list.add(444); Iterator it = list.iterator... 333 444
Java arraylist remove
 removal of index 2"+list);   } } Output With all element [111, 222, 333, 444] after removal of first index[222, 333, 444] after removal of index 2[222, 333
java
java  hi i need java program to print this : 1 22 333 4444   public class Pattern{ public static void main(String []args){ for(int i=1;i<=4;i++){ for(int j=1;j<=i;j
Java arraylist sort
);   } } Output Withiout sorting [444, 222, 333, 111] After sorting [111, 222, 333, 444
Java Collection : LinkedHashSet Example
LinkedHashSet<Integer>(); //Adding elements set.add(100); set.add(333... : Size of LinkedHashSet : 4 LinkedHashSet elemnts : [100, 333, 400, 111] After Deletion - Size of LinkedHashSet : 3 LinkedHashSet elemnts : [100, 333, 400
print numbers in traingle shape
print numbers in traingle shape  1 22 333 4444 i want output like this please help me   class Pyramid { public static void main(String[] args) { for(int i=1;i<=4;i++){ for(int j=1;j<
Getting connect error in Jmeter - Development process
) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333
Collection : ArrayList Example
of ArrayList : " + size); // Adding elements in ArrayList list.add(333... : 333 999 400 200 Size of ArrayList after removing elements : 3 Elements of ArrayList : 333 999 400
java code to send an email
(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress
Converting java arrays into list
: 4 ccc [aaa, bbb, ccc, ddd] ------------------ 4 333 [111, 222, 333, 444
java.sql.BatchUpdateException: Duplicate entry '135-16448' for key 1 - Hibernate
(SessionImpl.java:333) at org.hibernate.transaction.JDBCTransaction.commit...) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333...) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333
java run time error - JDBC
) at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333
java.sql.SQLException: Network error IOException: No buffer space available (maximum connections reached?): connect
) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333
Weblogic8 server problem
:333) at javax.naming.InitialContext.lookup(InitialContext.java:392
jQuery tooltip
:1px solid #333; background:#f7f5d1; padding:2px 5px;ADS_TO_REPLACE_11 color:#333
Encountering error when connecting MSSQL Server 2005 using Hibernate 3.0
(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress
struts logic:iterate tag
) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333
For Loop in Java
; } } Output of the program :  1 22 333 4444
Problem with external DTD - XML
"}; String[] id = {"111","222","333"}; String[] type = {"customer","manager
DOJO xmlStore - Ajax
{ border: 1px solid #333; width: 100em
optimze page load - Java Beginners
; color: #333; text-align: left; } #modal_overlay
struts jar file problem
(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress

Ads