My problem is I have a cache file that I'm pulling in from a seperate source. The cache contains a long string that would look something like this except much longer.
myexample=1 status=0 timesHit=2500
Basically I need help figuring out how to break this up into
myexample=1
status=0
timesHit=2500
The java code is written inside of html code but I know the html code well enough.
I don't think this is overly complicated but I just can't seem to get it to work.
<%
final CacheManager cacheManager = CacheManager.getInstance();
String[] names = cacheManager.getCacheNames();
Arrays.sort(names);
%>
<%
for (int i = 0; i < names.length; i++) {
Cache cache = cacheManager.getCache(names[i]);
%>
<table border="1" bordercolor="#cc0000">
<tr class="tan">
<td colspan="3">
<div class="largeHeader2"> Cache <%= i %>: <%=names[i]%> </div>
<div class="smallCopy"> <table>
<%
[B]String info;
String line = cacheManager.getCache(info);
for(j = 0; j < parts.length; j++) {
String [] parts = line.split(" ");[/B]
}
%>
the bolded part is the part i've edited. Everything else should be correct. The bold part is the part I'm having trouble with.
The bold is very wrong but I have been trying to figure this out for many hours so this is desperation code.
The original code looked like this so that you can see the parts i have screwed up.
<%
final CacheManager cacheManager = CacheManager.getInstance();
String[] names = cacheManager.getCacheNames();
Arrays.sort(names);
%>
<%
for (int i = 0; i < names.length; i++) {
Cache cache = cacheManager.getCache(names[i]);
%>
<table border="1" bordercolor="#cc0000">
<tr class="tan">
<td colspan="3">
<div class="largeHeader2"> Cache <%= i %>: <%=names[i]%> </div>
<div class="smallCopy"> <%= [B]cache[/B] %> Total elements cached currently: <%= cache.getKeysWithExpiryCheck().size() %> </div>
</td>
</tr>
the bolded cache is what i change and where i need to add the new code.