简体   繁体   English

如何将java bean显示到jsp?

[英]how to display java bean to jsp?

a HTML Document.一个 HTML 文档。 Different types of tags are: html - all content is inside this tag head - contains title andd other related files body - contains main cotent to be displayed on the webpage div - division or area of a page p - paragraph a - links不同类型的标签是: html - 所有内容都在这个标签头内 - 包含标题和其他相关文件正文 - 包含要在网页上显示的主要内容 div - 页面的分区或区域 p - 段落 a - 链接

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

    <form action="updateevent" method="post">
        <p>
            Email ID:&nbsp; &nbsp; &nbsp;&nbsp;<input name="email" type="email" />
        </p>
        <p>
            Min_Budget:&nbsp;&nbsp;<input name="min_budget" type="number" />
        </p>
        <p>
            Max_Budget:&nbsp;<input name="max_budget" type="number" />
        </p>
        <p>
            <input type="submit" value="Register" />
        </p>
    </form>

</body>
</html>
-------------------
<p>&nbsp;</p>
<div>
    <form action="addevents" method="post">
        <h1>Register</h1>
        <p>
            First_Name:&nbsp;&nbsp;<input name="first_name" type="text" />
        </p>
        <p>
            Last_Name:&nbsp; <input name="last_name" type="text" />
        </p>
        <p>
            Email ID:&nbsp; &nbsp; &nbsp;&nbsp;<input name="email" type="email" />
        </p>
        <p>
            Gender:&nbsp; &nbsp; &nbsp; &nbsp;<input checked="checked"
                name="gender" type="radio" value="Male" />Male<input name="gender"
                type="radio" value="Female" />Female <input name="gender"
                type="radio" value="Other" />Other
        </p>
        <p>
            Age:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input name="age"
                type="number" />
        </p>
        <p>
            <label> Type of Event</label><select id="myEvent">
                <option value="Birthday">Birthday</option>
                <option value="Wedding">Wedding</option>
                <option value="Engagement">Engagement</option>
                <option value="Retirement">Retirement</option>
                <option value="HouseWarming">HouseWarming</option>
                <option value="NewYearEvent">NewYearEvent</option>
                <option value="Christmas">Christmas</option>
                <option value="ThanksGiving">ThanksGiving</option>
                <option value="Other">Other</option>
            </select>
        </p>
        <p>
            Min_Budget:&nbsp;&nbsp;<input name="min_budget" type="number" />
        </p>
        <p>
            Max_Budget:&nbsp;<input name="max_budget" type="number" />
        </p>
        <p>
            Comments:&nbsp; &nbsp;<input name="comments" type="text" />
        </p>
        <p>
            <input type="submit" value="Register" />
        </p>
    </form>
</div>
----------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Events</title>
</head>
<body>

    <h3>  Events </h3>
 <p>
    <nav>
        <a href="${pageContext.request.contextPath}/pages/insert.jsp">Add Event</a><br>
        <a href="${pageContext.request.contextPath}/pages/update.jsp">Update Event</a><br>
        <a href="${pageContext.request.contextPath}/pages/getallevents.jsp">Get All Events</a><br>
        <a href="${pageContext.request.contextPath}/pages/getEventByType.jsp">Get Events by Type</a><br>
        <a href="${pageContext.request.contextPath}/pages/getByBudget.jsp">Get Events by Budget</a><br>
    </nav>
</p>
</body>
</html>
-----------------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

    <form action="searchEvents" method="post" >
        <h1>Enter event type, you would like to Search: </h1> 
        <input type="text" name="typeOfEvent" > <br>
        <input type="submit"  value="Get Events">
    </form>

</body>
</html>
------------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

    <form action="bybudget" method="post" >
        <h1>Enter the budget: </h1> 
        <input type="number" name="budget" > <br>
        <input type="submit"  value="Get Events ">
    </form>

</body>
</html>
-------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

    <form action="getallevents" method="get">
        <input type="submit" value = "Get All Events" >
    </form>

</body>
</html>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM