<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.io.File" %>
<%
/*******************************************************************************
 * Copyright (c) 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
%>      
<jsp:useBean id="template" scope="request" class="org.eclipse.cosmos.provisional.dr.ps.common.Template" /> 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>COSMOS Test Page</title>

<style type="text/css">
		@import "<%= template.getDojoBaseUrl() %>/dojo/resources/dojo.css";
		@import "<%= template.getDojoBaseUrl() %>/dijit/themes/tundra/tundra.css";
		@import "<%= template.getPage() %>/css/style.css";

</style>

<%= template.header() %>


<script>
dojo.require("dijit.layout.SplitContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.TitlePane");
</script>


</head>
<body class="tundra">

		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="wpsBannerEnclosure">

			<tr>
                      <td height="35" align="left" bgcolor="#F5F5F5">COSMOS Test Page</td>
                      <td height="35" align="right"  bgcolor="#F5F5F5"></td>
			</tr>
		</table>
<table style="padding:5px"><tr>
<td>The following are links used to test the COSMOS end-to-end and User Interface Infrastructure
</td>
</tr>
</table>
<ul>
<%
//lets read the pages directory
String pagesPath = this.getServletContext().getRealPath("pages");
if (pagesPath != null){
	File pageDir = new File(pagesPath);
	if (pageDir.isDirectory()){
		File[] files = pageDir.listFiles();
		for (int x = 0; x < files.length; x++){
			File file = files[x];
			if (file.isDirectory()){
%>
<li><a href="?page=<%=file.getName()%>"><%=file.getName()%></a></li>
<%				
			}
		}
		
	}
}
%>
</ul>
</body>
