Recently got a requirement to do generation of dynamic tables based on data output. Used jsp to perform the generation of table from data format of list of multidimensional string arrays List<String[][]>. This will enable generation of multiple tables by looping number of String[][] with the first string array as number of rows and the second string array as number of columns. The jsp code is as below.
<%
List<String[][]> processLst = new ArrayList<String[][]>();
processLst = //-- call method to get the list
String outstr = "";
int i = 0;
for (i = 0; i < processLst.size(); i++) {
String[][] outputData = processLst.get(i);
%>
<div>
<table border="1" width="450" >
<tr class="font-white">
<th bgcolor="#000000" colspan="<%=outputData[i].length %>"><%=outputData[0][0] %>
</th>
</tr>
<%
for (int rowNum = 1; rowNum < outputData.length; rowNum++) {
%>
<tr>
<%
for (int cellNum = 0; cellNum < outputData[0].length; cellNum++) {
outstr="";
if(outputData[rowNum][cellNum]!=null)
outstr = outputData[rowNum][cellNum];
%>
<td bgcolor="white">
<%=outstr %>
</td>
<%
}
%>
</tr>
<%
}
%>
</table>
</div>
Wednesday, August 31, 2011
Sunday, August 21, 2011
Hotdeploy in jboss 7.0.1
The new Jboss 7 server is blazing fast starting up and shutting down. To perform hot deploy or doing development on exploded war, there are setting in the configuration folder that needs changing.
For standalone deployment, go to standalone/configuration directory and open standalone.xml. Look for the line below.
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" deployment-timeout="60"/>
</subsystem>
Add this param to enable hot deploy auto-deploy-exploded="true"
Changes are as below:
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" auto-deploy-exploded="true" deployment-timeout="60"/>
</subsystem>
For standalone deployment, go to standalone/configuration directory and open standalone.xml. Look for the line below.
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" deployment-timeout="60"/>
</subsystem>
Add this param to enable hot deploy auto-deploy-exploded="true"
Changes are as below:
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner name="default" path="deployments" scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir" auto-deploy-exploded="true" deployment-timeout="60"/>
</subsystem>
Subscribe to:
Posts (Atom)