morgand 01/08/28 14:16:15
Modified: latka-webapp/webapp RunTest.jsp index.jsp
latka-webapp/webapp/WEB-INF web.xml
Added: latka-webapp/webapp SetTestDir.jsp TestMenu.jsp
Log:
stubbing out simple functions to read directories
Revision Changes Path
1.2 +1 -1 jakarta-commons-sandbox/latka-webapp/webapp/RunTest.jsp
Index: RunTest.jsp
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/RunTest.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RunTest.jsp 2001/08/28 18:06:42 1.1
+++ RunTest.jsp 2001/08/28 21:16:15 1.2
@@ -1,4 +1,4 @@
- <%@ taglib uri="http://jakarta.apache.org/taglibs/latka-taglib"
prefix="latka" %>
+<%@ taglib uri="http://jakarta.apache.org/taglibs/latka-taglib" prefix="latka" %>
<html>
<head>
1.2 +1 -1 jakarta-commons-sandbox/latka-webapp/webapp/index.jsp
Index: index.jsp
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/index.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.jsp 2001/08/28 18:06:42 1.1
+++ index.jsp 2001/08/28 21:16:15 1.2
@@ -1,7 +1,7 @@
<h2>Latka</h2>
<p>
- <a href="TestMenu.jsp"></a><u>List of existing tests</u><br>
+ <a href="TestMenu.jsp">List of existing tests</a><br>
<a href="RunTest.jsp">Run a test manually</a>
</p>
1.1 jakarta-commons-sandbox/latka-webapp/webapp/SetTestDir.jsp
Index: SetTestDir.jsp
===================================================================
<%@ page import="java.util.Properties,org.apache.commons.latka.LatkaProperties" %>
<%
Properties props = (Properties) session.getAttribute("latka.sessionProperties");
props.setProperty("latka.testDir",
request.getParameter("testDir"));
%>
<jsp:forward page="TestMenu.jsp"/>
1.1 jakarta-commons-sandbox/latka-webapp/webapp/TestMenu.jsp
Index: TestMenu.jsp
===================================================================
<%@ page import="java.util.Properties,org.apache.commons.latka.LatkaProperties" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/latka-taglib" prefix="latka" %>
<%
Properties props = (Properties) session.getAttribute("latka.sessionProperties");
if (props == null) {
props = LatkaProperties.getProperties();
session.setAttribute("latka.sessionProperties",props);
}
String testDir = props.getProperty("latka.testDir");
if (testDir == null) {
testDir = application.getInitParameter("latka.testDir");
props.setProperty("latka.testDir",
testDir);
}
%>
<html>
<head>
</head>
<body>
<p>
<form action="SetTestDir.jsp">
Reading tests from directory: <b><%= testDir %></b>
<input type="text" name="testDir">
<input type="submit" value="Set Test Directory">
</form>
</p>
<p>
<latka:listTests id="files" testDir="<%= testDir %>"/>
<% for (int i = 0; i < files.length; ++i) { %>
<%= files[i].getName() %><br>
<% } %>
</p>
</body>
</html>
1.2 +7 -1 jakarta-commons-sandbox/latka-webapp/webapp/WEB-INF/web.xml
Index: web.xml
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/WEB-INF/web.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- web.xml 2001/08/28 18:06:42 1.1
+++ web.xml 2001/08/28 21:16:15 1.2
@@ -7,8 +7,14 @@
<web-app>
<description>
- Latka standard web application
+ Latka standard web application
</description>
+
+ <context-param>
+ <param-name>latka.testDir</param-name>
+ <param-value>/lib/latka/doc</param-value>
+ </context-param>
+
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/latka-taglib</taglib-uri>
<taglib-location>/WEB-INF/latka-taglib.tld</taglib-location>