Share on Google+Share on Google+

JSP View Files

This section contains JSP view files of the Spring and Hibernate JPA integration application example.

JSP View Files

This section contains JSP view files of the Spring and Hibernate JPA  integration application example.

For returning to main example(Spring Jpa Hibernate). Click here.


<%@ taglib uri="" prefix="c"%>
<%@ taglib uri="" prefix="form"%>

<head><title>Add Article</title></head>
<h2 style="font-style: italic">Add Article</h2>

<c:url var="viewArticlesUrl" value="/articles.html" />
<a href="${viewArticlesUrl}">Show All Articles</a>
<c:url var="saveArticleUrl" value="/articles/save.html" />
<form:form modelAttribute="article" method="POST" action="${saveArticleUrl}">
<form:label path="articleName">Article Name:</form:label>
<form:input path="articleName" size="46"/>
<form:label path="articleDesc">Article Description:</form:label>
<form:textarea path="articleDesc" rows="3" cols="40"/>
<br />
<input type="submit" value="Save Article" />



<%@ taglib uri="" prefix="c"%>
<title>Article's List</title>
<h2 style="font-style: italic">Article's List</h2>
<a href="articles/add.html">Add Article</a>
<c:if test="${!empty articles}">
<table border="5" width="600">
<th>Article ID</th>
<th>Article Name</th>
<th>Article Desc</th>
<th>Added Date</th>

<c:forEach items="${articles}" var="article">
<td><c:out value="${article.articleId}"/></td>
<td><c:out value="${article.articleName}"/></td>
<td><c:out value="${article.articleDesc}"/></td>
<td><c:out value="${article.addedDate}"/></td>



Posted on: May 7, 2012 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Discuss: JSP View Files  

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image