Embedding Moskito-WebUI Into Your Application

Similar documents
UIMA Simple Server User Guide

Snowdrop 1.0 User Guide

FreeMarker in Spring Web. Marin Kalapać

3.2 Example Configuration

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Tutorial: Developing a Simple Hello World Portlet

CHAPTER 6. Organizing Your Development Project. All right, guys! It s time to clean up this town!

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

Web Application Architecture (based J2EE 1.4 Tutorial)

PHP Development for ClearPath. Session 3028, Tuesday, May 15, 2012, 10:30AM Ron Neubauer, Principal Engineer, Unisys Corporation

KonaKart Portlet Installation for Liferay. 2 nd January DS Data Systems (UK) Ltd., 9 Little Meadow Loughton, Milton Keynes Bucks MK5 8EH UK

7.1. RELEASE-NOTES-2.0-M1.TXT

JSF: Introduction, Installation, and Setup

Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

ByggSøk plan Project Structure And Build Process

The DataNucleus REST API provides a RESTful interface to persist JSON objects to the datastore. All entities are accessed, queried and stored as

Jakarta Struts: An MVC Framework

Distributed Applications Spring MVC 2.5

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar

VIVO 1.9.x Documentation

One application has servlet context(s).

Oracle Developer Depot Technical Review

Introduction to Java Server Faces(JSF)

Novell Access Manager authentication class for OpenID authentication

COPYRIGHTED MATERIAL

Java.. servlets and. murach's TRAINING & REFERENCE 2ND EDITION. Joel Murach Andrea Steelman. IlB MIKE MURACH & ASSOCIATES, INC.

what and why DSpace AddOn and Component Management System

web.xml Deployment Descriptor Elements

CS506 today quiz solved by eagle_eye and naeem latif.mcs. All are sloved 99% but b carefull before submitting ur own quiz tc Remember us in ur prayerz

CS506 Web Design & Development Final Term Solved MCQs with Reference

Life Without NetBeans

Guide Organization JReport Monitor Server

System Administrator Manual

SAS AppDev Studio TM 3.4 Eclipse Plug-ins. Migration Guide

Artix ESB. Configuring and Deploying Artix Solutions, Java Runtime. Making Software Work Together TM. Version 5.0, July 2007

Simplifying GWT RPC with

ADVANCED JAVA COURSE CURRICULUM

Signicat Connector for Java Version 4.x. Document version 1

Developing Spring based WebSphere Portal application using IBM Rational Application Developer

Simplified Build Management with Maven

SSO Plugin. Integrating Business Objects with BMC ITSM and HP Service Manager. J System Solutions. Version 5.

Web Services in Java. The shortest path to exposing and consuming web services in Java

Advance Java. Configuring and Getting Servlet Init Parameters per servlet

Using SailFin and Eclipse to build SIP-based and RESTful applications

Session 24. Spring Framework Introduction. Reading & Reference. dev.to/lechatthecat/how-to-use-spring-boot-java-web-framework-withintellij-idea-202p

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

JAVA MICROSERVICES. Java Language Environment. Java Set Up. Java Fundamentals. Packages. Operations

Artix ESB. Configuring and Deploying Artix Solutions, Java Runtime. Making Software Work Together TM. Version 5.1, Dec 2007

CodeCharge Studio Java Deployment Guide Table of contents

1. What is This Guide about / Goals The Project JGuard Configuration... 11

Spring MVC. PA 165, Lecture 8. Martin Kuba

Study Guide for Intermediate Java Developers

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

WebSphere Application Server for z/os I'm Not a Dummy But...

Java Training Center, Noida - Java Expert Program

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

11-15 DECEMBER ANTWERP BELGIUM

Hotfix 913CDD03 Visual Data Explorer and SAS Web OLAP Viewer for Java

Abstract. Avaya Solution & Interoperability Test Lab

GlassFish Survival Guide. Alexis Moussine-Pouchkine GlassFish Team Sun Microsystems

Introduction to Servlets. After which you will doget it

SSO Plugin. HP Service Request Catalog. J System Solutions. Version 3.6

This page is DEPRECATED, please refer to the new source

OSGi. Building LinkedIn's Next Generation Architecture with OSGI

JBoss to Geronimo - EJB-Session Beans Migration

