It is possible to embed Java source code, from an external Java source file, into web pages using the Gild Web Browser. This helps greatly with the synchronization of source and web content. The example below shows a rendered page with embedded source code, and the special tag that is used to display it.

<javasource
|
The tag used to display the embedded Java source code is the javasource tag. It has three attributes:
![]() |
project: The name of the project in which the Java source code is contained. The project must be openned in the workspace, and it must be a Java project. |
![]() |
file: The name of the file that contains the Java source code. The name must include the entire path of the file, relative to the project in which it is contained. |
![]() |
method_sig: An optional method signature. It is of the form Container.method(parameter1,parameter2,...).
Where Containeris the name of the class or interface that contains the method, method is the method name, and
parameter1,parameter2,... are the parameters of the method. You need only to specify the variable types for
the parameters, but variable names may be included as well. For example, Container.main(String[] args), and Container.main(String[]) are equivalent.
If the method_sig attribute is ommitted, then the entire source code within the specified Java file will be embedded into your web page. |