Jeremy Stein - Brain
« Cacti portlet | Sharepoint field type Integer » |
AdventNet Netflow Portlet
In order to use AdventNet Netflow as a portlet, I had to make the following changes:
- Copied the JDK to the server and updated the JAVA_HOME in run.bat to use it. This is required to compile JSPs. (run.bat already had a reference to tools.jar which only exists in the JDK. They AdventNet forgot to remove the reference when the crippled their JBoss installation).
- Copied ant 1.6 to the server (F:\apache-ant-1.6.5) and updated the JBOSS_CLASSPATH in run.bat to use it. This is required to compile JSPs in JBoss.
- Modified NetFlow\applications\extracted\NetFlowAnalyzer.eear\NetFlowAnalyzer.ear\NetFlowClient.war\Login.jsp to support passing in the username and password. Also added a p3p header to allow cookies to work within an iframe.
- Added NetFlow\applications\extracted\NetFlowAnalyzer.eear\NetFlowAnalyzer.ear\NetFlowClient.war\autologin.jsp to accept the username/password and submit them as a post to index.jsp.
- Modified NetFlow\applications\extracted\NetFlowAnalyzer.eear\NetFlowAnalyzer.ear\NetFlowClient.war\WEB-INF\classes\org\apache\jsp\jspui\index_jsp.class with a… ahem, hex editor. AdventNet didn’t want anyone editing their JSPs, so they bypassed the normal auto-compilation provided by JBoss. Fortunately, I just had to modify some strings, which are fairly straightforward to change in a .class file. I found every reference to “_parent†(there were three of them) and I changed the preceeding “target=†to “targeX=â€. This will cause the web browser to ignore the unrecognized attribute and the links will stop breaking out of the iframe. As far as I can tell, there was no need for the target attribute. Maybe there used to be in an earlier version.
Update: Instead of a hex editor, I switched to using a regex servlet filter.
No Comments
Be the first to comment!
« Cacti portlet | Sharepoint field type Integer » |
Leave a Reply