|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.as400.util.html.HTMLTagAttributes com.ibm.as400.util.html.HTMLServlet
public class HTMLServlet extends HTMLTagAttributes implements Serializable
The HTMLServlet class represents a server-side include in an HTML page.
This example creates a HTMLServlet tag:
// Create an HTMLServlet. HTMLServlet servlet = new HTMLServlet("myServlet", "http://server:port/dir");// Create a parameter, then add it to the servlet. HTMLParameter param = new HTMLParameter("parm1", "value1"); servlet.addParameter(param);
// Create and add second parameter HTMLParameter param2 = servlet.add("parm2", "value2"); System.out.println(servlet);
Here is the output of the HTMLServlet tag:
<servlet name="myServlet" codebase="http://server:port/dir"> <param name="parm1" value="value1"> <param name="parm2" value="value2"> If you see this text, the web server providing this page does not support the SERVLET tag. </servlet>
HTMLServlet objects generate the following events:
Constructor and Description |
---|
HTMLServlet()
Constructs a default HTMLServlet object. |
HTMLServlet(String name)
Constructs an HTMLServlet object with the specified servlet name. |
HTMLServlet(String name,
String location)
Constructs an HTMLServlet object with the specified servlet name and location. |
Modifier and Type | Method and Description |
---|---|
void |
addElementListener(ElementListener listener)
Adds an addElementListener. |
void |
addParameter(HTMLParameter param)
Adds an HTMLparameter to the servlet tag. |
HTMLParameter |
addParameter(String name,
String value)
Adds an HTMLParameter to the servlet. |
String |
getFOTag()
Returns a comment tag. |
String |
getLocation()
Returns the location of the servlet. |
String |
getName()
Returns the name of the servlet. |
String |
getTag()
Returns the tag for the HTML servlet. |
String |
getText()
Returns the alternate text of the servlet. |
void |
removeElementListener(ElementListener listener)
Removes this ElementListener from the internal list. |
void |
removeParameter(HTMLParameter param)
Removes an HTMLParameter from the servlet tag. |
void |
setLocation(String location)
Sets the location for the servlet source. |
void |
setName(String name)
Sets the class name of the servlet. |
void |
setText(String text)
Set the alternate text for the servlet, which will be displayed if the web server does not support the servlet tag. |
String |
toString()
Returns a String representation for the HTMLServlet tag. |
Methods inherited from class com.ibm.as400.util.html.HTMLTagAttributes |
---|
addPropertyChangeListener, getAttributes, getAttributeString, removePropertyChangeListener, setAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HTMLServlet()
public HTMLServlet(String name)
name
- The servlet name.public HTMLServlet(String name, String location)
name
- The servlet name.location
- The servlet location (http://server:port/dir).Method Detail |
---|
public void addParameter(HTMLParameter param)
param
- The parameter.public HTMLParameter addParameter(String name, String value)
name
- The parameter name.value
- The parameter value.public void addElementListener(ElementListener listener)
listener
- The ElementListener.removeElementListener(com.ibm.as400.util.html.ElementListener)
public String getLocation()
public String getName()
public String getText()
public String getFOTag()
getFOTag
in interface HTMLTagElement
public String getTag()
getTag
in interface HTMLTagElement
public void removeParameter(HTMLParameter param)
param
- The parameter.public void removeElementListener(ElementListener listener)
listener
- The ElementListener.addElementListener(com.ibm.as400.util.html.ElementListener)
public void setLocation(String location)
location
- The location.public void setName(String name)
name
- The name.public void setText(String text)
text
- The alternate text.public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |