How to compile servlet with Edit Plus?

Hi
I am writing a Java servlet in EditPlus and am wondering how to include the servlet.jar file so that EditPlus knows where the javax.servlet.*, etc classes are. I suppose this is an EditPlus specific question so sorry about that but I didn't know who else to ask other than EditPlus themselves of course and I think I have tried that once.
I have read replies on this forum about changing the classpath but I dont think that that is what I need to do here and if it is I dont know what I should be writing as I am not using the jdk.
If anyone can help me at all I would be very grateful.
Thanks

Yes, I have also compiled Java files from EditPlus. Using the facilities for configuring 'User Tools' in EditPlus.
EditPlus runts programs(javac in the current context) in a separate environment(separate DOS command).
I just compiled, from EditPlus, some Java file of mine that uses something from the servlet API. It compiled just fine. I did not do any classpath or other setup on classpath lines inside EditPlus. I guess, EditPlus inherits the existing CLASSPATH(all environment settings in fact) setting from your environment and thereafter aslo passes it along to the separate command prompt it opens to run user configured tools to run.

Similar Messages

  • Can I compiler servlet with java compiler?

    Can I compiler servlet with java compiler?
    Here is an example of it:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class HelloWorldServlet extends HttpServlet
              protected void doGet(HttpServletRequest request,
              HttpServletResponse response) throws ServletException , IOException
                        response.setContentType("text/html");
                        PrintWriter out = response.getWriter();
                        StringBuffer sb = new StringBuffer();
                        sb.append("<html><body><h1>");
                        sb.append("Hello World");
                        sb.append("</h1></body></html>");
                        out.print(sb.toString());
                        out.close();
         }

    Can I compiler servlet with java compiler?
    yes.
    just include the correct jarfiles in your classpath.

  • Newbie question: how to compile servlet using tomcat?? Thank you

    How to set classpath? How to compile servlet.java?

    jsp is also converted into a servlet .java nd then into a class file
    this is index.jsp
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>untitled</title>
      </head>
      <body>
      </body>
    </html>this is _index.java
    /*@lineinfo:filename=/index.jsp*/
      /*@lineinfo:generated-code*/
    import oracle.jsp.runtime.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    public class _index extends com.orionserver.http.OrionHttpJspPage {
      public final String _globalsClassName = null;
      // ** Begin Declarations
      // ** End Declarations
      public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {
        response.setContentType( "text/html;charset=windows-1252");
        /* set up the intrinsic variables using the pageContext goober:
        ** session = HttpSession
        ** application = ServletContext
        ** out = JspWriter
        ** page = this
        ** config = ServletConfig
        ** all session/app beans declared in globals.jsa
        PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
        // Note: this is not emitted if the session directive == false
        HttpSession session = pageContext.getSession();
        if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) {
          pageContext.setAttribute(OracleJspRuntime.JSP_PAGE_DONTNOTIFY, "true", PageContext.PAGE_SCOPE);
          JspFactory.getDefaultFactory().releasePageContext(pageContext);
          return;
        int __jsp_tag_starteval;
        ServletContext application = pageContext.getServletContext();
        JspWriter out = pageContext.getOut();
        _index page = this;
        ServletConfig config = pageContext.getServletConfig();
        try {
          // global beans
          // end global beans
          out.write(__oracle_jsp_text[0]);
        catch( Throwable e) {
          try {
            if (out != null) out.clear();
          catch( Exception clearException) {
          pageContext.handlePageException( e);
        finally {
          OracleJspRuntime.extraHandlePCFinally(pageContext,false);
          JspFactory.getDefaultFactory().releasePageContext(pageContext);
      private static final char __oracle_jsp_text[][]=new char[1][];
      static {
        try {
        __oracle_jsp_text[0] =
        "\n<html>\n  <head>\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">\n    <title>untitled</title>\n  </head>\n  <body>\n  </body>\n</html>\n".toCharArray();
        catch (Throwable th) {
          System.err.println(th);
    }as you can see.. my IDE converts it into a java class so it can be conpiled to a class file.. by the way i use Oracle Jdeveloper 10g for this pupose of showing you what is happening to your jsp

  • How to compile forms with JDAPI ?

    Hi everyone:
    I have more than 200 forms need to compile. All the forms have libraries, object groups attached, they also call stored procedures in the database.
    When I run this code :
    FormModule frm= (FormModule) JdapiModule.openModule("/tmp/"+fileName);
    frm.compile();It reports error like this :
    Exception in thread "main" oracle.forms.jdapi.JdapiStatusException: _jni_compile_form failed
         at oracle.forms.jdapi.BaseAPI._jni_compile_form(Native Method)
         at oracle.forms.jdapi.FormModule.compile(Unknown Source)
         at oracle.forms.developer.JDAPIFormsApi.attachObject(JDAPIFormsApi.java:54)
         at oracle.forms.developer.JDAPIFormsApi.main(JDAPIFormsApi.java:71)Through forms builder, I need to connect to database, put all libraries and resources in the folder included in FORMS_PATH, to get them compiled.
    But how to compile them with all prerequisite conditions set up in my java code ?

    An easier way would be to compile the forms via script, there are several examples on the forum.

  • Where are the actual Aperture files located? Only in the application? I am transitioning to Lightroom and would like to only move some of the files. Advice appreciated. Also anyone know how to transfer in with edits?

    Where are the actual Aperture files located? Only in the application? I am transitioning to Lightroom and would like to only move some of the files. Advice appreciated. Also anyone know how to transfer in with edits? Using iMac, OS X, most recent Aperture and Lightroom 5.7 with plugin for Aperture.

    Define "the Aperture files".
    Read this concise guide.
    The files you imported into an Aperture Library can be exported (at any time, and repeatedly) using the command "File ▹ Export ▹ Originals".  Your Originals are never altered.  What went in is what comes out.
    Adjustments and changes to the metadata that you made since creating an Image in Aperture by importing a file are saved to a text file.  This file is combined, on-the-fly, with the Original to create the Image that you see in Aperture.  There is no file saved to disk that is the full-size Image.  Thumbnails are saved, and Previews are saved.  These are JPG files, almost always smaller than the Original.  They are not substitutes for the Image for the use you have.
    When you need a file of an Image to use in another program, you export the Image from Aperture.  "Export" means "Make me a file of this Image according to these file specs I'm providing".  The way to get files of your adjusted Images is simple:  create them by exporting.  Specify "Original size", and use a loss-less image-file format (e.g. TIFF 16-bit) if you want to retain as much visual information as possible.
    Search the Web for information about transitioning from Aperture to Lightroom.  Note that I say "transitioning".  You cannot move a database from one format to another without significant changes, and likely some loss of information.  Adobe provides a tool and some instructions.  I strongly recommend working out the process step-by-step, and then proceeding with first a few Images, then a bushel-ful, and stopping to use the first few, the the bushel-ful, before committing your entire collection to the process.
    As always, never use any computer file without having a back-up.
    We have seen mixed reports here of the success of the LR tool that creates a LR database from your Aperture database.
    If you want to carefully define the process, and test and refine it, use the excellent process-development, analysis, and execution program inShort.
    Sadly, there is not and can never be a good, thorough re-positioning of the digital assets in your Aperture Library to become digital assets in a LR database.  Just as a metaphor for any user contemplating transitioning to another digital asset manager:  that would be like digging up a house in one country, planting it in a hole in another country, and expecting to be able to use the toilet and the sinks, turn on the lights, cook dinner, and sleep soundly.
    HTH,
    Kirby.

  • Compiling servlet with helper class

    Hello,
    I have to write a very large number of database queries and huge amount of code so I decided to make each helper *.class file for each table.
    Now I have a main servlet that should instantiate each of these helper classes and conduct DB operations:
    //Servlet code
    RescardreservationTable rv = new RescardreservationTable();
    rv.insertInfo();
    RescardPassengerTable rp = new RescardPassengerTable();
    rp.insertInfo();RescardreservationTable.class
    //does DB opsMy problem is that when I try to compile servlet, I get
    insert_data.java:172: cannot find symbol
    symbol : class RescardreservationTable
    location: class insert_data
    RescardreservationTable rv = new RescardreservationTable();
    Could somebody please tell me how I can make servlet locate my java classes that it has to use?
    Thanks,
    Victor.
    Edited by: vic_sk on Dec 9, 2008 9:29 AM

    Ok, looks like it's solved. Just forcing the compiler with -classpath to look for the required class file.

  • Pls help me on how to compile servlet

    pls i need the help of some kind one to assist me on how to compile and deploy servlet .I'm new to javaEE & am using the javaEE tutorial from sun site.In the first example servlet in d book, after compiling and deploying the greetingServlet and responseServlet and deployed it ,i was told to include a welcome jsp file in d war file. all these i have done but the server always complain of not been able locate d greetingServlet.
    i use the netbeans IDE and sun java application server.The greetingServlet & responseServlet codes are these; Pls I don't know what to put in the jsp file
    package servlets;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * This is a simple example of an HTTP Servlet.  It responds to the GET
    * method of the HTTP protocol.
    public class GreetingServlet extends HttpServlet {
        public void doGet(
            HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
            response.setContentType("text/html");
            response.setBufferSize(8192);
            PrintWriter out = response.getWriter();
            // then write the data of the response
            out.println("<html>" + "<head><title>Hello</title></head>");
            // then write the data of the response
            out.println(
                    "<body  bgcolor=\"#ffffff\">"
                    + "<img src=\"duke.waving.gif\" alt=\"Duke waving\">"
                    + "<h2>Hello, my name is Duke. What's yours?</h2>"
                    + "<form method=\"get\">"
                    + "<input type=\"text\" name=\"username\" size=\"25\">"
                    + "<p></p>" + "<input type=\"submit\" value=\"Submit\">"
                    + "<input type=\"reset\" value=\"Reset\">" + "</form>");
            String username = request.getParameter("username");
            if ((username != null) && (username.length() > 0)) {
                RequestDispatcher dispatcher = getServletContext()
                                                   .getRequestDispatcher(
                            "/response");
                if (dispatcher != null) {
                    dispatcher.include(request, response);
            out.println("</body></html>");
            out.close();
        public String getServletInfo() {
            return "The Hello servlet says hello.";
    package servlets;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * This is a simple example of an HTTP Servlet.  It responds to the GET
    * method of the HTTP protocol.
    public class ResponseServlet extends HttpServlet {
        public void doGet(
            HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
            PrintWriter out = response.getWriter();
            // then write the data of the response
            String username = request.getParameter("username");
            if ((username != null) && (username.length() > 0)) {
                out.println("<h2>Hello, " + username + "!</h2>");
        public String getServletInfo() {
            return "The Response servlet says hello.";
    }

    Here is what you will need to do.
    1. Compile the servlets by performing the following steps
    1.1 Open a command line in the directory where your servlets are located.
    1.2 Type the following commands
    1.2.1 javac GreetingServlet.java
    1.2.2 javac ResponseServlet.java
    Then you should see the .class files for these classes appear in the directory .
    Next you will put these class files in the WEB-INF/classes directory.
    Once you have done that you will edit your web.xml in the WEB-INF directory to include the two servlets. That code will look something like this
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
         <servlet>
              <servlet-name>GreetingServlet</servlet-name>
              <servlet-class>GreetingServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>GreetingServlet</servlet-name>
              <url-pattern>/GreetingServlet</url-pattern>
         </servlet-mapping>
         <servlet>
              <servlet-name>ResponseServlet</servlet-name>
              <servlet-class>ResponseServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>ResponseServlet</servlet-name>
              <url-pattern>/ResponseServlet</url-pattern>
         </servlet-mapping>
    </web-app>Once you have done this save the web.xml file and recompile the war file by following these steps
    1 open a commandline in the root directory where the servlets are
    2 type the following command jar -cvf warFileName.war .
    *Note the space and period at the end of the command are not a mistake the space . tells the jar tool to complie the war from the directory you are current in.
    Once this command is successfully ran you should see a .war file appear in the directory you are in. Then simply put the war file in your deploy directory of your server and you are finished.
    alternatly if you are just doing this for yourself to learn servlets and this is not going to be deployed anywhere then I would just use the W3C's Jigsaw server which does all the work for you all you have to do is compile the servlets and put the class files in the servlets directory and you are done.

  • How to Compile Servlet Java Files

    hello ...
    i am a beginner at JSPs and java servlets ... i have been searchin' hopelessly for the past couple of days. Could someone please guide me on how to compile source files for servlets ... namely how can i include the packages javax.servlet.* since the compiler gives me an error that there is no class name ... I am using jdk1.3
    Do I need to get the java server development kit ... but i cant seem to find it any where on the sun's site ... and do i need to download the j2ee sdk too ...
    As you can gather that i am completely comfused and lost ... After doing programmin with asps and previous java experience, i had thought that the migration to a java platform on would be a breeze but the lack of any solid documentation which addresses the above questions is dampenin my spirits ... and the cryptic documentation with tomcat doesnt help either. :)
    pleaze reply soon ... i have to implement a project for my company ... otherwise i would have to put servlets and jsp back in the closet and return back to asp.

    Try http://java.sun.com/j2ee/docs.html specifically, the links on that page called Download Instructions, Installation Instructions, Java Servlets Tutorial and JavaServer Pages QuickStart Guide
    By the way, J2EE SDK's reference implementation is based on Tomcat itself but is more than a web container.

  • How to use Servlets with O8i on RH Linux 6.2 ???

    I'm using apache Jserv 1.1.2 to run my servlets all my JDBC programs work fine and other servlets too but only JDBC servlets give this message
    "SQLException caught Io exception: The network adapter could not
    established the connection"
    Can someone tell me How to configure JSERV to make connection ?

    Hi there,
    If I understand correctly you are running Jserv and Apache to connect to an Oracle 8i db on a remote machine. If you are getting the "network adapter" error make sure the listener is running on the remote machine (lsntrctl start -- lsntrctl status, or something like that from bash shell). Also make sure SQLNet is configured properly. Try connecting from a machine with SQL Plus. If this works and the listener is running you should be in business.
    Best
    Scott ([email protected])
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by CSL ():
    I'm using apache Jserv 1.1.2 to run my servlets, a remote database on O8i on linux. all my JDBC programs work fine and other servlets too(with no JDBC) but only JDBC servlets give this message
    "SQLException caught Io exception: The network adapter could not established the connection"
    Can someone tell me How to configure JSERV to make connection ?<HR></BLOCKQUOTE>
    null

  • How to run servlet with tomcat

    I have a probrom that how can I run servlet with tomcat?
    I have new a folder classes in webapps\root\WEB-INF\,and put the .class
    programme in it ,but http://localhost:8080/servlet/HelloWorldExample
    can't run ,it give me a error than http:404 not found.
    could you tell me how i can solve the problem.
    Thank u very much.

    Hi,
    Make sure the class is in classpath or in WEB-INF/classes folder and make an entry for servlet tag in web.xml in WEB-INF folder.
    Regards

  • How to compile mplayer with giflib support?

    Hey all,
    i am trying to compile mplayer (or mplayer2, i have tried several pkgbuilds from aur), as the package from extra doesn't have support for the the gif89a video_out driver. I have giflib package installed, so i have the /usr/lib/include/gif_lib.h in my filesystem. If i try to compile mplayer with the ./configure --enable-gif option, it fails with the following error message:
    libmpdemux/demux_gif.o: In function `demux_close_gif':
    demux_gif.c:(.text+0x39): undefined reference to `PrintGifError'
    libmpdemux/demux_gif.o: In function `demux_open_gif':
    demux_gif.c:(.text+0x293): undefined reference to `PrintGifError'
    libmpdemux/demux_gif.o: In function `demux_gif_fill_buffer':
    demux_gif.c:(.text+0x95b): undefined reference to `PrintGifError'
    demux_gif.c:(.text+0xb1a): undefined reference to `PrintGifError'
    ...among others, because some other libraries (cdio_paranoia, theora and caca) have undefined references too. If i check the source of giflib, i see the missing function 'PrintGifError' in 'lib/gif_err.c', but i don't have this file on my filesystem. My question is from where should i obtain these sources, and where i need to place them to compile mplayer successfully?
    Update: here is the whole list of errors, all of them are undefined references to various functions: http://pastebin.com/LttqXy5J
    Last edited by vizipok (2013-06-03 11:53:20)

    sl1pkn07 wrote:why this downgrade
    Because there's lotsa compilation fails caused by the giflib API changing.

  • How to compile swf with ANT en ASC 2.0?

    He All,
    I used to compile a swf in Flash builder with this antscript below. But mxmlc in not supported anymore. Any idea how to compile the swf with ASC 2.0?
    <target name="compile.apple" depends="clean.apple">
      <echo message="Compiling swf"/>
      <mxmlc file="${app.projectfile}" output="${app.rootfile}" optimize="true" configname="airmobile" debug="false">
      <load-config filename="${app.rootdir}/resources/ant/build.config"/>
      <source-path path-element="${flex.sdkPath}/frameworks"/>
      <source-path path-element="${app.sourcedir}"/>
      <source-path path-element="${app.rootdir}/libs"/>
      <static-link-runtime-shared-libraries/>
      <compiler.library-path dir="${flex.sdkPath}/frameworks" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      <arg line="-swf-version=17" />
      <arg line="-define=CONFIG::debug,false" />
      <arg line="-define=CONFIG::device,true" />
      <arg line="-define=CONFIG::local.false" />
      <compiler.library-path dir="${app.rootdir}" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      </mxmlc>
      </target>

    He Peter,
    Thanks for your reply. I've made some steps, but still no perfect solution. I've managed to compile a swf with ant using only the AIR SDK.
    But, check these results
    - Compiled using Flash Builder release : 455 kb
    - Compiled with ant using mxmlc : 104 kb
    - Compiled with ant using compc : 139 kb
    Can you provide us an example, how to compile a swf using ant. For example, with an AIR mobile project.
    Thanks Peter.
    Tim.

  • How to compile less with Dreamweaver in windows?

    i have Dreamweaver cs6 and i am trying to compile it with less , i have watched several tutorial on YouTube but most of them for Mac users not for windows users :/
    some videos suggest to change files inside dreamweaver like "extensions txt" but it's not working as well , Any help please ?

    http://www.dmxzone.com/go/21526/dmxzone-less-css-compiler-released-and-for-free/

  • How to communicate servlets with windows media player

    I am new to web programming I am developing an application through which a client can play media file.
    I am getting problem in,how to communicate servlet through windows media player.
    I have developed the basic architecture of my application using tiger server,now I want to open media file through windows media player using openURL option(http request).
    Can any body guide me how to build a servlet which can listen this request and how to respond appropriately
    Please Reply.

    Check out the java doc for HttpServletResponse
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html
    Your sevlet will have to set the response contentType to the appropriate mime type
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/mime.asp
    and contentLength to the file size (in bytes), then open the mp3/wma file and write the bytes to the servlet output stream.
    You could also choose to return an asx file (an xml document containing a url of the media file), and windows media player will automatically lookup the mp3/wma file stored on your web server.

  • IPhoto 6 and how it should work with edited images

    While iPhoto 6 is an improvement over previous versions in the way images are handled it is still a far cry from being perfect. At last, iPhoto does not create a duplicate within its own library but allows — through the advanced option tab — to work through an alias to the original file, thereby preserving my library structure.
    Two problems remain:
    a) when an image is deleted outside iPhoto the corresponding alias in iPhoto is not deleted upon startup. And getting rid of the ensuing error dialogue is unnerving. Why can iPhoto not browse through the original library and update its aliases when I start the application?
    b) when an image is edited in iPhoto a “modified version” is created in iPhoto’s library. Grrr.... back to square one. I don’t want all that clutter on my harddrive and while I can see that some users need to have that safety belt I would wish for an option to tell iPhoto to change the original directly (and not create a copy). I don’t work exclusively with iPhoto only and don’t want to think each and every time where the most recent version of a photo is stored.
    So, for the time being I’m back to iView Media... which is not supported through all the media browsers that access iPhoto’s library but still gives me all the control I need (and demand). If anybody knows a solution how to solve the above two problems, please let me know.

    Yeah, I started doing this when I found out about iPhoto’s new alias feature. But then I needed to retouch a photo — and there’s no such feature in iView whereas iPhoto’s retouching is rather good. Not to speak of the other cool editing features that came with iPhoto 6. On the other hand, and unfortunately if I may say so, iView 3 has no new effects and tools to offer. So, that was yesterday when I posted the message. Granted, I don’t need to edit all my images in iPhoto, but it still ***** big time that I cannot tell the **** program to apply changes to the original. Been using Macs for more than 15 years and while I understand all the safety belts and user convenience Apple’s rigid iLife thinking is in my way to be creative and productive. At least there’s hope for iPhoto 7... after all, Steve Jobs & Co. realized with iPhoto 6 that the majority does not want copies of the originals in iPhoto plus the edited versions.

Maybe you are looking for

  • Custom Message Form Opens to Wrong Page

    Probably a very simple question, but I am not that experienced with Form design in Outlook 2013. I have a form provided to me for publishing in the Organizational Forms Library... It is a simple message form that has a Message Body Page (Message) and

  • DMS Configuration

    Hi, I have attached and stored a number of documents ( say 10, each representing different packaging instructions ) in SAP DMS. These are stored at a document type / part number / version level for a DMS document number. I have created a sales order

  • Photo Booth in iOS 7

    Why did Apple nix the countdown feature in Photo Booth? Do they not know how much fun that countdown is for young kids? Me and my toddler had a lots of fun with Photo Booth back in the day. Sometimes I think Apple is blind.

  • Apparently this preloader cannot be scripted .... its impossible? or is it? :(

    i cannot get this preloader to work at all i have tried many types and forms but yet still it will not work. I have reverted back to the built in flash template sampler file , preloader for external file. What i want to do is use a preloader for a mo

  • HT204384 Why can't my Retina Macbook read my SDHC card?

    I have a SanDisk Ultra 32gb SDHC and when I plug it into my Retina Macbook Pro no error message appears, it doesnt appear in finder or in disk utility. The SD card is formatted as Fat32 according to the packaging and this page (http://support.apple.c