Include %@ include="content/home.html" %

Anybody know why that line returns
org.apache.jasper.compiler.ParseException: /eportal/index.jsp(18,0) Include directive: Mandatory attribute file missing
I tested jsp with <% String blah = "IT worked"; out.print(blah); %> So at least that works...
any suggestions to what might be wrong ?

Okay, here's the error:
Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
org.apache.jasper.compiler.ParseException: /eportal/index.jsp(18,0) Include directive: Mandatory attribute file missing
     at org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java, Compiled Code)
     at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled Code)
     at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
     at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
     at org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
     at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code)
     at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:552)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:177)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:189)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java, Compiled Code)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java, Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java, Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java, Compiled Code)
     at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java, Compiled Code)
     at java.lang.Thread.run(Thread.java:472)
This comes when I use the include line in the heading of this topic. I dont know why. It seems like the tomcat is having trouble compiling it or something...

Similar Messages

  • Spry accordion widget - SSI (server side include) as content in the panel

    After having inserted the following command <!--# include file = "content2.asp" -> in the accordion Panel Content I get an error in Dreamweaver - every time I open the file. See the error in the attached picture.
    Once all files are uploaded to the server it works apparently without problems or script errors.
    Is there anyone who can help me to use SSI "server side include" as content in accordion panels?

    Thanks for your reply.
    The fault lay in the SSI file. This file contained these tag:
    </ html>
    And of course the tag </ html> generate an error if the tag is inserted in the content of the accordion panel via ssi file.

  • Include Server Content in Test object

    We are currently including server content in Learning objects, which works very well. It is an HTML file which runs a simulation.
    I would like to know what is the best way to include this as a test. I would like to create a test, which has the HTML simulation, and test questions from the question bank. Is this possible? and if not, what is the work-around?
    Regards,
    Bernard

    Hi Bernard
    No, what I meant by grouping the learning objects together was having a structure for them under the content folder.
    When you define online learning material in OLM, you define a learning object in a content folder. These learning objects simply point to where the online material is executed from. The folders allow a hierarchical structure, so you can create one object as a 'parent' and then place other objects as 'children' beneath it.
    If you create an offering using the 'parent' learning object, then the 'child' learning objects will all be executed in the sequence they are defined under the 'parent'. This allows you to have content A (an online demo) followed by a test and then maybe followed by another online module and test etc. The learner is effectively taking the 'parent' learning object and therefore the class will not be recorded as completed until all the subordinate learning objects have been completed.
    I hope that clarifies the idea and that it will help you solve your problem.
    Regards
    Tim

  • Includes or Content Holders?

    With the new liquid rendering engine we can do includes. For example I can do this following:  {%include"/_System/includes/html.tpl"%}. I could also use the following code: {module_contentholder, name="html"} and pull in the same content into the page.
    My question is this:
    Is there any reason to use includes over content holders or use content holders over includes?
    Note: I read where someone said includes do not work in ICE editor. I am not worried about that as the sites I will be using the includes on do not use the ICE editor.

    Includes right now are just in and do not render modules etc yet. Hopefully soon.
    But they are here because Developers and clients sharing the same snippet system for two opposites has and does cause many problems.
    - For a client they will have these created for them by their partner/developer to hold content they can go in and edit for a variety of things across a site.
    - A developer uses those same content holders for regions of markup in their layouts - Headers, Footers, Sidebars and so on.
    These should always be separate.
    Most things will break with all this modern stuff with ICE. There is a V4 in the works - VERY EARLY but Alexandru did a bit of a demo at the unconference.

  • Can I include both CSS and HTML codes in one Open HTML Editor.

    Somehow Cell phones are not properly reading css codes. Is there any way to include both CSS and HTML codes in one Open HTML Editor?

    Hammad, their code is fairly mobile friendly.  Per my other discussion with you ( http://topliners.eloqua.com/thread/8532 ), Eloqua's code is responsive for the most part.  Most of their issues lie with the styling of the email where you will get different fonts and different sized fonts throughout the email and some other minor display issues.
    What you are trying to accomplish is extremely difficult to do because you do not have the access to the HTML to better control how the responsive template works which is why the Eloqua templates (and most ESP templates) stick to the more basic side of emails.
    If you want to use Eloqua's WYSIWYG to make their responsive email you can do so, but I would recommend deleting all their body text before editing anything because of the inconsistencies in their code.  Otherwise, I think you would be better off coding the emails outside of Eloqua using a 3rd party editor whether it's something more robust like Dreamweaver or Coda, or whether you feel comfortable working in a more text environment with programs like Notepad++ or Brackets.
    At the end of the day remember you are paying Eloqua for these and if you choose to stick with the WYSIWYG and you are not getting the results you expect you need to tell Eloqua through your support channels.

  • SharePoint 2013 - CQWP include child content types issue

    Hello SharePoint enthousiastes,
    I'm experimenting a weird issue with the content query webpart in SharePoint 2013.
    In the query part of the webpart settings, in the Content type section, I want to untick the "Include child content types" option >
    Content Type:
    Show items of this content type group:
    Show items of this content type:
    Include child content types
    The checkbox stays ticked even if I click on apply or ok to validate the setting.
    Is it a bug? What am I missing?
    It always worked directly in the previous version of SharePoint (2007/2010) so I don't understand why is it not working directly with 2013.
    Thanks in advance for your replies.
    BR,

    Hi BR,
    I could not reproduce this issue, I can untick the option "Include child content types" for Content Query Webpart in my SharePoint 2013.
    Please try using SharePoint Farm account(system account) to create a page and add a content query webpart, and test if this issue still occurs, also try with SharePoint Administrator account.
    And my SharePoint 2013 has been installed with
    April 2013 CU, you can install it or the latest CU and test again.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Can UCCX 10 / CUIC Provide Historical Reports That Include Email Content?

    Hi,
    Can UCCX 10 / CUIC provide historical reports that include email content?
    Currently I can only see email subject within historical reports, but on supervisor real time you can see email content.
    Our customer wants to be able to report historically on email content, as its used for reviews etc.
    Thanks in advance.
    Mike.

    Hi
    Having looked at the DB schema I see that only the to/from/subject fields are logged in the database. That's all the would be available to CUIC.
    (http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_10_5/reference/guide/dbschema.pdf?mdfid=286265496)
    That's not to say it's completely impossible - but it would be very complicated. You'd need to somehow extrac the content of the emails on the Exchange server into a database where it could be read in to CUIC. That could be very difficult, take up lots of space...
    Aaron

  • How do I redirect to the default domain without showing home.html in the url

    Is there a way to redirect the following domains to the default domain.
    www.membersalliance.com.au//
    www.membersalliance.com.au/index.aspx 
    The default domain is www.membersalliance.com.au
    We have been told that these pages are seen by google as separate content and we want to consolidate them to all go to the default domain.
    I have spoken to adobe support and they said that:
    Redirecting to another page can be done, there's no issue with that. But what we're looking for here is to not have any other postfix with the domain name. When a page is set to be the starting page, there is an automatic functionality that the postfix/name of the page is removed, but that is not the case with other pages.So, they would still show the name of the page, even if you redirect it to the home page (starting page set for your domain).
    So, I can redirect to www.membersalliance.com.au/home.html but is this seen by google as a separate page to www.membersalliance.com.au?

    To be able to redirect a website with a submit button, you must have a custom submit button and insert the following line:
    app.launchURL("www.url.com");

  • Which programs are included included in the subscription for CS customers?

    which programs are included included in the subscription for CS customers?

    Hi ilbra
    Please check this link for the programs available as part of Creative Cloud - https://www.adobe.com/ie/creativecloud/catalog/desktop.html
    Thanks
    Bev

  • The requested URL /Site/Home.html was not found on this server - HELP!

    NOT FOUND: The requested URL /Site/Home.html was not found on this server.
    This comes up when I type in my website address. I am new to this, have created my website on iweb, bought the domain name and purchased web hosting with 123-REG. I ask for their help but have only received the same rote info and nothing that has solved my problem.
    I am using Cyberduck as my FTP client but tried Classic FTP for macs before this and although it says that I am connected, it is saying that it can not change to the directory hosting10.123-reg.co.uk and asks if I have permission to be using it? I am not sure what to do?
    Please could someone advise me?
    Thanks!

    Welcome to the Apple Discussions. Since you're not using MobileMe these pages might be of some help to you:
    http://homepage.mac.com/thgewecke/iwebserver.html
    http://iwebfaq.org/site/iWebFolderFTP.html
    http://docs.info.apple.com/article.html?path=iWeb/2.0/en/6838.html
    OT

  • How do i use home.html in the first Jboss example

    how do i use home.html in the first Jboss example? i got the example to work through the command line method. i also got the CD example to work.
    the documentation does not tell you how to use the home.html file. the file suggests that i can call the servlet because it has this line:
    <form action="InterestServlet" method="POST" >
    from my knowledge of servlets, i should be able to put the home.html file in the same directory that the servlet is in, and as long as a web browser can access it in that location, then this should work... right?
    can someone tell me specifically what they did to get it to work? i CANNOT FIGURE OUT what the servlet URL is. my first guess would be http://localhost/servlets/InterestServlet . This doesnt work. Does anyone understand where i am coming from??
    I am using ANT, and the normal install of the latest JBoss. i do not have a web server running because the JBoss server says in the console "[INFO,WebService] Starting
    [INFO,WebService] Started webserver with address: null port: 8083
    [INFO,WebService] Codebase set to: http://thor:8083/
    [INFO,WebService] Started" and so i assume there is a web service there?????

    ADDENDUM:
    i still cant figure out my servlet question, so please help, if you can.
    i just figured out that i need to download the JBoss Tomcat/Catalina server. I got it running except that the Catalina web server only is working when i run it standalone, and i cant figure out why. It keeps throwing this exception:
    [INFO,EmbeddedCatalinaServiceSX] StandardHost[localhost]: MAPPING configuration error for request URI
    [ERROR,EmbeddedCatalinaServiceSX] HttpProcessor[8080][4] process.invoke
    java.lang.NullPointerException
    at org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.java:280)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
    at java.lang.Thread.run(Unknown Source)

  • Error while processing /libs/commerce/content/import.html

    hello every body;
    I wanna import a catalog from hybris to cq5, I fill the form when I click import catalog; it gives me this error:
    Error while processing /libs/commerce/content/import.html
    thanks for your help;

    thanks sham;
    ok; it's resoleved now, it was a problem in the version of cq,i was using cq5.4,it dosn't work with this version;
    but I have an other problem here where I imported a catalog from hybris; the function getProductPrice(product) doesn't work;in the file /apps/geometrixx-outdoors/components/nav_products/listitem_product.jsp
    i the line: final String price = session.getPriceInfo(product); anit gives me the error:
    Caused by: java.lang.NullPointerException
              at com.adobe.cq.commerce.hybris.impl.HybrisSessionImpl.getProductPriceInfo(HybrisSessionImpl .java:184)
              at com.adobe.cq.commerce.hybris.impl.HybrisSessionImpl.getProductPrice(HybrisSessionImpl.jav a:211)
              at com.adobe.cq.commerce.hybris.impl.HybrisSessionImpl.getProductPrice(HybrisSessionImpl.jav a:207)
    thanks for your help;

  • Apply formatting in a JEditorPane and export the content in HTML.

    Hi,
    I'm writing, a program to allow the user to enter a formated text and even add images in a JEditorPane.
    Here is a simple sample of the code:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;              //for layout managers and more
    import java.awt.event.*;        //for action events
    import java.net.URL;
    import java.io.IOException;
    public class EditorPane extends JPanel{
        private String newline = "\n";
        private JPanel buttonPanel;
        private JPanel textPanePanel;
        private JEditorPane myEditorPane;
        private JButton boldButton;
        private JButton colorButton;
        private JButton imgButton;
        private JButton saveButton;
         public EditorPane() {
            createGUI();
        private void createGUI() {
            buttonPanel = new JPanel();
            boldButton = new JButton("Bold");
            boldButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    boldButtonActionPerformed(evt);
            colorButton = new JButton("Color");
            colorButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    colorButtonActionPerformed(evt);
            imgButton = new JButton("Image");
            imgButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    imgButtonActionPerformed(evt);
            saveButton = new JButton("Save");
            saveButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    saveButtonActionPerformed(evt);
            buttonPanel.setLayout(new GridLayout(1, 4));
            buttonPanel.add(boldButton);
            buttonPanel.add(colorButton);
            buttonPanel.add(imgButton);
            buttonPanel.add(saveButton);
            textPanePanel = new JPanel();
            textPanePanel.setLayout(new BorderLayout());       
            myEditorPane = this.createEditorPane();
            JScrollPane paneScrollPane = new JScrollPane(myEditorPane);
            textPanePanel.add(paneScrollPane, BorderLayout.CENTER);
            this.setLayout(new BorderLayout());
            this.add(buttonPanel, BorderLayout.NORTH);
            this.add(textPanePanel, BorderLayout.CENTER);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                     JFrame frame = new JFrame("TextSamplerDemo");
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   EditorPane newContentPane = new EditorPane();
                    //newContentPane.setOpaque(true); //content panes must be opaque
                    frame.setContentPane(newContentPane);
                    frame.pack();
                    frame.setSize(300,300);
                    frame.setVisible(true);
    private JEditorPane createEditorPane() {
            JEditorPane editorPane = new JEditorPane();
            editorPane.setEditable(true);
            java.net.URL helpURL = TextSamplerDemo.class.getResource(
                                            "simpleHTMLPage.html");
            if (helpURL != null) {
                try {
                    editorPane.setPage(helpURL);
                } catch (IOException e) {
                    System.err.println("Attempted to read a bad URL: " + helpURL);
            } else {
                System.err.println("Couldn't find file: simpleHTMLPage.html");
            return editorPane;
        private void boldButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("boldButtonNextActionPerformed");
        //myEditorPane
            // TODO add your handling code here:
        private void colorButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("colorButtonActionPerformed");
            // TODO add your handling code here:
        private void imgButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("imgButtonActionPerformed");
            // TODO add your handling code here:
        private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {
        System.out.println("saveButtonActionPerformed");
        String newStr = new String("this is the new String");
        //newStr.setFont(new java.awt.Font("Tahoma", 0, 14));
        this.myEditorPane.replaceSelection("sdfsdfsd");
            // TODO add your handling code here:
    }and the HTML Code of simpleHTMLPage.html is
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <p>Simple text</p>
    <p><strong>Bold text</strong></p>
    <p><em>Italic text</em></p>
    <p align="center">Center text</p>
    <p><font color="#000099"><strong>Color text</strong></font></p>
    <p>image here : <img src="images/Pig.gif" width="121" height="129"></p>
    <p> </p>
    </body>
    </html>By pressing the Save button I can change the selected text.
    I don�t know the way to get and apply the format (size, color �) to only the selected text and display the selected image in real time in the EditorPane. Like if you press the Bold button, the selected text font will be change to bold.
    I would like to get or save the HTML code of the content of the EditorPane by pressing the Save button, How to make it?
    I can apply the formatting on the selected text in a JTextPane, but I don't know the way to save or export the content in HTML. By doing that it could fix my problem too.
    So any help to do that will be much appreciated.
    Thanks.

    Hi,
    Tks for your answer. That one I can do it. I would like to display the selected text in bold instead of adding the tag in the JEditorPane. If I get you right, you get the hole content of the JEditorPane and save it. How did you get it ? And before saving that in the database, did you fing the keysWord to convert the HTML tag in the corresponding entities ?
    Bellow you have a sample of code to make the formatting in the JTextPane.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.text.*;
    import javax.swing.text.Highlighter;
    import javax.swing.event.*;
    import java.util.*;
    import javax.swing.text.*;
    import javax.swing.text.BadLocationException;
    public class MonJTextPane extends JFrame implements CaretListener, ActionListener
              *     Attributs :
         private JTextPane monTextPane;
         private JLabel monLabel;
         private JButton monBouton;
         private StyleAide style; // class qui defini les effets de style de l'editeur
              *     Constructeur :
         public MonJTextPane ()
         {     super ("Aide");
              // construction du composant Texte
              this.style = new StyleAide (new StyleContext ());
              this.monTextPane = new JTextPane ();
              this.monTextPane.setDocument (style);
              this.monTextPane.addCaretListener (this);
              // construction de la fenetre :
              this.getContentPane ().setLayout (new BorderLayout ());
              this.setBounds (150,150,600,550);
              this.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              this.monLabel = new JLabel ("Auncune ligne saisie...");
              this.monBouton = new JButton ("change de style");
              this.monBouton.addActionListener (this);
              JPanel panel = new JPanel ();
              panel.setLayout (new GridLayout (1,2));
              panel.add (monLabel);
              panel.add (monBouton);
              this.getContentPane ().add (panel, BorderLayout.SOUTH);
              this.getContentPane ().add (this.monTextPane, BorderLayout.CENTER);
              this.setVisible (true);
              *     Methodes :
         private int getCurrentLigne ()
         {     return ( this.style.getNumLigne (monTextPane.getCaretPosition ())+1 );
         public int getCurrentColonne ()
         {     return ( this.style.getNumColonne (monTextPane.getCaretPosition ())+1 );
              *     Methodes CaretListener:
         // ecoute les deplacements du curseur d'insertion
         public void caretUpdate(CaretEvent e)
         {     int debut = java.lang.Math.min (e.getDot (), e.getMark ());
              int fin   = java.lang.Math.max (e.getDot (), e.getMark ());
              this.monLabel.setText ("Ligne numero : "+ this.getCurrentLigne ()+" Colonne : "+this.getCurrentColonne ()+" (debut : "+debut+", fin : "+fin+")");
              *     Methodes ActionListener:
         public void actionPerformed (ActionEvent e)
         {     int start     = monTextPane.getSelectionStart();
              int end          = monTextPane.getSelectionEnd();
              int debut     = java.lang.Math.min (start, end);
              int fin          = java.lang.Math.max (start, end);
              int longueur= fin - debut;
              this.style.changeStyleSurligne (debut, longueur);
         // lance le tout ....
         public static void main (String argv [])
         {     new MonJTextPane ();
    // la Classe DefaultStyledDocument correspond a la classe utilise comme Model pour les
    // composant Texte evolue comme : JTextPane ou JEditorPane
    // en derivant de cette derniere nous pouvons donc redefinir les methodes d'insertion afin de personnalise
    // le style d'ecriture en fonction du texte et creer une methode permettant de modifier le style utilise pour
    // une partie de texte deja ecrite.
    class StyleAide extends DefaultStyledDocument
              *     Constructeur :
         public StyleAide (StyleContext styles)
         {     super (styles);
              initStyle (styles);
              *     Methodes :
         // redefini pour choisir l'effet de style a utiliser
         public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
         {     try
              {     // si le texte insere est egale a HELP le texte s'ecrit avec le style "styleOp"
                   if ( str.equals ("HELP") )
                   {     super.insertString (offs, str, getStyle ("styleOp"));
                   else // sinon le texte est ecrit avec le style "styleNormal"
                   {     super.insertString (offs, str, getStyle ("styleNormal"));
              catch (BadLocationException e)
              {     System.out.println ("Tuuuttt erreur Insere");
         // modifie le style d'ecriture d'un texte deja ecrit compris
         public void changeStyleSurligne (int positionDepart, int longueur)
         {     setCharacterAttributes (positionDepart, longueur, getStyle ("styleKeyWord"), true);
         // le Model d'un composant texte est enregistre sous form d'un arbre
         // cette methode permet de recuperer le noeud root de l'arbre
         private Element getRootElement ()
         {     return this.getDefaultRootElement ();
         // methode permettant d'obtenir la ligne correspondant a un offset donnee
         public int getNumLigne (int offset)
         {     Element eltR = getRootElement ();
              int numLigne = eltR.getElementIndex (offset);
              Element elt  = eltR.getElement (numLigne);
              if ( offset != elt.getEndOffset () )
              {     return numLigne;
              else
              {     if ( numLigne != 0 )
                   {     return numLigne+1;
              return 0;
         public int getNumColonne (int offset)
         {     Element eltR = getRootElement ();
              Element elt = eltR.getElement (eltR.getElementIndex (offset));
              int numColonne = offset-elt.getStartOffset ();
              return numColonne;
         // Defini les differents styles
         private static void initStyle (StyleContext styles)
         {     // definition du style pour le texte normal (brute)
              javax.swing.text.Style defaut = styles.getStyle (StyleContext.DEFAULT_STYLE);
              javax.swing.text.Style styleNormal = styles.addStyle("styleNormal", defaut);
              StyleConstants.setFontFamily (styleNormal, "Courier");
              StyleConstants.setFontSize (styleNormal, 11);
              StyleConstants.setForeground(styleNormal, Color.black);
              javax.swing.text.Style tmp = styles.addStyle("styleKeyWord", styleNormal);
              // Ajout de la couleur blue et du style gras pour les mots cle
              StyleConstants.setForeground(tmp, Color.blue);
              StyleConstants.setBold(tmp, true);
              tmp = styles.addStyle("styleOp", styleNormal);
              // Ajout de la couleur rouge pour le style des operateurs
              StyleConstants.setForeground(tmp, Color.red);
    }But it hard for me to convert it in the corresponding HTML document.
    Did you have and idea
    Tkks

  • Trying to open a page in IE-tab using javascript, script type="text/javascript" window.location.href="chrome://coralietab/content/container.html?url=0,myurl" /script Error:Component returned failure code:0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]

    I am trying to open a page in IE-tab using javascript like this, <script type="text/javascript"> window.location.href = "chrome://coralietab/content/container.html?url=0,myurl" ;</script>.Error occured : [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.href]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame ::myurl :: load :: line 234" data: no] I have IE-Tab plug-in installed..when I open the same link manually in mozilla,it works fine and page gets opened in Ie-tab.

    The only way this might be possible is by using the HostContainer object
    to access the HTML page and do it from there.

  • Local links have chrome://ietab2/content/reload.html?

    When IE Tab2 is active on a web page (in IE mode), I drag the URL to my desktop to create a link to the web site. Then, when I try to d-click that desktop shortcut, it does not work because it has "chrome://ietab2/content/reloaded.html?url=" added in front of the URL.
    1. How do I get IE Tab2 to save it properly.
    2. or, how do I get windows to recognize "chrome protocol"?
    Thanks.

    You probably need to modify the link in the shortcut and remove the chrome part and the quotes in the internet shortcut leaving only the URL to make it work if dragging the link adds the IE Tab2 chrome protocol.

Maybe you are looking for

  • Amber update but map and bere drive not work

    After amber update my here map and here drive not work just open the app but not open and close automatically

  • N73 - transferring photos from pc to phone

    Hello I can find plenty of info for transferring photos from phone to pc but cannot work out how to transfer a favourite photo to be my wallpaper from my pc to my phone. The Nokia support section said I could drag and drop but this didn't work. I'm s

  • Update PO Header Description field for Blanket Purchase Agreement

    Hi all, I am trying to update description field for Blanket Purchase Agreement using Import price catalog. Open interface runs successfully and not getting any errors but, the description field is not getting updated. Is it possible to update BPA usi

  • Set all text in brackets as Notes?

    I created the following search string to find the shortest match of text in brackets in my document. \[.+?\] What I'd like to do is set these all as notes so the info is still there, but not in the body text of the document. I don't see a way to do i

  • A small wrapper script for setting the lib32-gtk environment.

    Hi all, i've created a small script [1], which sets the gtk2 environment for lib32 applications. Thanks to buttons and alexwizard... just put run_bin32_gtk before the app command. I use this script for QT4 apps mostly, for instance: run_bin32_gtk ope