1 Answer(s)      3 years and 9 months ago
Posted in : JDBC

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>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    <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">

                    try {

                        ResultSet rs = (ResultSet) request.getAttribute("data");
                        while ( {
                    <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>
                <%                        }
                    } catch (Exception e) {


        </form> </center> </body>

Related Tutorials/Questions & Answers:
view.jsp  Q:view data from database
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"%>
Display Data from database in Popup Window Using Ajax in JSP
created  file view.jsp, windowopen.jsp, getuser.jsp.  Brief description of the flow of the application:  User opens view.jsp ...: Create a web page ("view.jsp") to Employee Form. <
jdbc - JDBC
swings - Java Beginners
for more info:
java code - JDBC
; window.location.replace("view.jsp?name="+nn); } View Your Profile   continue
when radio button is selected corresponding jsp page should open
"){ window.location.replace("view.jsp"); } else if(selection[i].value=="edit
my answer
); // RequestDispatcher rd = request.getRequestDispatcher("view.jsp... = request.getRequestDispatcher("view.jsp"); rd.forward(request, response
Struts 2 Actions
="net.rose.india.NewAction" > <result>view.jsp</result> </action>... " > <result>view.jsp</result> <result name="error">
Spring MVC XmlViewResolver Example
-INF/views/view.jsp" /> </bean> </beans> The controller
create main page
/View.jsp">View </a></p> <p><a href="<
jdbc connection
= request.getRequestDispatcher("view.jsp"); rd.forward(request, response...;a href="view.jsp"><h1>VIEW</h1></a></center>
;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> <
="view.jsp"><h1>VIEW</h1></a></center> <...); // RequestDispatcher rd = request.getRequestDispatcher("view.jsp...); RequestDispatcher rd = request.getRequestDispatcher("view.jsp
; </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
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
jsp page
; <center><a href="view.jsp"><h1>VIEW</h1><
how to create using jsp
;<a href="<%=request.getContextPath()%>/jsp/View.jsp">View </a>
Struts2 Actions
;view.jsp</result> </action>