morgand 01/09/06 08:22:04
Modified: latka-webapp/webapp SetProperties.jsp TestMenu.jsp
latka-webapp/webapp/WEB-INF web.xml
Added: latka-webapp/webapp ProcessTestURL.jsp RunTestURL.jsp
Removed: latka-webapp/webapp ProcessTestFile.jsp RunTestFile.jsp
Log:
changed all String file URI references to URLs, should be more flexible
Revision Changes Path
1.2 +2 -2 jakarta-commons-sandbox/latka-webapp/webapp/SetProperties.jsp
Index: SetProperties.jsp
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/SetProperties.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SetProperties.jsp 2001/08/31 20:11:36 1.1
+++ SetProperties.jsp 2001/09/06 15:22:03 1.2
@@ -5,9 +5,9 @@
<latka:setPropertiesFromRequest properties="props"/>
-<% if (request.getParameter("testFile") != null) { %>
+<% if (request.getParameter("url") != null) { %>
- <jsp:forward page="RunTestFile.jsp"/>
+ <jsp:forward page="RunTestURL.jsp"/>
<% } else { %>
1.5 +3 -3 jakarta-commons-sandbox/latka-webapp/webapp/TestMenu.jsp
Index: TestMenu.jsp
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/latka-webapp/webapp/TestMenu.jsp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TestMenu.jsp 2001/08/31 20:11:36 1.4
+++ TestMenu.jsp 2001/09/06 15:22:03 1.5
@@ -25,9 +25,9 @@
<latka:listTests id="files" testDir="<%= testDir %>"/>
<% for (int i = 0; i < files.length; ++i) { %>
- <% String fileName = testDir + "/" + files[i].getName(); %>
- <form action="ProcessTestFile.jsp" method="post">
- <input type="hidden" name="testFile" value="<%= fileName %>">
+ <% String fileName = files[i].toURL().toString(); %>
+ <form action="ProcessTestURL.jsp" method="post">
+ <input type="hidden" name="url" value="<%= fileName %>">
<input type="submit" value="Run Test">
<%= files[i].getName() %>
</form>
1.1 jakarta-commons-sandbox/latka-webapp/webapp/ProcessTestURL.jsp
Index: ProcessTestURL.jsp
===================================================================
<%@ page import="java.util.Iterator" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/latka-taglib"
prefix="latka" %>
<% String url = request.getParameter("url"); %>
<latka:findVariables id="set"
url="<%= url %>"/>
<% Iterator i = set.iterator();
if (i.hasNext() == false) {
%>
<jsp:forward page="RunTestURL.jsp"/>
<% } %>
<p>These variables must be set before running the test:</p>
<latka:sessionProperties id="props"/>
<form method="post" action="SetProperties.jsp">
<input type="hidden" name="url" value="<%= url %>">
<% while (i.hasNext()) {
String property = (String) i.next(); %>
<p>
<%= property %>:
<input type="text" name="latka.property.<%= property %>"
value="<%= props.getProperty(property, "[no default value]") %>">
</p>
<% } %>
<p><input type="submit" value="Set variables and execute test"></p>
</form>
1.1 jakarta-commons-sandbox/latka-webapp/webapp/RunTestURL.jsp
Index: RunTestURL.jsp
===================================================================
<%@ taglib uri="http://jakarta.apache.org/taglibs/latka-taglib" prefix="latka" %>
<latka:sessionProperties id="props"/>
<% String url = request.getParameter("url"); %>
<pre>
<latka:executeSuite url="<%= url %>" properties="props"/>
</pre>
<a href="TestMenu.jsp">[Return to test menu]</a>
1.3 +5 -0 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- web.xml 2001/08/28 21:16:15 1.2
+++ web.xml 2001/09/06 15:22:04 1.3
@@ -19,4 +19,9 @@
<taglib-uri>http://jakarta.apache.org/taglibs/latka-taglib</taglib-uri>
<taglib-location>/WEB-INF/latka-taglib.tld</taglib-location>
</taglib>
+
+ <taglib>
+ <taglib-uri>http://jakarta.apache.org/taglibs/io</taglib-uri>
+ <taglib-location>/WEB-INF/io.tld</taglib-location>
+ </taglib>
</web-app>