KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > fredck > FCKeditor > tags > FCKeditorTag


1 /*
2  * FCKeditor - The text editor for internet
3  * Copyright (C) 2003-2005 Frederico Caldeira Knabben
4  *
5  * Licensed under the terms of the GNU Lesser General Public License:
6  * http://www.opensource.org/licenses/lgpl-license.php
7  *
8  * For further information visit:
9  * http://www.fckeditor.net/
10  *
11  * File Name: FCKeditorTag.java
12  * FCKeditor tag library.
13  *
14  * Version: 2.3
15  * Modified: 2005-08-11 16:29:00
16  *
17  * File Authors:
18  * Simone Chiaretta (simo@users.sourceforge.net)
19  */

20  
21  
22 package com.fredck.FCKeditor.tags;
23
24 import com.fredck.FCKeditor.FCKeditor;
25
26 import java.io.IOException JavaDoc;
27
28 import javax.servlet.http.HttpServletRequest JavaDoc;
29
30 import javax.servlet.jsp.PageContext JavaDoc;
31 import javax.servlet.jsp.JspException JavaDoc;
32 import javax.servlet.jsp.JspWriter JavaDoc;
33 import javax.servlet.jsp.JspTagException JavaDoc;
34 import javax.servlet.jsp.tagext.BodyContent JavaDoc;
35 import javax.servlet.jsp.tagext.BodyTagSupport JavaDoc;
36
37 /**
38  * Custom Tag class to access the {@linkplain com.fredck.FCKeditor.FCKeditor container}.<br>
39  *<p>
40  * <b>Simple usage</b>:
41  * <pre>
42  * &lt;FCK:editor
43  * id="EditorAccessibility"
44  * width="80%"
45  * height="120"
46  * toolbarSet="Accessibility"
47  * "&gt;This is another test. &lt;BR&gt;&lt;BR&gt;The "Second" row.&lt;/BR&gt;&lt;/FCK:editor"&gt;
48  * </pre>
49  *
50  *<p>In this example we set all the attribute for the fckedit tag.
51  *
52  *<p>
53  * <b>Advanced usage of the tag</b>:
54  * <pre>
55  * &lt;FCK:editor id="EditorDefault" basePath="/FCKeditor/"
56  * styleNames=";Style 1;Style 2; Style 3"
57  * fontNames=";Arial;Courier New;Times New Roman;Verdana" &gt;
58  * This is some &lt;B&gt;sample text&lt;/B&gt;.
59  * &lt;/FCK:editor&gt;
60 * </pre>
61  *<p>In this example we set the id and the basePath of the editor (since it is /FCKeditor/
62  * we could have omitted it because it's already the default value).<br>
63  * Then we used the the optional attributes to set some advanced configuration settings.
64  *
65             
66  * @author Simone Chiaretta (simo@users.sourceforge.net)
67  */

