Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC view.jsp
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Mumbai
view.jsp
1 Answer(s)      a year and 4 months ago
Posted in : JDBC


Q:view data from database


Advertisement
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 description of the flow of the application:  User opens view.jsp ...: Create a web page ("view.jsp") to Employee Form. <
jdbc - JDBC
://www.jguru.com/faq/view.jsp?EID=693
swings - Java Beginners
for more info: http://www.jguru.com/faq/view.jsp?EID=455768
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>
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> <
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
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>
 

 

 

DMCA.com