JSP Tag

Warning - java2web is now obsolete. Please use its successor: code2web

back to index

Introduction

Finally, a JSP Tag called "convert" is included with the distribution so that you can perform Java-to-HTML conversion seamlessly in web pages.

The JSP tag can get its input from its body, from an external file, an URL or any InputStream.

Sample Usage

In order to use the JSP Tag, you must specify at least one skin (CSS stylesheet) to use. The source code to convert is indicated using the input attribute. If it is missing, then the tag body is assumed to be the source code to convert.

<j2w:convert  skins="Eclipse,styles/eclipse.css">
java source code to convert </j2w:convert>

The input attribute maybe a java runtime expression of the following types:

<j2w:convert  input="WEB-INF/source/Test.java" .... />  
<j2w:convert  input='<%= new URL("http://snippetserver.com/Foo.java") %>' .... />  
<j2w:convert  input='<%= new FileInputStream("c:/Test.java")  %>' .... />  

A sample jsp page (test.jsp) is included with the distribution to illustrate a complete invocation.