<commit_before><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ page import="java.util.*, java.lang.*, java.io.*" %> 
<% 	/*	
		This page receives the section identifier in the query string (s)
		Read properties file based on this ID, then assembles the 
		tiles (only as includes) to build the form
 		[reads from props file and generate content with a loop ]
		
		props file example: dataType.properties
		1=dataElement
		2=dateElementTwo
		
		corresponding JSP tiles are called: dataElement_tile.jsp
	*/
%>

<%

	Properties props = new Properties();
    try {
    props.load(new FileInputStream(getServletConfig().getServletContext().getRealPath("WEB-INF")+"/"+request.getParameter("s")+".properties"));
    } 
	catch (IOException e) {
    out.println("cant read props");
	}
	String strIncFile = "";
	for (int t=1; t<props.size()+1; t++)	{	
		strIncFile = "/jsp/tiles/"+props.getProperty(String.valueOf(t))+"_tile.jsp";
		%>
		<tr class="report"><td><tiles:insert page="<%= strIncFile %>" flush="true" /></td></tr>
		<%
	}
%>


<commit_msg>added hidden form tags to tiles<commit_after><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page import="java.util.*, java.lang.*, java.io.*" %> 
<% 	/*	
		This page receives the section identifier in the query string (s)
		Read properties file based on this ID, then assembles the 
		tiles (only as includes) to build the form
 		[reads from props file and generate content with a loop ]
		
		props file example: dataType.properties
		1=dataElement
		2=dateElementTwo
		
		corresponding JSP tiles are called: dataElement_tile.jsp
	*/
%>
<%

//below, we need to set the form action to the name cooresponding bean/action - 
// get if from the request, and make lower to match the struts-config
String act = request.getParameter("s").toLowerCase();
%>
<html:form action="<%= act %>" >
<%
	Properties props = new Properties();
    try {
    props.load(new FileInputStream(getServletConfig().getServletContext().getRealPath("WEB-INF")+"/"+request.getParameter("s")+".properties"));
    } 
	catch (IOException e) {
    out.println("cant read props");
	}
	String strIncFile = "";
	for (int t=1; t<props.size()+1; t++)	{	
		strIncFile = "/jsp/tiles/"+props.getProperty(String.valueOf(t))+"_tile.jsp?act="+act;
		%>
		<tr class="report"><td><tiles:insert page="<%= strIncFile %>" flush="false" /></td></tr>
		<%
	}
%>
</html:form>



{'fraction_non_alphanumeric': 0.1678179601787891, 'fraction_numerical': 0.003250711093051605, 'mean_word_length': 4.139874739039666, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4882794', 'n_tokens_mistral': 900, 'n_tokens_neox': 815, 'n_words': 214}