Skip to content

Instantly share code, notes, and snippets.

@bjorn-ali-goransson
Created March 6, 2014 09:05
Show Gist options
  • Save bjorn-ali-goransson/9385779 to your computer and use it in GitHub Desktop.
Save bjorn-ali-goransson/9385779 to your computer and use it in GitHub Desktop.
JSP that check free memory
<!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<style>
body{background:url('mostar-bosnia.jpg');}
.container{margin-top:200px;text-align:center;}
</style>
</head><body>
<div class="container">
<span class="btn btn-success btn-lg">
<i class="fa fa-coffee"></i>
Welcome to Java (<%= Runtime.getRuntime().freeMemory() %> bytes free)
</span>
</div>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment