%--
StartPlugIn.jsp
JSP script to start applications on the Web server via a web browser
client.
2003/04/04 ??? Modified.
2004/05/10 WHF Added local host verification.
--%><%!
// In the absence of a security manager, prevents admin, plot, etc
// from killing the servlet engine on System.exit():
static {
com.rbnb.utility.RBNBProcess.setHardExit(false);
}
%><%
// Validate that requesting host is local:
java.net.InetAddress requestAddr
= java.net.InetAddress.getByName(request.getRemoteAddr());
java.net.InetAddress[] addrs = java.net.InetAddress.getAllByName(
request.getServerName());
boolean ok = false;
for (int ii = 0; ii < addrs.length; ++ii) {
if (addrs[ii].equals(requestAddr)) {
ok = true;
break;
}
}
if (!ok) { %>
The <%= request.getParameter("plugInName") %> was launched.
<% } catch (ClassNotFoundException cnfe) { %>The PlugIn could not be launched: class "<%= request.getParameter("className") %>" not found.
<% } %> <% } %>