Output() Example

                                                                                                                                                                                                                                                                                                                                      Back to [Book]     [Topic]

Output() Example

This section describes an example NSAPI filter named example-replace, which examines outgoing data and substitutes one string for another. This example shows how to create a filter that intercepts and modifies outgoing data.

Installing the Output() Example

To load the filter, add the following directive in the Init section of the magnus.conf file:

Init fn="load-modules" 
     shlib=_yourlibrary_
     NativeThread="no"

To execute the filter during the request-response process for an object, add the following code to that object in the obj.conf file:

Output fn="insert-filter" 
       type="text/*" 
       filter="example-replace" 
       from="iPlanet" to="Sun ONE"

The source code for this example is in the replace.c file in the install-dir/samples/nsapi/ directory.

Labels

java java Delete
server server Delete
sun sun Delete
webserver webserver Delete
application application Delete
system system Delete
webtier webtier Delete
guide guide Delete
webserver70 webserver70 Delete
sunjava sunjava Delete
nsapi nsapi Delete
nsapidevelopersguide nsapidevelopersguide Delete
developers developers Delete
web web Delete
+nsapiguide +nsapiguide Delete
nsapiguide nsapiguide Delete
developersguide developersguide Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


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