68 public class FCKeditorTag extends BodyTagSupport JavaDoc {
69     
70     private String JavaDoc id;
71     private String JavaDoc value = "";
72     private String JavaDoc basePath = null;
73     private String JavaDoc toolbarSet = null;
74     private String JavaDoc width = null;
75     private String JavaDoc height = null;
76     private String JavaDoc customConfigurationsPath = null;
77     private String JavaDoc editorAreaCSS = null;
78     private String JavaDoc baseHref = null;
79     private String JavaDoc skinPath = null;
80     private String JavaDoc pluginsPath = null;
81     private String JavaDoc fullPage = null;
82     private String JavaDoc debug = null;
83     private String JavaDoc autoDetectLanguage = null;
84     private String JavaDoc defaultLanguage = null;
85     private String JavaDoc contentLangDirection = null;
86     private String JavaDoc enableXHTML = null;
87     private String JavaDoc enableSourceXHTML = null;
88     private String JavaDoc fillEmptyBlocks = null;
89     private String JavaDoc formatSource = null;
90     private String JavaDoc formatOutput = null;
91     private String JavaDoc formatIndentator = null;
92     private String JavaDoc geckoUseSPAN = null;
93     private String JavaDoc startupFocus = null;
94     private String JavaDoc forcePasteAsPlainText = null;
95     private String JavaDoc forceSimpleAmpersand = null;
96     private String JavaDoc tabSpaces = null;
97     private String JavaDoc useBROnCarriageReturn = null;
98     private String JavaDoc toolbarStartExpanded = null;
99     private String JavaDoc toolbarCanCollapse = null;
100     private String JavaDoc fontColors = null;
101     private String JavaDoc fontNames = null;
102     private String JavaDoc fontSizes = null;
103     private String JavaDoc fontFormats = null;
104     private String JavaDoc stylesXmlPath = null;
105     private String JavaDoc linkBrowserURL = null;
106     private String JavaDoc imageBrowserURL = null;
107     private String JavaDoc flashBrowserURL = null;
108     private String JavaDoc linkUploadURL = null;
109     private String JavaDoc imageUploadURL = null;
110     private String JavaDoc flashUploadURL = null;
111     
112
113
114
115    /**
116      * The underlying FCKeditor object
117      *
118      */

119     protected FCKeditor fcked = null;
120
121
122     /**
123      * Set the unique id of the editor
124      *
125      * @param value name
126      */

127     public void setId(String JavaDoc value) {
128         id=value;
129     }
130
131     /**
132      * Set the dir where the FCKeditor files reside on the server
133      *
134      * @param value path
135      */

136     public void setBasePath(String JavaDoc value) {
137         basePath=value;
138     }
139
140     /**
141      * Set the name of the toolbar to display
142      *
143      * @param value toolbar name
144      */

145     public void setToolbarSet(String JavaDoc value) {
146         toolbarSet=value;
147     }
148
149     /**
150      * Set the width of the textarea
151      *
152      * @param value width
153      */

154     public void setWidth(String JavaDoc value) {
155         width=value;
156     }
157
158     /**
159      * Set the height of the textarea
160      *
161      * @param value height
162      */

163     public void setHeight(String JavaDoc value) {
164         height=value;
165     }
166
167     /**
168      * Set the path of a custom file that can override some configurations.<br>
169      * It is recommended to use absolute paths (starting with /), like "/myfckconfig.js".
170      *
171      * @param value path
172      */

173     public void setCustomConfigurationsPath(String JavaDoc value) {
174         customConfigurationsPath=value;
175     }
176     
177
178     /**
179      * Set the CSS styles file to be used in the editing area.<br>
180      * In this way you can point to a file that reflects your web site styles.
181      *
182      * @param value path
183      */

184     public void setEditorAreaCSS(String JavaDoc value) {
185         editorAreaCSS=value;
186     }
187     
188
189     /**
190      * Base URL used to resolve links (on images, links, styles, etc.).<br>
191      * For example, if BaseHref is set to 'http://www.fredck.com', an image that points to "/images/Logo.gif" will be interpreted by the editor as "http://www.fredck.com/images/Logo.gif", without touching the "src" attribute of the image.
192      *
193      * @param value URL
194      */

195     public void setBaseHref(String JavaDoc value) {
196         baseHref=value;
197     }
198     
199     
200     /**
201      * Sets the path to the skin (graphical interface settings) to be used by the editor.
202      *
203      * @param value path
204      */

205     public void setSkinPath(String JavaDoc value) {
206         skinPath=value;
207     }
208     
209     
210     /**
211      * Sets the base path used when looking for registered plugins.
212      *
213      * @param value path
214      */

215     public void setPluginsPath(String JavaDoc value) {
216         pluginsPath=value;
217     }
218     
219     
220     /**
221      * Enables full page editing (from &lt;HTML&gt; to &lt;/HTML&gt;).<br>
222      * It also enables the "Page Properties" toolbar button.
223      *
224      * @param value true/false
225      * @throws JspException if value is not true or false
226      */

227     public void setFullPage(String JavaDoc value) throws JspException JavaDoc {
228         if(! value.equals("true") && ! value.equals("false"))
229             throw new JspException JavaDoc("fullPage attribute can only be true or false");
230         fullPage=value;
231     }
232     
233     
234     /**
235      * Enables the debug window to be shown when calling the FCKDebug.Output() function.
236      *
237      * @param value true/false
238      * @throws JspException if value is not true or false
239      */

240     public void setDebug(String JavaDoc value) throws JspException JavaDoc {
241         if(! value.equals("true") && ! value.equals("false"))
242             throw new JspException JavaDoc("debug attribute can only be true or false");
243         debug=value;
244     }
245     
246     
247     /**
248      * Tells the editor to automatically detect the user language preferences to adapt its interface language.<br>
249      * With Internet Explorer, the language configured in the Windows Control Panel is used.<br>
250      * With Firefox, the browser language is used.
251      *
252      * @param value true/false
253      * @throws JspException if value is not true or false
254      */

255     public void setAutoDetectLanguage(String JavaDoc value) throws JspException JavaDoc {
256         if(! value.equals("true") && ! value.equals("false"))
257             throw new JspException JavaDoc("autoDetectLanguage attribute can only be true or false: here was " + value);
258         autoDetectLanguage=value;
259     }
260     
261     
262     /**
263      * Sets the default language used for the editor's interface localization.<br>
264      * The default language is used when the AutoDetectLanguage options is disabled or when the user language is not available.
265      *
266      * @param value language code
267      */

268     public void setDefaultLanguage(String JavaDoc value) {
269         defaultLanguage=value;
270     }
271     
272     
273     /**
274      * Sets the direction of the editor area contents.<br>
275      * The possible values are:
276      * <ul>
277      * <li>ltr - Left to Right
278      * <li>rtl - Right to Left
279      * </ul>
280      *
281      * @param value ltr/rtl
282      * @throws JspException if value is not ltr or rtl
283      */

284     public void setContentLangDirection(String JavaDoc value) throws JspException JavaDoc {
285         if(! value.equals("true") && ! value.equals("false"))
286             throw new JspException JavaDoc("debug attribute can only be ltr or rtl");
287         contentLangDirection=value;
288     }
289     
290     
291     /**
292      * Tells the editor to process the HTML source to XHTML on form post.
293      *
294      * @param value true/false
295      * @throws JspException if value is not true or false
296      */

297     public void setEnableXHTML(String JavaDoc value) throws JspException JavaDoc {
298         if(! value.equals("true") && ! value.equals("false"))
299             throw new JspException JavaDoc("enableXHTML attribute can only be true or false");
300         enableXHTML=value;
301     }
302     
303     
304     /**
305      * Tells the editor to process the HTML source to XHTML when switching from WYSIWYG to Source view
306      *
307      * @param value true/false
308      * @throws JspException if value is not true or false
309      */

310     public void setEnableSourceXHTML(String JavaDoc value) throws JspException JavaDoc {
311         if(! value.equals("true") && ! value.equals("false"))
312             throw new JspException JavaDoc("enableSourceXHTML attribute can only be true or false");
313         enableSourceXHTML=value;
314     }
315     
316     
317     /**
318      * Block elements (like P, DIV, H1, PRE, etc...) are forced to have content (a &amp;nbsp;).<br>
319      * Empty blocks are "collapsed" by while browsing, so a empty &lt;p&gt;&lt;/p&gt; is not visible.<br>
320      * While editing, the editor "expand" empty blocks so you can insert content inside then.<br>
321      * Setting this option to "true" results useful to reflect the same output when browsing and editing.
322      *
323      * @param value true/false
324      * @throws JspException if value is not true or false
325      */

326     public void setFillEmptyBlocks(String JavaDoc value) throws JspException JavaDoc {
327         if(! value.equals("true") && ! value.equals("false"))
328             throw new JspException JavaDoc("fillEmptyBlocks attribute can only be true or false");
329         fillEmptyBlocks=value;
330     }
331     
332     
333     /**
334      * The HTML shown by the editor, while switching from WYSIWYG to Source views, will be processed and formatted
335      *
336      * @param value true/false
337      * @throws JspException if value is not true or false
338      */

339     public void setFormatSource(String JavaDoc value) throws JspException JavaDoc {
340         if(! value.equals("true") && ! value.equals("false"))
341             throw new JspException JavaDoc("formatSource attribute can only be true or false");
342         formatSource=value;
343     }
344     
345     
346     /**
347      * The output HTML generated by the editor will be processed and formatted.
348      *
349      * @param value true/false
350      * @throws JspException if value is not true or false
351      */

352     public void setFormatOutput(String JavaDoc value) throws JspException JavaDoc {
353         if(! value.equals("true") && ! value.equals("false"))
354             throw new JspException JavaDoc("formatOutput attribute can only be true or false");
355         formatOutput=value;
356     }
357     
358     /**
359      * Sets the characters to be used when indenting the HTML source when formatting it.<BR>
360      * Useful values are a sequence of spaces (' ') or a tab char ('\t').
361      *
362      * @param value indentator
363      */

364     public void setFormatIndentator(String JavaDoc value) {
365         formatIndentator=value;
366     }
367     
368     
369     /**
370      * Tells Gecko browsers to use SPAN instead of &lt;B&gt;, &lt;I&gt; and &lt;U&gt; for bold, italic an underline
371      *
372      * @param value true/false
373      * @throws JspException if value is not true or false
374      */

375     public void setGeckoUseSPAN(String JavaDoc value) throws JspException JavaDoc {
376         if(! value.equals("true") && ! value.equals("false"))
377             throw new JspException JavaDoc("GeckoUseSPAN attribute can only be true or false");
378         geckoUseSPAN=value;
379     }
380     
381     
382     /**
383      * Forces the editor to get the keyboard input focus on startup (page load)
384      *
385      * @param value true/false
386      * @throws JspException if value is not true or false
387      */

388     public void setStartupFocus(String JavaDoc value) throws JspException JavaDoc {
389         if(! value.equals("true") && ! value.equals("false"))
390             throw new JspException JavaDoc("startupFocus attribute can only be true or false");
391         startupFocus=value;
392     }
393     
394     
395     /**
396      * Converts the clipboard contents to pure text on pasting operations
397      *
398      * @param value true/false
399      * @throws JspException if value is not true or false
400      */

401     public void setForcePasteAsPlainText(String JavaDoc value) throws JspException JavaDoc {
402         if(! value.equals("true") && ! value.equals("false"))
403             throw new JspException JavaDoc("forcePasteAsPlainText attribute can only be true or false");
404         forcePasteAsPlainText=value;
405     }
406     
407     
408     /**
409      * Forces the ampersands (&) on tags attributes to not be converted to "&amp;amp;"<BR>
410      * This conversion is a W3C requirement for XHTML, so it is recommended to leave this option to "false".
411      *
412      * @param value true/false
413      * @throws JspException if value is not true or false
414      */

415     public void setForceSimpleAmpersand(String JavaDoc value) throws JspException JavaDoc {
416         if(! value.equals("true") && ! value.equals("false"))
417             throw new JspException JavaDoc("forceSimpleAmpersand attribute can only be true or false");
418         forceSimpleAmpersand=value;
419     }
420     
421     
422     /**
423      * Set the number of spaces (&amp;nbsp;) to be inserted when the user hits the "tab" key.<BR>
424      * This is an Internet Explorer only feature. Other browsers insert spaces automatically by default.
425      *
426      * @param value number of spaces
427      */

428     public void setTabSpaces(String JavaDoc value) {
429         tabSpaces=value;
430     }
431     
432     
433     /**
434      * Inserts a &lt;BR&gt; tag when the user hits the "enter" key, instead of starting a new paragraph (&lt;P&gt; or &lt;DIV&gt;).<BR>
435      * This is an Internet Explorer only feature. Other browsers insert the &lt;BR&gt; tag by default.
436      *
437      * @param value true/false
438      * @throws JspException if value is not true or false
439      */

440     public void setUseBROnCarriageReturn(String JavaDoc value) throws JspException JavaDoc {
441         if(! value.equals("true") && ! value.equals("false"))
442             throw new JspException JavaDoc("useBROnCarriageReturn attribute can only be true or false");
443         useBROnCarriageReturn=value;
444     }
445     
446     
447     /**
448      * The toolbar is Expanded on startup, otherwise it is Collapsed and the user must click on it to show it.
449      *
450      * @param value true/false
451      * @throws JspException if value is not true or false
452      */

453     public void setToolbarStartExpanded(String JavaDoc value) throws JspException JavaDoc {
454         if(! value.equals("true") && ! value.equals("false"))
455             throw new JspException JavaDoc("ToolbarStartExpanded attribute can only be true or false");
456         toolbarStartExpanded=value;
457     }
458     
459     
460     /**
461      * Tells the editor that the toolbar can be Collapsed/Expanded by the user when clicking the vertical bar placed on the left of it (on the right for "rtl" languages).
462      *
463      * @param value true/false
464      * @throws JspException if value is not true or false
465      */

466     public void setToolbarCanCollapse(String JavaDoc value) throws JspException JavaDoc {
467         if(! value.equals("true") && ! value.equals("false"))
468             throw new JspException JavaDoc("ToolbarCanCollapse attribute can only be true or false");
469         toolbarCanCollapse=value;
470     }
471     
472     
473     /**
474      * Sets the colors that must be shown in the colors panels (in the toolbar).
475      *
476      * @param value colors
477      */

478     public void setFontColors(String JavaDoc value) {
479         fontColors=value;
480     }
481     
482     
483     /**
484      * Sets the list of fonts to be shown in the "Font" toolbar command.
485      *
486      * @param value fonts
487      */

488     public void setFontNames(String JavaDoc value) {
489         fontNames=value;
490     }
491     
492     
493     /**
494      * Sets the list of font sizes to be shown in the "Size" toolbar command.
495      *
496      * @param value sizes
497      */

498     public void setFontSizes(String JavaDoc value) {
499         fontSizes=value;
500     }
501     
502     
503     /**
504      * Sets the list of formats to be shown in the "Format" toolbar command.
505      *
506      * @param value format list
507      */

508     public void setFontFormats(String JavaDoc value) {
509         fontFormats=value;
510     }
511     
512     
513     /**
514      * Sets the path to the XML file that has the definitions and rules of the styles used by the "Style" toolbar command
515      *
516      * @param value path
517      */

518     public void setStylesXmlPath(String JavaDoc value) {
519         stylesXmlPath=value;
520     }
521     
522     
523     /**
524      * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Link" dialog window.<BR>
525      * In this way, you can create your custom File Browser that is well integrated with your system.
526      *
527      * @param value path
528      */

529     public void setLinkBrowserURL(String JavaDoc value) {
530         linkBrowserURL=value;
531     }
532     
533     
534     /**
535      * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Image" dialog window.<BR>
536      * In this way, you can create your custom Image Browser that is well integrated with your system.
537      *
538      * @param value path
539      */

540     public void setImageBrowserURL(String JavaDoc value) {
541         imageBrowserURL=value;
542     }
543
544     /**
545      * Sets the URL of the page called when the user clicks the "Browse Server" button in the "Flash" dialog window.<BR>
546      * In this way, you can create your custom Flash Browser that is well integrated with your system.
547      *
548      * @param value path
549      */

550     public void setFlashBrowserURL(String JavaDoc value) {
551         flashBrowserURL=value;
552     }
553
554
555     /**
556      * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Link" dialog window.<BR>
557      * In this way, you can create your custom Link Uploader that is well integrated with your system.
558      *
559      * @param value path
560      */

561     public void setLinkUploadURL(String JavaDoc value) {
562         linkUploadURL=value;
563     }
564
565
566     /**
567      * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Image" dialog window.<BR>
568      * In this way, you can create your custom Image Uploader that is well integrated with your system.
569      *
570      * @param value path
571      */

572     public void setImageUploadURL(String JavaDoc value) {
573         imageUploadURL=value;
574     }
575
576
577     /**
578      * Sets the URL of the upload handler called when the user clicks the "Send it to server" button in the "Flash" dialog window.<BR>
579      * In this way, you can create your custom Flash Uploader that is well integrated with your system.
580      *
581      * @param value path
582      */

583     public void setFlashUploadURL(String JavaDoc value) {
584         flashUploadURL=value;
585     }
586
587
588     /**
589      * Initialize the FCKeditor container and set attributes
590      *
591      * @return EVAL_BODY_BUFFERED
592      */

593     public int doStartTag() throws JspException JavaDoc {
594         fcked=new FCKeditor((HttpServletRequest JavaDoc)pageContext.getRequest(),id);
595         if(toolbarSet!=null)
596             fcked.setToolbarSet(toolbarSet);
597         if(basePath!=null)
598             fcked.setBasePath(basePath);
599         if(width!=null)
600             fcked.setWidth(width);
601         if(height!=null)
602             fcked.setHeight(height);
603         if (customConfigurationsPath != null)
604             fcked.getConfig().put("CustomConfigurationsPath",customConfigurationsPath);
605         if (editorAreaCSS != null)
606             fcked.getConfig().put("EditorAreaCSS",editorAreaCSS);
607         if (baseHref != null)
608             fcked.getConfig().put("BaseHref",baseHref);
609         if (skinPath != null)
610             fcked.getConfig().put("SkinPath",skinPath);
611         if (pluginsPath != null)
612             fcked.getConfig().put("PluginsPath",pluginsPath);
613         if (fullPage != null)
614             fcked.getConfig().put("FullPage",fullPage);
615         if (debug != null)
616             fcked.getConfig().put("Debug",debug);
617         if (autoDetectLanguage != null)
618             fcked.getConfig().put("AutoDetectLanguage",autoDetectLanguage);
619         if (defaultLanguage != null)
620             fcked.getConfig().put("DefaultLanguage",defaultLanguage);
621         if (contentLangDirection != null)
622             fcked.getConfig().put("ContentLangDirection",contentLangDirection);
623         if (enableXHTML != null)
624             fcked.getConfig().put("EnableXHTML",enableXHTML);
625         if (enableSourceXHTML != null)
626             fcked.getConfig().put("EnableSourceXHTML",enableSourceXHTML);
627         if (fillEmptyBlocks != null)
628             fcked.getConfig().put("FillEmptyBlocks",fillEmptyBlocks);
629         if (formatSource != null)
630             fcked.getConfig().put("FormatSource",formatSource);
631         if (formatOutput != null)
632             fcked.getConfig().put("FormatOutput",formatOutput);
633         if (formatIndentator != null)
634             fcked.getConfig().put("FormatIndentator",formatIndentator);
635         if (geckoUseSPAN != null)
636             fcked.getConfig().put("GeckoUseSPAN",geckoUseSPAN);
637         if (startupFocus != null)
638             fcked.getConfig().put("StartupFocus",startupFocus);
639         if (forcePasteAsPlainText != null)
640             fcked.getConfig().put("ForcePasteAsPlainText",forcePasteAsPlainText);
641         if (forceSimpleAmpersand != null)
642             fcked.getConfig().put("ForceSimpleAmpersand",forceSimpleAmpersand);
643         if (tabSpaces != null)
644             fcked.getConfig().put("TabSpaces",tabSpaces);
645         if (useBROnCarriageReturn != null)
646             fcked.getConfig().put("UseBROnCarriageReturn",useBROnCarriageReturn);
647         if (toolbarStartExpanded != null)
648             fcked.getConfig().put("ToolbarStartExpanded",toolbarStartExpanded);
649         if (toolbarCanCollapse != null)
650             fcked.getConfig().put("ToolbarCanCollapse",toolbarCanCollapse);
651         if (fontColors != null)
652             fcked.getConfig().put("FontColors",fontColors);
653         if (fontNames != null)
654             fcked.getConfig().put("FontNames",fontNames);
655         if (fontSizes != null)
656             fcked.getConfig().put("FontSizes",fontSizes);
657         if (fontFormats != null)
658             fcked.getConfig().put("FontFormats",fontFormats);
659         if (stylesXmlPath != null)
660             fcked.getConfig().put("StylesXmlPath",stylesXmlPath);
661         if (linkBrowserURL != null)
662             fcked.getConfig().put("LinkBrowserURL",linkBrowserURL);
663         if (imageBrowserURL != null)
664             fcked.getConfig().put("ImageBrowserURL",imageBrowserURL);
665         if (flashBrowserURL != null)
666             fcked.getConfig().put("FlashBrowserURL",flashBrowserURL);
667         if (linkUploadURL != null)
668             fcked.getConfig().put("LinkUploadURL",linkUploadURL);
669         if (imageUploadURL != null)
670             fcked.getConfig().put("ImageUploadURL",imageUploadURL);
671         if (flashUploadURL != null)
672             fcked.getConfig().put("FlashUploadURL",flashUploadURL);
673                 
674          return EVAL_BODY_BUFFERED;
675     }
676
677     /**
678      * Retrive initial value to be edited and writes the HTML code in the page
679      *
680      * @return SKIP_BODY
681      * @throws JspException if an error occurs while writing to the out buffer
682      */

683     public int doAfterBody() throws JspException JavaDoc {
684             BodyContent JavaDoc body = getBodyContent();
685             JspWriter JavaDoc writer = body.getEnclosingWriter();
686             String JavaDoc bodyString = body.getString();
687             fcked.setValue(bodyString);
688             try {
689                 writer.println(fcked.create());
690             }catch(IOException JavaDoc ioe) {
691                 throw new JspException JavaDoc("Error: IOException while writing to the user");
692             }
693             
694             return SKIP_BODY;
695     }
696
697 }
Popular Tags