Define Custom Server-Parsed HTML Tags

Version 3 by s_aby
on Dec 30, 2008 22:49.

compared with
Current by Sudha.Bhat
on Mar 12, 2009 23:01.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View page history
h2. Define Custom Server-Parsed HTML Tags
HTML files can contain tags that are executed on the server. For general information about server-parsed HTML tags, see the [Sun Java System Web Server 7.0 Update 4 Developer's Guide|http://docs.sun.com/doc/820-6602]. Guide|Developer's Guide].

In Web Server 7.0, you can define your own server-side tags. For example, you could define the tag {{HELLO}} to invoke a function that prints {{Hello World!}}.
Write the body of the tag execution function to generate the output to replace the tag in the {{.shtml}} page. Use the {{net_write}} NSAPI function, which writes a specified number of bytes to a specified socket from a specified buffer.
For more information about writing NSAPI plug-ins, see _Chapter 2_ [Creating Custom Server Application Functions|NSAPI Developer's Guide#cha2].
 
For more information about {{net_write}} and other NSAPI functions, see _Chapter 6_ [NSAPI Function and Macro Reference|NSAPI Developer's Guide#cha6].

The tag execution function must return an {{int}} value that indicates whether the server should proceed to the next instruction in {{obj.conf}}, which is one of the following:

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact