Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: standardize the HTML, CSS and JSP in the webapps folder. #316

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions webapps/ROOT/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove the auto-closing ? It doesn't do any harm. I, personally, prefer the style it was before.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In HTML5 you don't need the auto-closing.
I got the style from MDN.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but it does not do any harm either.
This change makes the diff bigger and harder to back-port to the other branches.
I prefer the XHTML style because it is easier to spot errors in the IDE/text editor without copying to W3C validator in the web.

<title><%=request.getServletContext().getServerInfo() %></title>
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="tomcat.css" rel="stylesheet" type="text/css" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
<link href="tomcat.css" rel="stylesheet" type="text/css">
</head>

<body>
Expand All @@ -42,7 +41,7 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
<span id="nav-wiki"><a href="https://wiki.apache.org/tomcat/FrontPage">Wiki</a></span>
<span id="nav-lists"><a href="${tomcatUrl}lists.html">Mailing Lists</a></span>
<span id="nav-help"><a href="${tomcatUrl}findhelp.html">Find Help</a></span>
<br class="separator" />
<br class="separator">
</div>
<div id="asf-box">
<h1>${pageContext.servletContext.serverInfo}</h1>
Expand All @@ -52,7 +51,7 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
<h2>If you're seeing this, you've successfully installed Tomcat. Congratulations!</h2>
</div>
<div id="notice">
<img src="tomcat.png" alt="[tomcat logo]" />
<img src="tomcat.png" alt="[tomcat logo]">
<div id="tasks">
<h3>Recommended Reading:</h3>
<h4><a href="${tomcatDocUrl}security-howto.html">Security Considerations How-To</a></h4>
Expand All @@ -71,7 +70,7 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
<a class="container shadow" href="/host-manager/html"><span>Host Manager</span></a>
</div>
</div>
<br class="separator" />
<br class="separator">
</div>
<div id="middle" class="curved container">
<h3>Developer Quick Start</h3>
Expand All @@ -98,7 +97,7 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
<p><a href="https://wiki.apache.org/tomcat/TomcatVersions">Tomcat Versions</a></p>
</div>
</div>
<br class="separator" />
<br class="separator">
</div>
<div id="lower">
<div id="low-manage" class="">
Expand All @@ -109,7 +108,7 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
<pre>$CATALINA_HOME/conf/tomcat-users.xml</pre>
<p>In Tomcat @VERSION_MAJOR_MINOR@ access to the manager application is split between
different users. &nbsp; <a href="${tomcatDocUrl}manager-howto.html">Read more...</a></p>
<br />
<br>
<h4><a href="${tomcatDocUrl}RELEASE-NOTES.txt">Release Notes</a></h4>
<h4><a href="${tomcatDocUrl}changelog.html">Changelog</a></h4>
<h4><a href="${tomcatUrl}migration.html">Migration Guide</a></h4>
Expand Down Expand Up @@ -138,22 +137,22 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
<h4><a href="${tomcatUrl}faq/">FAQ</a> and <a href="${tomcatUrl}lists.html">Mailing Lists</a></h4>
<p>The following mailing lists are available:</p>
<ul>
<li id="list-announce"><strong><a href="${tomcatUrl}lists.html#tomcat-announce">tomcat-announce</a><br />
<li id="list-announce"><strong><a href="${tomcatUrl}lists.html#tomcat-announce">tomcat-announce</a><br>
Important announcements, releases, security vulnerability notifications. (Low volume).</strong>
</li>
<li><a href="${tomcatUrl}lists.html#tomcat-users">tomcat-users</a><br />
<li><a href="${tomcatUrl}lists.html#tomcat-users">tomcat-users</a><br>
User support and discussion
</li>
<li><a href="${tomcatUrl}lists.html#taglibs-user">taglibs-user</a><br />
<li><a href="${tomcatUrl}lists.html#taglibs-user">taglibs-user</a><br>
User support and discussion for <a href="${tomcatUrl}taglibs/">Apache Taglibs</a>
</li>
<li><a href="${tomcatUrl}lists.html#tomcat-dev">tomcat-dev</a><br />
<li><a href="${tomcatUrl}lists.html#tomcat-dev">tomcat-dev</a><br>
Development mailing list, including commit messages
</li>
</ul>
</div>
</div>
<br class="separator" />
<br class="separator">
</div>
<div id="footer" class="curved container">
<div class="col20">
Expand Down Expand Up @@ -211,7 +210,7 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
</ul>
</div>
</div>
<br class="separator" />
<br class="separator">
</div>
<p class="copyright">Copyright &copy;1999-${year} Apache Software Foundation. All Rights Reserved</p>
</div>
Expand Down
5 changes: 2 additions & 3 deletions webapps/docs/annotationapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
limitations under the License.
-->
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<title>API docs</title>
</head>

<body>

The Annotation API Javadoc is not installed by default. Download and install
Expand Down
7 changes: 3 additions & 4 deletions webapps/docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API docs</title>
</head>

<body>

