view.jsp

view.jsp

Q:view data from database

View Answers

May 21, 2013 at 11:00 PM

<%@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>









Related Tutorials/Questions & Answers:
view.jsp
view.jsp  Q:view data from database
view.jsp
view.jsp  Q:view data from database   <%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <%@page import="java.sql.ResultSet"%>
Advertisements
Display Data from database in Popup Window Using Ajax in JSP
created  file view.jsp, windowopen.jsp, getuser.jsp.  Brief... view.jsp on the browser and click on the "View Record" button...;  ADS_TO_REPLACE_2 Step 1: Create a web page ("view.jsp"
jdbc - JDBC
://www.jguru.com/faq/view.jsp?EID=693
java code - JDBC
; window.location.replace("view.jsp?name="+nn); } View Your Profile   continue
swings - Java Beginners
for more info: http://www.jguru.com/faq/view.jsp?EID=455768
when radio button is selected corresponding jsp page should open
"){ window.location.replace("view.jsp"); } else if(selection[i].value=="edit
Struts 2 Actions
;view.jsp</result> </action> The ?name? attribute gives the URL...;action name=" new " class=" net.rose.india.NewAction " > <result>view.jsp
my answer
); // RequestDispatcher rd = request.getRequestDispatcher("view.jsp... = request.getRequestDispatcher("view.jsp"); rd.forward(request, response
create main page
/View.jsp">View </a></p> <p><a href="<
Spring MVC XmlViewResolver Example
; value="/WEB-INF/views/view.jsp" /> </bean> </beans>
jdbc connection
= request.getRequestDispatcher("view.jsp"); rd.forward(request, response...;a href="view.jsp"><h1>VIEW</h1></a></center>
jsp
;center><a href="view.jsp"><h1>VIEW</h1></a><...;<a href="view.jsp"><h1>VIEW</h1></a></center>...="view.jsp"><h1>VIEW</h1></a></center> <
data insertion and fetch 1
;<a href="view.jsp"><h1>VIEW</h1></a></center>...", rs); // RequestDispatcher rd = request.getRequestDispatcher("view.jsp...("view.jsp"); rd.forward(request, response); } catch
cvjgjgjgjgg
="view.jsp"><h1>VIEW</h1></a></center> <...); // RequestDispatcher rd = request.getRequestDispatcher("view.jsp...); RequestDispatcher rd = request.getRequestDispatcher("view.jsp
new
; </fieldset> <center><a href="view.jsp...); // RequestDispatcher rd = request.getRequestDispatcher("view.jsp"); // rd.forward...); RequestDispatcher rd = request.getRequestDispatcher("view.jsp
mew 333
;a href="view.jsp"><h1>VIEW</h1></a></center>...); // RequestDispatcher rd = request.getRequestDispatcher("view.jsp...("view.jsp"); rd.forward(request, response); } catch
jsp page
; <center><a href="view.jsp"><h1>VIEW</h1><
Struts2 Actions
;NewAction" > <result>view.jsp<
how to create using jsp
;<a href="<%=request.getContextPath()%>/jsp/View.jsp">View </a>

Ads