This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Title</title> | |
</head> | |
<body> | |
<h1>Parent page</h1> | |
<jsp:include page="include.jsp" /> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="stylesheet" href="css/jq.css" type="text/css" media="print, projection, screen" /> | |
<link rel="stylesheet" href="../themes/blue/style.css" type="text/css" media="print, projection, screen" /> | |
<script type="text/javascript" src="../jquery-latest.js"></script> | |
<script type="text/javascript" src="../__jquery.tablesorter.js"></script> | |
<script type="text/javascript" src="../addons/pager/jquery.tablesorter.pager.js"></script> | |
<script type="text/javascript" src="js/chili/chili-1.8b.js"></script> | |
<script type="text/javascript" src="js/docs.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr onclick="document.location = 'links.html';"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response.setContentType("text/html"); | |
final PrintWriter out = response.getWriter(); | |
out.println("<html><head><title>RunServlet</title></head>"); | |
out.println("<body bgcolor=\"white\"><h1>Hello Servlet World</h1>"); | |
out.println("</body></html>"); | |
out.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page contentType="text/html" pageEncoding="UTF-8"%> | |
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %> | |
<t:genericpage> | |
<jsp:attribute name="header"> | |
<h1>Welcome</h1> | |
</jsp:attribute> | |
<jsp:attribute name="footer"> | |
<p id="copyright">Copyright 1927, Future Bits When There Be Bits Inc.</p> | |
</jsp:attribute> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@tag description="Overall Page template" pageEncoding="UTF-8"%> | |
<%@attribute name="header" fragment="true" %> | |
<%@attribute name="footer" fragment="true" %> | |
<html> | |
<body> | |
<div id="pageheader"> | |
<jsp:invoke fragment="header"/> | |
</div> | |
<div id="body"> | |
<jsp:doBody/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public SomeConstructor(){ | |
this.dataSource = initDatasource("jdbc/mysqldb01"); | |
} | |
private static DataSource initDatasource(String jndi){ | |
try { | |
javax.naming.Context ctx = new InitialContext(); | |
// relative to standard JNDI root for J2EE app | |
javax.naming.Context envCtx = (javax.naming.Context) ctx.lookup( "java:comp/env" ); | |
return (DataSource) envCtx.lookup( jndi ); |
NewerOlder