org.jboss.net.taglib
public class: FlashParametersTag [javadoc |
source]
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.jboss.net.taglib.FlashParametersTag
All Implemented Interfaces:
IterationTag, Serializable
JSP Tag class for FlashParameters JSP tag. The purpose is to pass
information to a Flash program embedded in a web page so that needed
initial data is available to it. Two types of information are passed, one
set is the hostUrl and the serviceContext of the SOAP server. The second
is a collection of variable name, value pairs that would also be useful to
the Flash program. When a web page contains a Flash program (.swf) file,
it specifies an <OBJECT> tag. Inside the <OBJECT> tag is a parameter such
as:
<PARAM NAME=movie VALUE="HelloWorldForm.swf">
Using a Macromedia specified technique for passing parameters to Flash, we
place at the end of the VALUE attribute, the FlashParameter tag:
...m.swf<flash:flashparms/>">
The instantiated tag becomes:
?hostUrl=http://www.yourhost.com:8080&rootContext=axis
The tag attribute mbeanName, if not specified, has a default value of
"
jboss.net:service=Axis"
As an added feature, by specifying a Bean, using the Tag "parms" attribute
that implements the java.util.Map interface the set of key/value pairs are
added to the Flash movie parameter list.
- created:
30. - May 2002
- author:
< - a href="mailto:fbrier@multideck.com">Frederick N. Brier
- version:
$ - Revision: 1.4.2.1 $
- jsp:tag:
name - ="flashparms"
body-content="empty"
display-name="Flash Movie Parameters"
description="Provide support for Flash SOAP and parameter passing"
| Field Summary |
|---|
| public static final String | DEFAULT_JBOSSNET_MBEAN_NAME | |
| Methods from javax.servlet.jsp.tagext.TagSupport: |
|---|
|
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
| Method from org.jboss.net.taglib.FlashParametersTag Detail: |
public int doStartTag() throws JspTagException {
HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
try
{
JspWriter out = pageContext.getOut();
// out.print( "?hostUrl=http://tornado.multideck.dnsq.org:8080&rootContext=/axis/services" );
if ( null == mbeanName )
{
// Look for MBean using default values.
mbeanName = DEFAULT_JBOSSNET_MBEAN_NAME;
}
MBeanServer server = MBeanServerLocator.locateJBoss();
ObjectName jbossNetObjName = new ObjectName( mbeanName );
String rootContext = (String)server.getAttribute( jbossNetObjName, "RootContext" );
// String hostUrl = (String)server.getAttribute( jbossNetObjName, "HostUrl" );
URL reqUrl = new URL( request.getRequestURL().toString() );
String hostUrl = reqUrl.getHost() + ":" + reqUrl.getPort();
out.print( "?hostUrl=" + hostUrl + "&rootContext=" + rootContext );
if ( null != parms )
{
// Output any remaining parameters
Iterator iter = parms.entrySet().iterator();
Map.Entry curEntry;
while ( iter.hasNext() )
{
curEntry = (Map.Entry)iter.next();
out.print( "&" + curEntry.getKey().toString().trim() + "=" + curEntry.getValue().toString().trim() );
}
} // if - there are map entries to output as parameters
}
catch( Exception e )
{
e.printStackTrace();
throw new JspTagException( e.toString() );
}
return SKIP_BODY;
}
|
public String getMbeanName() {
return this.mbeanName;
}
Gets the Flash AxisService MBean name. |
public Map getParms() {
return parms;
}
Gets additional parameters for Flash Movie. |
public void setMbeanName(String mbeanName) {
this.mbeanName = mbeanName;
}
|
public void setParms(Map parms) {
this.parms = parms;
}
|