COMP REST Programming in Eclipse

Building LinkedIn's Next Generation Architecture with OSGI

Topics Augmenting Application.cfm with Filters. What a filter can do. What s a filter? What s it got to do with. Isn t it a java thing?

Installing Shibbolized Tiqr

QuickClip Portlet, BEA WebLogic Edition Developer Guide

Configuring Tomcat for a Web Application

Oracle 1Z Java EE 6 Web Component Developer(R) Certified Expert.

Jaxb2 Maven Plugin Could Not Process Schema

Web Experience Management Framework Version 1.0. Developer s Guide

DVS WEB INFOTECH DEVELOPMENT TRAINING RESEARCH CENTER

CORE JAVA 1. INTRODUCATION

Jakarta Struts: An MVC Framework

PRODUCT DOCUMENTATION. Installing and Implementing Enterprise Contact Center Chat RELEASE 5.1

servlets and Java JSP murach s (Chapter 2) TRAINING & REFERENCE Mike Murach & Associates Andrea Steelman Joel Murach

Developing Web Services. with Axis. Web Languages Course 2009 University of Trento

Creating a New Project with Struts 2

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies

Spring boot multipart response

Grouper UI csrf xsrf prevention

CMIS CONNECTOR MODULE DOCUMENTATION DIGITAL EXPERIENCE MANAGER 7.2

Configuring Artifactory

Continuous Integration using Cruise Control

OSGi on the Server. Martin Lippert (it-agile GmbH)

JAX-RS and Jersey Paul Sandoz

Java EE 6 & GlassFish v3 Paving the path for future. Arun Gupta Sun Microsystems, Inc.

Setting Up the Development Environment

Anno Accademico Laboratorio di Tecnologie Web. Sviluppo di applicazioni web JSP

The Struts MVC Design. Sample Content

SSO Plugin. Integrating Business Objects with BMC ITSM and HP Service Manager. J System Solutions. Version 3.

Introduction to JSP and Servlets Training 5-days

E-Nature Tutorial for Google Web Toolkit. Dominik Erbsland

Crystal Reports XI Release 2

Info Error Deploying Artifact Failed To Transfer File Return Code Is 401

04/29/2004. Step by Step Guide for Building a simple JSF Application (Guess a Number) - V1.0

An Application for Monitoring Solr

Transcription:

Embedding Moskito-WebUI Into Your Application This guide tells how to embed MoSKito-WebUI into your application. After embedding and before you start working, we encourage you to look through the User Guide. This guide contains info for versions below 2.4.0. With version 2.4.0 and servlet spec 3.0 no changes of the web.xml are needed. The libs If you are not using maven or ivy, you'll need to add following libs: ano-util.jar - StringUtils from ano* open source projects. commons-beanutils.jar - Needed by tasks. log4j.jar - Logging. moskito-core.jar - Core MoSKito functionality. moskito-util.jar - MoSKito Utils. moskito-web.jar - Core MoSKito functionality. moskito-webui.jar - MoSKito Utils. All these jars are parts of MoSKito distribution package. You can also get the latest version in our ivy repository: svn://svn.anotheria.net/opensource/ivy-shared-repository. or from our nexus: http://nexus.anotheria.net If you checkout the project for building, you'll find additional three jars, which are not needed at runtime: jsp-api.jar, junit.jar and servlet-api.jar The web.xml MoSKito is configured via web.xml. Here is the least needed snipplet:

<!-- Moskito --> <!-- Adding filter to moskito ui which redirects requests to /mui /* to moskito user interface --> <filter> <filter-name>moskitouifilter</filter-name> <filter-class>net.anotheria.moskito.webui.moskitouifilter< /filter-class> <init-param> <param-name>path</param-name> <param-value>/mui/</param-value> </init-param> </filter> <filter-mapping> <filter-name>moskitouifilter</filter-name> <url-pattern>/mui/*< </filter-mapping> This will force all requests to <context>/mui/ to be redirected to MoSKito WebUI. Feel free to choose another path at your will. It's generally also a good idea to add some default MoSKito filters:

<!-- adding moskito measurement and command filters --> <filter> <filter-name>requesturifilter</filter-name> <filter-class>net.anotheria.moskito.web.filters.requesturifilter< /filter-class> <init-param> <param-name>limit</param-name> <param-value>1500</param-value> </init-param> </filter> <filter> <filter-name>moskitocommandfilter</filter-name> <filter-class>net.anotheria.moskito.web.filters. MoskitoCommandFilter</filter-class> </filter> <filter> <filter-name>journeyfilter</filter-name> <filter-class>net.anotheria.moskito.web.filters.journeyfilter< /filter-class> </filter> <filter-mapping> <filter-name>requesturifilter</filter-name> <url-pattern>/*< </filter-mapping> <filter-mapping> <filter-name>moskitocommandfilter</filter-name> <url-pattern>/*< </filter-mapping> <filter-mapping> <filter-name>journeyfilter</filter-name> <url-pattern>/*< </filter-mapping> <!-- /Moskito END --> And than there are some listeners:

<!-- this listener will init moskito with the context name and cleanup jmx beans and timers on undeploy --> <listener> <listener-class> net.anotheria.moskito.webui.util.startstoplistener </listener-class> </listener> <!-- provides information about created sessions --> <listener> <listener-class> net.anotheria.moskito.web.session. SessionCountProducer </listener-class> </listener> <!-- prepared some useful accumulators --> <listener> <listener-class> net.anotheria.moskito.webui.util. SetupPreconfiguredAccumulators </listener-class> </listener> <!-- here you will usually configure your thresholds and accumulators --> Styles, Images, JSPs... Finally you have to put MoSKito styles, jsps and images in your webapp (don't worry, there are few of them). They are all contained in the supplied moskito-webui.jar. Following ant script copies everything where it should be: <?xml version="1.0"?> <project name="moskitoui" basedir="."> <property name="moskito.lib" value="moskito"/> <!-- folder in which moskito libs are located --> <property name="webapp.tmp.dir" value="build/war"/> <!-- target folder for the webapp --> <target name="inject-moskitoui-webxml"> <echo>replacing web.xml</echo> <copy file="${moskito.lib}/web.xml" tofile="${webapp.tmp.dir} /WEB-INF/web.xml" overwrite="true"/> </target> <target name="inject-moskitoui-data"> <echo>adding moskito classes, images and jsps.</echo> <copy todir="${webapp.tmp.dir}/web-inf/lib"> <fileset dir="${moskito.lib}"> <include name="**/*.jar"/>

</fileset> </copy> dir}" > <include name="**/*.jsp"/> dir}/web-inf/static/msk" > <include name="img/*.jpg"/> <include name="img/*.gif"/> dir}" > <include name="css/*.css"/> dir}" > <include name="js/*.js"/> dir}/web-inf/" > <include name="tld/*"/> </target> <target name="inject-moskitoui" depends="inject-moskitoui-webxml, inject-moskitoui-data"/> Of course you may simply put extracted versions in your project and adopt changes in your web.xml permanently. MoSKito can't find the JSPs? Some people map everything to a single servlet, and some of the servlets and dispatchers out there are just crap. For example Spring MVC Servlet. The dispatcher it provides can't resolve jsps or other existing resources properly. If you have such a case, you can still map all jsps and resources manually in the web.xml. It doesn't look nice, but it works. And its optional, in 99% of cases you won't need it: <!-- Moskito JSP Mapping, due to /* to spring servlet the jsps have to be mapped by fully qualified name to ensure the jsp servlet working properly -->

/Producers.jsp< /ProducersXML.jsp< /ProducersCSV.jsp< /Producer.jsp< /ProducerXML.jsp< /ProducerCSV.jsp< /InspectProducerXML.jsp< /InspectProducer. jsp< /Explanations.jsp< /UseCases.jsp< /RecordedUseCase. jsp<

/MonitoringSessions.jsp< /MonitoringSessionCall.jsp< /MonitoringSession.jsp< /Menu.jsp</urlpattern> /CSS.jsp</urlpattern> /IntervalSelection.jsp< /UnitSelection. jsp< /CategorySelection.jsp< /SubsystemSelection.jsp< <servlet-name>default</servlet-name> <url-pattern>/js/wz_tooltip.js< <!-- /Moskito JSP -->

Accessing your app with WebUI is described in WebUI User Guide