JSP itself does not have any tags that provide a component for what you are asking.
I would approach the problem by using a JApplet that contains a custom JEditorPane that is specifically implemented to handle and edit RTF files (Swing includes an EditorPane for HTML but not for RTF). The JApplet would communicate with servlets through RMI (Remote Method Invocation).
Another possible solution may be in JSF, where I believe one can import Swing components into a JSF page without the use of an applet, however someone else who knows more about JSF than I do should answer that.
Long story short, there is no simple solution for what you are asking.
>I would like to know how to display a read rtf file content to open in rtf
Hey friend,
all you have to do is to read the file collect the whole of data from that .rtf document in a buffer (array of bytes) and then output it through ServletOutputStream by setting response content type to be text/rtf.
Try checking out an example code mentioned in the link to get some idea about what i was refering to.
http://itextdocs.lowagie.com/examples/com/lowagie/examples/general/webapp/HelloWorldServlet.java
>format through browser based rtf editor in servlets/Jsp
If you wanna format the rtf data you might have to go for a customized control (refered by my fellow poster) which could have been already implemented.Else where try designing your customized control
http://thepeninsulasedge.com/adfblog/2006/12/11/adf-faces-rich-text-editor-to-create-formatted-text/
http://dojotoolkit.org/docs/rich_text.html
http://www.crazysquirrel.com/computing/java/jsf/html-editing-widgets.jspx
http://www.webreference.com/programming/javascript/gr/column11/
http://www.freedownloadscenter.com/Web_Authoring/HTML_to_ASCII_Converters/HTML_to_RTF_Pro_DLL.html
Hope this helps...
REGARDS,
RaHuL