
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<!DOCTYPE html> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> <html> <head> <meta charset="ISO-8859-1"> <title>Exception Handling - Register</title> </head> <body> <h3>Register for a prize by completing this form.</h3> <s:form action="register"> <s:textfield name="personBean.firstName" label="First name"/> <s:textfield name="personBean.lastName" label="Last name"/> <s:textfield name="personBean.email" label="Email"/> <s:textfield name="personBean.age" label="Age"/> <s:submit/> </s:form> <hr> <s:debug/> </body> </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<!DOCTYPE html> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> <html> <head> <meta charset="ISO-8859-1"> <title>Exception Handling - Security Error</title> </head> <body> <h4>There has been a security error.</h4> <p> Please contact technical support with the following information:</p> <h4>Exception Name: <s:property value="exception"/></h4> <h4>Exception Details: <s:property value="exceptionStack"/></h4> <p><a href="index.jsp">Return to the home page.</a></p> </body> </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<!DOCTYPE html> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> <html> <head> <meta charset="ISO-8859-1"> <title>Exception Handling - Registration Successful</title> </head> <body> <h3>Thank you for registering for a prize.</h3> <p>Your registration information:</p> <pre><s:property value="personBean"/> </pre> <p><a href="<s:url action='index' />">Return to home page</a>.</p> <hr> <s:debug/> </body> </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Basic Struts 2 Application - Welcome</title> </head> <body> <h1>Welcome To Struts 2!</h1> <p><a href="<s:url action='hello'/>">Hello World</a></p> <p><a href="register.jsp">Please register</a> for our prize drawing.</p> <p><a href='<s:url action="causeexception" />'>Cause Exception</a></p> <p><a href='<s:url action="causenullpointerexception" />'>Cause Null Pointer Exception</a></p> <p><a href='<s:url action="causesecurityexception" />'>Cause Global Security Exception</a></p> <p><a href='<s:url action="actionspecificexception" />'>Cause ActionSpecific Security Exception</a></p> <hr/> <h3>Debugging</h3> <p><a href="<s:url action="index" namespace="config-browser" />">Launch the configuration browser</a></p> <s:url action="index" var="indexLink"> <s:param name="debug">browser</s:param> </s:url> <p><a href="${indexLink}">Reload this page with debugging</a></p> <s:debug/> </body> </html> |
Selamat mencoba,
salam berbagi,
wijaksana