Tomcat's internal javadoc is not installed by default. Download and install
Expand Down
66 changes: 33 additions & 33 deletions webapps/docs/appdev/sample/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="author" content="Ben Souther" />
<title>Sample Application</title>
<meta charset="UTF-8">
<meta name="author" content="Ben Souther">
<title>Sample Application</title>
</head>
<body>
<h2>Sample Application</h2>
<p>
The example app has been packaged as a war file and can be downloaded
<a href="sample.war">here</a> (Note: make sure your browser doesn't
change file extension or append a new one).
</p>
<p>
The easiest way to run this application is simply to move the war file
to your <b>CATALINA_BASE/webapps</b> directory. A default Tomcat install
will automatically expand and deploy the application for you. You can
view it with the following URL (assuming that you're running tomcat on
port 8080 which is the default):
<br />
<a href="http://localhost:8080/sample">http://localhost:8080/sample</a>
</p>
<p>
If you just want to browse the contents, you can unpack the war file
with the <b>jar</b> command.
</p>
<pre>
jar -xvf sample.war
</pre>
<p>
Note: <b>CATALINA_BASE</b> is usually the directory in which you
unpacked the Tomcat distribution. For more information on
<b>CATALINA_HOME</b>, <b>CATALINA_BASE</b> and the difference between
them see <b>RUNNING.txt</b> in the directory you unpacked your Tomcat
distribution.
</p>
<h2>Sample Application</h2>
<p>
The example app has been packaged as a war file and can be downloaded
<a href="sample.war">here</a> (Note: make sure your browser doesn't
change file extension or append a new one).
</p>
<p>
The easiest way to run this application is simply to move the war file
to your <b>CATALINA_BASE/webapps</b> directory. A default Tomcat install
will automatically expand and deploy the application for you. You can
view it with the following URL (assuming that you're running tomcat on
port 8080 which is the default):
<br>
<a href="http://localhost:8080/sample">http://localhost:8080/sample</a>
</p>
<p>
If you just want to browse the contents, you can unpack the war file
with the <b>jar</b> command.
</p>
<pre>
jar -xvf sample.war
</pre>
<p>
Note: <b>CATALINA_BASE</b> is usually the directory in which you
unpacked the Tomcat distribution. For more information on
<b>CATALINA_HOME</b>, <b>CATALINA_BASE</b> and the difference between
them see <b>RUNNING.txt</b> in the directory you unpacked your Tomcat
distribution.
</p>
</body>
</html>
9 changes: 4 additions & 5 deletions webapps/docs/appdev/sample/web/hello.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@
--%>
<%@ page session="false" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Sample Application JSP Page</title>
<meta charset="UTF-8">
<title>Sample Application JSP Page</title>
</head>
<body>

<div style="float: left; padding: 10px;">
<img src="images/tomcat.gif" alt="" />
<img src="images/tomcat.gif" alt="tomcat">
</div>
<h1>Sample Application JSP Page</h1>
This is the output of a JSP page that is part of the Hello, World
application.


<%= new String("Hello!") %>

</body>
Expand Down
33 changes: 15 additions & 18 deletions webapps/docs/appdev/sample/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,23 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Sample "Hello, World" Application</title>
<meta charset="UTF-8">
<title>Sample "Hello, World" Application</title>
</head>
<body>

<div style="float: left; padding: 10px;">
<img src="images/tomcat.gif" alt="" />
</div>
<h1>Sample "Hello, World" Application</h1>
<p>This is the home page for a sample application used to illustrate the
source directory organization of a web application utilizing the principles
outlined in the Application Developer's Guide.

<p>To prove that they work, you can execute either of the following links:</p>
<ul>
<li>To a <a href="hello.jsp">JSP page</a>.</li>
<li>To a <a href="hello">servlet</a>.</li>
</ul>

<div style="float: left; padding: 10px;">
<img src="images/tomcat.gif" alt="tomcat">
</div>
<h1>Sample "Hello, World" Application</h1>
<p>This is the home page for a sample application used to illustrate the
source directory organization of a web application utilizing the principles
outlined in the Application Developer's Guide.</p>
<p>To prove that they work, you can execute either of the following links:</p>
<ul>
<li>To a <a href="hello.jsp">JSP page</a>.</li>
<li>To a <a href="hello">servlet</a>.</li>
</ul>
</body>
</html>
7 changes: 3 additions & 4 deletions webapps/docs/elapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API docs</title>
</head>

<body>

The EL Javadoc is not installed by default. Download and install
Expand Down
5 changes: 2 additions & 3 deletions webapps/docs/jaspicapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
limitations under the License.
-->
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta charset="UTF-8">
<title>API docs</title>
</head>

<body>

The JASPIC Javadoc is not installed by default. Download and install
Expand Down
7 changes: 3 additions & 4 deletions webapps/docs/jspapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API docs</title>
</head>

<body>

The JSP Javadoc is not installed by default. Download and install
Expand Down
7 changes: 3 additions & 4 deletions webapps/docs/servletapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API docs</title>
</head>

<body>

The Servlet Javadoc is not installed by default. Download and install
Expand Down
7 changes: 3 additions & 4 deletions webapps/docs/websocketapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API docs</title>
</head>

<body>

The WebSocket Javadoc is not installed by default. Download and install
Expand Down
29 changes: 15 additions & 14 deletions webapps/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE HTML><html lang="en"><head>
<meta charset="UTF-8">
<title>Apache Tomcat Examples</title>
</head>
<body>
<p>
<h3>Apache Tomcat Examples</H3>
<p></p>
<ul>
<li><a href="servlets">Servlets examples</a></li>
<li><a href="jsp">JSP Examples</a></li>
<li><a href="websocket/index.xhtml">WebSocket Examples</a></li>
</ul>
</body></html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Apache Tomcat Examples</title>
</head>
<body>
<h3>Apache Tomcat Examples</h3>
<ul>
<li><a href="servlets">Servlets examples</a></li>
<li><a href="jsp">JSP Examples</a></li>
<li><a href="websocket/index.xhtml">WebSocket Examples</a></li>
</ul>
</body>
</html>
1 change: 0 additions & 1 deletion webapps/examples/jsp/async/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Use cases:
- servlet2 does a dispatch to servlet3 (asyncsupported=true)
- servlet3 does a dispatch to servlet4 (asyncsupported=false)


7. Stock ticker
<a href="<%=response.encodeURL("/examples/async/stockticker")%>"> StockTicker </a>
</pre>
Loading