This discussion is archived
7 Replies Latest reply: Sep 22, 2011 10:13 AM by 832549 RSS

Build code editor

832549 Newbie
Currently Being Moderated
Hi,

I am looking to buikd a program editor. The editor should easily be embedded in the web page, for the user to test the program and view the result. If syntax error occurs, the line of the error is shown colored as shown as in Eclipse and Netbeans. Is there any package for implementing this?

Thanks.
  • 1. Re: Build code editor
    gimbal2 Guru
    Currently Being Moderated
    27091988 wrote:
    Hi,

    I am looking to buikd a program editor. The editor should easily be embedded in the web page, for the user to test the program and view the result. If syntax error occurs, the line of the error is shown colored as shown as in Eclipse and Netbeans. Is there any package for implementing this?

    Thanks.
    If such a package would exist, the internet would be littered with half-finished implementations (and one or two decent ones) and you probably wouldn't be at the point that you want to make one too.


    I encourage you to do an exercise. Download a popular content management system, which always have browser editors embedded so you can manage the content of pages. See how cumbersome it is to actually have to do that when you have for example HTML content in there.

    In any case if you must, take a look at a javascript based editor component such as TinyMCE and take a look at for example javascript syntaxhighlighter.

    http://www.tinymce.com/

    http://code.google.com/p/syntaxhighlighter/


    Good luck combining the two.
  • 2. Re: Build code editor
    832549 Newbie
    Currently Being Moderated
    Hi,

    Let me go through my project requirement.

    The user types a program in the editor and then clicks on submit button. On click of the submit button, the program is compiled at back processing. If compiler errors occur, the stack trace is returned to the user. If no compile time error occurs, the program is executed and the output is shown to the user.
    Now, I have to build pages which contains this editor and submit button using J2EE technology preferably JSP.
    How shall I go about the same?

    Regards.
  • 3. Re: Build code editor
    796440 Guru
    Currently Being Moderated
    27091988 wrote:
    Hi,

    Let me go through my project requirement.

    The user types a program in the editor and then clicks on submit button. On click of the submit button, the program is compiled at back processing. If compiler errors occur, the stack trace is returned to the user. If no compile time error occurs, the program is executed and the output is shown to the user.
    Now, I have to build pages which contains this editor and submit button using J2EE technology preferably JSP.
    How shall I go about the same?
    Hi, I want to build a car. When the driver turns the key, the engine will start. When he presses the accelerator, he will speed up, and when he presses the brake he will slow down. When he turns the steering wheel, his direction of travel will change. How do I go about building it?
  • 4. Re: Build code editor
    796440 Guru
    Currently Being Moderated
    27091988 wrote:
    Hi,

    Let me go through my project requirement.

    The user types a program in the editor and then clicks on submit button. On click of the submit button, the program is compiled at back processing. If compiler errors occur, the stack trace is returned to the user. If no compile time error occurs, the program is executed and the output is shown to the user.
    Now, I have to build pages which contains this editor and submit button using J2EE technology preferably JSP.
    How shall I go about the same?
    Hi, I want to build a car. When the driver turns the key, the engine will start. When he presses the accelerator, he will speed up, and when he presses the brake he will slow down. When he turns the steering wheel, his direction of travel will change. How do I go about building it?
  • 5. Re: Build code editor
    832549 Newbie
    Currently Being Moderated
    Hi,

    Let me go through my project requirement.

    The user types a program in the editor and then clicks on submit button. On click of the submit button, the program is compiled at back processing. If compiler errors occur, the stack trace is returned to the user. If no compile time error occurs, the program is executed and the output is shown to the user.
    Now, I have to build pages which contains this editor and submit button using J2EE technology preferably JSP.
    How shall I go about the same?

    Regards.
  • 6. Re: Build code editor
    DrClap Expert
    Currently Being Moderated
    27091988 wrote:
    Now, I have to build pages which contains this editor and submit button using J2EE technology preferably JSP.
    So does that mean that the editor will run in the browser? Wouldn't you be writing it in Javascript, then? (Or preferably looking for Javascript rich text editors...) Which would mean your first step would be to learn the difference between Java and Javascript so you would be able to target your searches for information on the web more productively.
  • 7. Re: Build code editor
    832549 Newbie
    Currently Being Moderated
    Hi,

    Yup, I won't be writing it in Javascript. I want to write in - say JSP/JSF and deploy it on Weblogic server.
    A text editor instead will also do.
    Is it possible to write so in JSP/JSF.
    Any link or web search content, coz I am unable to get a good search on the web.
    Help will be highly appreciated.

    Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points