Skip to content

Commit

Permalink
moved to JSTL
Browse files Browse the repository at this point in the history
  • Loading branch information
nknj committed Nov 14, 2013
1 parent 7a197c5 commit f0e8c68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/main/webapp/WEB-INF/dashboard.jsp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<%@ page import="model.entity.User" %>
<%
User u = (User) request.getAttribute("user");
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
Expand All @@ -10,10 +7,10 @@
</head>
<body>
<h2>
Hello, <%=u.getUsername()%>
Hello, ${user.username}
</h2>
<p>
Your password is <%=u.getPassword()%>, oops!
Your password is ${user.password}, oops!
</p>
Click <a href="/">here</a> to go back to Home.
</body>
Expand Down
14 changes: 10 additions & 4 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">

<web-app>
<display-name>Archetype Created Web Application</display-name>
<servlet>
<servlet-name>Home</servlet-name>
Expand All @@ -28,4 +28,10 @@
<servlet-name>Dashboard</servlet-name>
<url-pattern>/dashboard</url-pattern>
</servlet-mapping>
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</jsp-config>
</web-app>

0 comments on commit f0e8c68

Please sign in to comment.