1 | import javax.servlet.jsp.*;
|
---|
2 | import javax.servlet.jsp.tagext.*;
|
---|
3 | import java.io.PrintWriter;
|
---|
4 | import java.io.IOException;
|
---|
5 | import java.io.FileInputStream;
|
---|
6 | import java.io.ObjectInputStream;
|
---|
7 | import java.util.Vector;
|
---|
8 | import org.tp23.jasper.runtime.*;
|
---|
9 | import java.beans.*;
|
---|
10 | import org.tp23.jasper.*;
|
---|
11 | import org.tp23.jsp.*;
|
---|
12 | import java.io.*;
|
---|
13 | import java.util.*;
|
---|
14 |
|
---|
15 |
|
---|
16 | public class antinstall_0002dconfig_0002dexample extends ObjectJspBase {
|
---|
17 |
|
---|
18 | // begin [file="/home/teknopaul/workspace/AntInstaller/web/home/teknopaul/workspace/AntInstaller/web/antinstall-config-example.jsp";from=(73,3);to=(193,0)]
|
---|
19 |
|
---|
20 | private String decorateXml(StringBuffer file){
|
---|
21 | boolean inString = false;
|
---|
22 | boolean inElement = false;
|
---|
23 | boolean inRef = false;
|
---|
24 | StringBuffer sb = new StringBuffer();
|
---|
25 | StringBuffer element = new StringBuffer();
|
---|
26 | StringBuffer reference = new StringBuffer();
|
---|
27 | int elemStart = -1;
|
---|
28 | for (int i = 0; i < file.length(); i++){
|
---|
29 | char c = file.charAt(i);
|
---|
30 | switch(c){
|
---|
31 | case '$' : {
|
---|
32 | if(file.charAt(i + 1) == '{'){
|
---|
33 | inRef = true;
|
---|
34 | sb.append("<a href=\"manual.html#refs\" title=\"\" class=\"reference\">$");
|
---|
35 | }
|
---|
36 | else {
|
---|
37 | sb.append(c);
|
---|
38 | }
|
---|
39 | break;
|
---|
40 | }
|
---|
41 | case '}' : {
|
---|
42 | if(inRef){
|
---|
43 | inRef = false;
|
---|
44 | sb.append("}</a>");
|
---|
45 | }
|
---|
46 | else {
|
---|
47 | sb.append(c);
|
---|
48 | }
|
---|
49 | break;
|
---|
50 | }
|
---|
51 | case '<' : {
|
---|
52 | inElement = true;
|
---|
53 | elemStart = i;
|
---|
54 | sb.append("<span class=\"bracket\"><</span>");
|
---|
55 | break;
|
---|
56 | }
|
---|
57 | case '>' : {
|
---|
58 | if(inElement){
|
---|
59 | sb.append(createLink(element.toString()));
|
---|
60 | element = new StringBuffer();
|
---|
61 | inElement = false;
|
---|
62 | }
|
---|
63 | sb.append("<span class=\"bracket\">></span>");
|
---|
64 | break;
|
---|
65 | }
|
---|
66 | case ' ' : {
|
---|
67 | if(inElement){
|
---|
68 | sb.append(createLink(element.toString()));
|
---|
69 | element = new StringBuffer();
|
---|
70 | inElement = false;
|
---|
71 | }
|
---|
72 | sb.append(' ');
|
---|
73 | break;
|
---|
74 | }
|
---|
75 | case '\t' : {
|
---|
76 | if(inElement){
|
---|
77 | sb.append(createLink(element.toString()));
|
---|
78 | element = new StringBuffer();
|
---|
79 | inElement = false;
|
---|
80 | }
|
---|
81 | sb.append(" ");
|
---|
82 | break;
|
---|
83 | }
|
---|
84 | case '\"' : {
|
---|
85 | if(!inString) {
|
---|
86 | sb.append("<span class=\"string\">\"");
|
---|
87 | }
|
---|
88 | else {
|
---|
89 | sb.append("\"</span>");
|
---|
90 | }
|
---|
91 | inString = !inString;
|
---|
92 | break;
|
---|
93 | }
|
---|
94 | case '&' : {
|
---|
95 | sb.append("&");
|
---|
96 | break;
|
---|
97 | }
|
---|
98 | case '\n' : {
|
---|
99 | if(inElement) {
|
---|
100 | sb.append(createLink(element.toString()));
|
---|
101 | element = new StringBuffer();
|
---|
102 | inElement = false;
|
---|
103 | }
|
---|
104 | sb.append("<br/>");
|
---|
105 | break;
|
---|
106 | }
|
---|
107 | default : {
|
---|
108 | if(inElement) {
|
---|
109 | element.append(c);
|
---|
110 | }
|
---|
111 | else {
|
---|
112 | sb.append(c);
|
---|
113 | }
|
---|
114 | break;
|
---|
115 | }
|
---|
116 | }
|
---|
117 | }
|
---|
118 | return sb.toString();
|
---|
119 | }
|
---|
120 |
|
---|
121 | private String createLink(String element){
|
---|
122 | if(element.startsWith("/")) {
|
---|
123 | return "<span class=\"element\">" + element + "</span>";
|
---|
124 | }
|
---|
125 |
|
---|
126 | if("?xml".equals(element.trim())){
|
---|
127 | return "<span class=\"element\">" + element + "</span>";
|
---|
128 | }
|
---|
129 | if("!DOCTYPE".equals(element.trim())){
|
---|
130 | return "<span class=\"element\">" + element + "</span>";
|
---|
131 | }
|
---|
132 | return "<a href=\"manual.html#" +
|
---|
133 | element.trim() +
|
---|
134 | "\" title=\"\" class=\"element\">" +
|
---|
135 | element.trim() +
|
---|
136 | "</a>" +
|
---|
137 | element.substring(element.trim().length());
|
---|
138 | }
|
---|
139 | // end
|
---|
140 |
|
---|
141 | static {
|
---|
142 | }
|
---|
143 | public antinstall_0002dconfig_0002dexample( ) {
|
---|
144 | }
|
---|
145 |
|
---|
146 | private static boolean _jspx_inited = false;
|
---|
147 |
|
---|
148 | public final void _jspx_init() throws JasperException {
|
---|
149 | }
|
---|
150 |
|
---|
151 | public void _jspService(final Destination destination)
|
---|
152 | throws IOException, JspEngineException {
|
---|
153 |
|
---|
154 | ObjectJspFactory _jspxFactory = null;
|
---|
155 | ObjectPageContext pageContext = null;
|
---|
156 | Session session = null;
|
---|
157 | ObjectContainerContext application = null;
|
---|
158 | ObjectConfig config = null;
|
---|
159 | ObjectJspWriter out = null;
|
---|
160 | Object page = this;
|
---|
161 | String _value = null;
|
---|
162 | try {
|
---|
163 |
|
---|
164 | if (_jspx_inited == false) {
|
---|
165 | _jspx_init();
|
---|
166 | _jspx_inited = true;
|
---|
167 | }
|
---|
168 | _jspxFactory = destination.getServer().getObjectJspFactory();
|
---|
169 | pageContext = _jspxFactory.getPageContext(this, destination,
|
---|
170 | "", true, 8192, true);
|
---|
171 |
|
---|
172 | application = pageContext.getObjectContainerContext();
|
---|
173 | config = pageContext.getObjectConfig();
|
---|
174 | session = destination.getSession();
|
---|
175 | out = pageContext.getOut();
|
---|
176 |
|
---|
177 | // HTML // begin [file="/home/teknopaul/workspace/AntInstaller/web/home/teknopaul/workspace/AntInstaller/web/antinstall-config-example.jsp";from=(0,0);to=(60,0)]
|
---|
178 | out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n<html>\r\n<head>\r\n <title>Ant Installer</title>\r\n <link href=\"style.css\" type=\"text/css\" rel=\"stylesheet\">\r\n <link href=\"css/nav.css\" rel=\"stylesheet\" type=\"text/css\">\r\n <link rel=\"SHORTCUT ICON\" type=\"image/png\" href=\"images/antinstaller-icon.png\">\r\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n <meta name=\"keywords\"\r\n content=\"Ant, installer, AntInstall, gui, console, input, parameters, properties, swing, user interface, validation, configuration\">\r\n <script type=\"text/javascript\" src=\"js/menu.js\"></script>\r\n <script type=\"text/javascript\" src=\"js/sstree.js\"></script>\r\n <script type=\"text/javascript\" src=\"js/winfix.js\"></script>\r\n</head>\r\n<body onload=\"collapseAll('contents-panel', ['ol']); \"><div id=\"tpallcontent\">\r\n<table cellspacing=\"0\" width=\"100%\">\r\n <tbody>\r\n <tr class=\"tpheader\">\r\n <th class=\"tpleft\">\r\n\t\t\t<a target=\"_top\" href=\"index.html\" title=\"home\"><img src=\"images/ant-install-small.png\" alt=\"AntInstaller\" id=\"logo\" width=\"76\" height=\"50\"/></a>\r\n\t\t\t<script type=\"text/javascript\">winFix();</script>\r\n </th>\r\n <th class=\"tptop\" valign=\"bottom\">\r\n\t\t\t\t<img src=\"space.gif\" height=\"1\" width=\"440\" alt=\"spacer\"/><br/>\r\n\t\t\t\t\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td valign=\"top\">\r\n\t\t\t\t\t\t\t<div class=\"tpheadertitle\">AntInstaller</div>\r\n\t\t\t\t\t\t\t<!--img src=\"images/ant-install-title.png\" alt=\"AntInstaller\"/-->\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td width=\"100%\" align=\"right\" valign=\"bottom\" nowrap=\"NOWRAP\">\r\n\t\t\t\t<div class=\"tpraised\">\r\n\t\t\t\t<a class=\"tpbutton\" target=\"_top\" href=\"index.html\">home</a>\r\n\t\t\t\t<a class=\"tpbutton\" target=\"_top\" href=\"http://sourceforge.net/project/showfiles.php?group_id=123466&package_id=134917\">download</a>\r\n\t\t\t\t<a class=\"tpbutton\" target=\"_top\" href=\"http://sf.net\">sourceforge</a> \r\n\t\t\t\t<a class=\"tpbutton\" target=\"_top\" href=\"manual-ant.html\">antmanual</a> \r\n\t\t\t\t<a class=\"tpbutton\" target=\"_top\" href=\"http://sourceforge.net/tracker/?group_id=123466&atid=696615\">RFEs</a> \r\n\t\t\t\t<a class=\"tpbutton\" target=\"_top\" href=\"http://sourceforge.net/tracker/?group_id=123466&atid=696612\">Bugs</a></div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n </th>\r\n </tr>\r\n <tr class=\"tpbody\">\r\n\t\t<td class=\"tpleft\" valign=\"bottom\">\r\n\t\t\t<br/>\r\n\t\t\t<div id=\"logoset\">\r\n\t\t\t<a target=\"_top\" href=\"http://sourceforge.net\"><img src=\"http://sourceforge.net/sflogo.php?group_id=123466&type=2\" alt=\"SourceForge.net Logo\" border=\"0\" height=\"37\" width=\"125\"></a>\r\n\t\t\t<br/><br/>\r\n\t\t\t<a target=\"_top\" href=\"http://sourceforge.net/donate/index.php?group_id=123466\">\r\n\t\t\t<img src=\"http://sourceforge.net/images/project-support.jpg\" alt=\"donate to AntInstaller\"/>\r\n\t\t\t</a>\r\n\t\t\t</div>\r\n\t\t</td>\r\n <td class=\"tpright\" valign=\"top\">\r\n <div class=\"tpcontent\">\r\n\t\t\t<!--[segment-content] page content start -->\r\n <h2>Example antinstall-config.xml</h2>\r\n <div class=\"xml\">\r\n");
|
---|
179 | // end
|
---|
180 | // HTML // begin [file="/home/teknopaul/workspace/AntInstaller/web/home/teknopaul/workspace/AntInstaller/web/antinstall-config-example.jsp";from=(60,60);to=(61,0)]
|
---|
181 | out.write("\r\n");
|
---|
182 | // end
|
---|
183 | // begin [file="/home/teknopaul/workspace/AntInstaller/web/home/teknopaul/workspace/AntInstaller/web/antinstall-config-example.jsp";from=(61,2);to=(72,0)]
|
---|
184 |
|
---|
185 | String strJspDir = (String)application.getAttribute("myjasper.jsp.dir");
|
---|
186 | File fleJspDir = new File(strJspDir);
|
---|
187 | File exampleFile = new File(fleJspDir, "antinstall-config-example.xml");
|
---|
188 | BufferedReader br = new BufferedReader(new FileReader(exampleFile));
|
---|
189 | StringBuffer file = new StringBuffer();
|
---|
190 | String line = null;
|
---|
191 | while( (line = br.readLine()) != null ){
|
---|
192 | file.append(line).append('\n');
|
---|
193 | }
|
---|
194 | out.println(decorateXml(file));
|
---|
195 | // end
|
---|
196 | // HTML // begin [file="/home/teknopaul/workspace/AntInstaller/web/home/teknopaul/workspace/AntInstaller/web/antinstall-config-example.jsp";from=(72,2);to=(73,0)]
|
---|
197 | out.write("\r\n");
|
---|
198 | // end
|
---|
199 | // HTML // begin [file="/home/teknopaul/workspace/AntInstaller/web/home/teknopaul/workspace/AntInstaller/web/antinstall-config-example.jsp";from=(193,2);to=(292,0)]
|
---|
200 | out.write("\r\n\t\t</div>\r\n\t\t\t<!-- content end [segment-end]-->\r\n\t\t \t</div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n</table>\r\n<div id=\"contents-panel\">\r\n<!--[segment-file://contents-include.html] menu start -->\r\n<div id=\"contents-menu\">\r\n<ol class=\"sidebar\" id=\"root\">\r\n\t<li class=\"panel\"><a href=\"#default\" class=\"folder\" onclick=\"toggle(this)\"></a><b>Site map</b>\r\n\t\t<ol>\r\n\t\t\t<li class=\"sidebar\"><a href=\"introduction.html\">Introduction</a></li>\r\n\t\t\t<li class=\"panel\"><a href=\"#default\" class=\"folder\" onclick=\"toggle(this)\"></a><b>Developer References</b>\r\n\t\t\t\t<ol>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"quickstart.html\">Quick Start</a></li>\r\n\t\t\t\t\t<li class=\"panel\"><a href=\"#default\" class=\"folder\" onclick=\"toggle(this)\"></a><a href=\"manual.html\">Manual</a>\r\n\t\t\t\t\t\t<ol class=\"init-hidden\">\r\n\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#config\">antinstall-config.xml</a></li>\r\n\t\t\t\t\t\t\t<li class=\"panel\"><a href=\"#default\" class=\"folder\" onclick=\"toggle(this)\"></a><a href=\"manual.html#page\">Pages</a>\r\n\t\t\t\t\t\t\t\t<ol class=\"init-hidden\">\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#pagesplash\">Splash Page</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#pagetext\">Text Page</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#pagelicense\">License Page</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#pageinput\">Input Page</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#pageprogress\">Progress Page</a></li>\r\n\t\t\t\t\t\t\t\t</ol>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t<li class=\"panel\"><a href=\"#default\" class=\"folder\" onclick=\"toggle(this)\"></a><a href=\"manual.html#inputtypes\">Input types</a>\r\n\t\t\t\t\t\t\t\t<ol class=\"init-hidden\">\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#app-root\">Application Root</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#checkbox\">Checkbox</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#comment\">Comment</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#date\">Date</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#directory\">Directory</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#file\">File</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#large-select\">Large Select</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#password\">Password Text</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#password-confirm\">Confirm Password</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#select\">Select</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#target\">Target</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#target-select\">Target Select</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#text\">Unvalidated Text</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#validated\">Validated Text</a></li>\r\n\t\t\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#extvalidated\">Externally Validated Text</a></li>\r\n\t\t\t\t\t\t\t\t</ol>\r\n\t\t\t\t\t\t\t</li>\r\n\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#extractor\">Self Extractor</a></li>\r\n\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#non-extractor\">Non Extractor</a></li>\r\n\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#scripts\">Start Scripts</a></li>\r\n\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#refs\">Dynamic References</a></li>\r\n\t\t\t\t\t\t\t<li class=\"sidebar\"><a href=\"manual.html#pagedisplay\">Page Displaying</a></li>\r\n\t\t\t\t\t\t</ol>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"installertask.html\">Installer Ant task</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"validationofconfig.html\">Validation of config</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"lookandfeels.html\">LookAndFeels</a> <br/>(inc screenshots)</li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"classpathresources.html\">Resources/Classpath issues</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"i18n.html\">Internationalisation</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"auto.html\">Automated installs</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"installtypes.html\">Multiple install types</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"posttargets.html\">Post display targets</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"icons.html\">Button Icons</a></li>\r\n\t\t\t\t\t<li class=\"sidebar\"><a href=\"antinstall-config-example.html\">Example antinstall-config.xml</a></li>\r\n\t\t\t\t</ol>\r\n\t\t\t</li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"manual-ant.html\">Ant Manual</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"antlinks.html\">Ant links</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"userusage.html\">User usage</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"licenses.html\">Licenses</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"potentialuses.html\">Potential uses</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"roadmap.html\">Road Map</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"wanted.html\">Wanted</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"dtds.html\">DTDs</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"changelog.html\">Changelog</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"http://sourceforge.net/projects/antinstaller\">Project page on SourceForge</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"java2html/antinstaller/index.html\">Java2HTML (main)</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"java2html/ext/index.html\">Java2HTML (extensions)</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"http://antinstaller.cvs.sourceforge.net/antinstaller\">Public CVS over HTTP</a></li>\r\n\t\t\t<li class=\"sidebar\"><a href=\"http://sourceforge.net/sendmessage.php?touser=616485\">Contact AntInstaller Admin</a></li>\r\n\t\t</ol>\r\n\t</li>\r\n</ol>\r\n<br/>\r\n<br/>\r\n</div>\r\n\r\n\r\n<!-- menu end [segment-end]-->\r\n</div>\r\n<div id=\"contents-options\">\r\n<a id=\"toggle\" href=\"#\" onclick=\"toggleMenu(); return false;\">show menu</a>\r\n</div>\r\n\r\n</div>\r\n</body>\r\n</html>\r\n");
|
---|
201 | // end
|
---|
202 |
|
---|
203 | } catch (Exception ex) {
|
---|
204 | if (out.getBufferSize() != 0)
|
---|
205 | out.clearBuffer();
|
---|
206 | pageContext.handlePageException(ex);
|
---|
207 | } finally {
|
---|
208 | out.flush();
|
---|
209 | _jspxFactory.releasePageContext(pageContext);
|
---|
210 | }
|
---|
211 | }
|
---|
212 | }
|
---|