Servlet in Eclipse please help !!!

Hello
I try to create a HelloWord sevlet in Eclipse I have install tomcat
in eclipse I can start an stop the server problemless
I did create tomcat project and new Class in WEB-INF/src/Mpackage/HelloWord.java
to tstart the servlet http//localhost:8080/MyProject/MyPackage.HelloWorld
I becom folowing Error
The requested resource (/MyProject/MyPackage.HelloWorld) is not available.
what is wrong?????????
thanks

Configure the servlet in web.xml and then try

Similar Messages

  • Error with Eclipse - please help me

    Hi
    I know that maybe that's not the best place to ask about DisplayTag, but You are my last chance !!! So please help me!
    I am using DisplayTag in my web application. Could You tell me please why a got such error in my class?
    The type javax.servlet.jsp.PageContext cannot be resolved. It is indirectly referenced from
    required .class filesThe code of class :
    package bus;
    import org.displaytag.decorator.TableDecorator;
    public class Wrapper extends TableDecorator
         static public int i=0;
         public Wrapper()
              super();
    }I read that is not the problem with my class but with my project and I have to build path in my project. But how can I do this???
    Thnx for help
    Martin

    You need to add the javax.servlet classes to your classpath.
    Easiest way is to extend the JRE in eclipse with those classes so that it would automatically be applied to every new project. Go to Window - Preferences - Java - Installed JREs - Select the JRE used - Edit - Add External JARs - add the JAR with javax.servlet classes to the JRE system libraries.
    You can use the javaee.jar of the Java EE 5.0 SDK [1] or the Glassfish /lib directory [2], or the servlet-api.jar of Tomcat's /lib directory [3].
    [1] http://java.sun.com/javaee
    [2] https://glassfish.dev.java.net
    [3] http://tomcat.apache.org

  • Exception when running WLST in Eclipse - Please Help!!!

    Hello,
    I am trying to get get a WLST online connection via a java class, but I am getting an exception when trying to connect to an admin server instance:
    <br>
    <br><b>javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
         java.io.EOFException]
         at weblogic.jrmp.Context.lookup(Context.java:189)
         at weblogic.jrmp.Context.lookup(Context.java:195)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:546)
         at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:285)
    <br>
    <br>
    The CompatabilityMBeanServer is not initialized properly. This might happen if the CompatabilityMBeanServer is disabled via the JMXMBean.To view the real exception use dumpStack()
    WLST detected that the RuntimeMBeanServer is not enabled. This might
    happen if the RuntimeMBeanServer is disabled via the JMXMBean.
    Please ensure that this MBeanServer is enabled. Online WLST cannot function
    without this MBeanServer.</b>
    <br>
    <br>
    I am basically trying to run the following WLST command in java:
    <b>connect('weblogic','weblogic','t3://localhost:7201')</b>
    <br>
    <br>
    Here is the java block that I call to create the connection with the WLSTIterpreter:
    <br>
    <br>
    <b>StringBuffer buffer = new StringBuffer();
    buffer.append("connect('weblogic','weblogic','t3://localhost:7201')\n");     System.out.println(buffer.toString());
    <br>
    INTERPRETER.exec(buffer.toString());</b>
    <br>
    <br>
    My admin server is running at this address and the CompatabilityMBeanServer is enabled. The strange thing this is that I am able to run the WLST via the command line and the connection is successful with no problems. This leads me to believe that there is something wrong with my classpath/environment that I have setup in Eclipse but I am not sure.
    Any ideas on where I went wrong??? Please help!
    Thanks :)
    PS. I am running WebLogic 9.1 and java 150_06
    Message was edited by:
    rogaljo

    I also have a similar issue (JNDI lookup works on the command line but not in Eclipse).
    I posted another topic regarding this today with the title:
    "CommunicationException ..."
    In the groups:
    weblogic...jndi
    weblogic...jdbc

  • Junit in eclipse please help!!!

    Hi,
    I am a real newbie with eclipse, java etc etc and am trying to install junit for eclipse I have downloaded junit4.0.zip and pasted the extracted folder to my plugins folder in eclipse. I then set the class path as per instructions in dos:
    "set CLASSPATH=C:\Program Files\junit4.0\junit-4.0.jar;C:\Program Files\junit4.0\;f:\data\proj\"
    then run the test:
    "java org.junit.runner.JUnitCore org.junit.tests.AllTests"and gives output: "OK(257 tests)"
    so after restarting eclipse I am expecting that junit variables will not be underlined in red anymore and I can run junit tests. But all I get is a pop up error dialog box saying:
    "Cannot find class 'junit.framework.TestCase' on project build path"
    Can anyone please help I really need to get this working
    much appreciated

    Thanks aniseed that was very helpful:) however when I have loaded .jar files as global entries nothing seems to happen at all I still have an underlined junit variable in my code here are the .jar files I have included:
    jdo.jar
    jpox.jar
    jpox-enhacer-1.1.0-beta-6.jar
    log4j.jar
    junit-4.0.jar
    I then click apply nothing happens so I shutdown eclipse start it up again check entries haven't magically disappeared and still nothing has changed.
    Are there any other .jar files I haven't missed?
    Any help would be very much appreciated.
    Paul

  • Missing java file via eclipse.please help

    There is a java file missing in my eclipse when i do an update
    via svn.
    the error class the class shows 'Trade cannot be resolved to a type
    How do I import via SVN fo that specific file that is missing?
    I tried doing a fresh update but still its missing?
    please help

    Suresh,
    there are multiple ways to achieve that. If it is a "pure" java application create a java project.
    If you put java files into portal, webservice etc projects, they be compiled with the projects build process.
    To compile a single class you have also the option to configure an entry in the tool section (which points to javac for example) and run the tool, when your file is open (like in Visual Studio).
    -kai

  • Jsp,servlet,bean question,please help

    The Tomcat Web server set up like this.......
    The directory structure is
    e:/sampleapp/WEB-INF/classes
    /lib
    And the web.xml is in the WEB-INF for the use of ay potential servlet.
    The basic understanding is that all the .java files go into the WEB-INF directory and the .class files go into the classes directory.
    All the .jsp files go into the sampleapp directory.Till here is correct I feel.
    Now for my qustion......
    I plan to use jsp,servlet and beans for a potential web application...,where do all these files go?,just the same as above or is there a difference.
    Hope that I have given a reasonable explaination to my question.
    Thanks for any replies
    AS

    All of your compiled servlet and java bean (java
    classes in general) will be placed into the following
    directory (under a directory structure matching the
    java package they are in):
    e:/sampleapp/WEB-INF/classesAll of your .jar files that are used as libraries (not
    your .jar files for applets):
    e:/sampleapp/WEB-INF/libAll of the rest of your JSP files, javascript files,
    HTML files, JAR files, images files, etc. will go into
    the following directory:
    e:/sampleappYou must make sure you put your sampleapp directory
    where tomcat can load it. Or use the admin tool to
    load it. If you make a .WAR file with a corresponding
    web.xml file in it, it will simplify loading it into
    tomcat. It also will help you do your servlet
    mappings, etc. I hope this helps.Thanks for your timely response.To add to it,let me tell you.
    The <b>bean</b> files are put into a package right,so they should be put into the WEB-INF/classes/<package name>
    What about The <b> servlet </b> files...... they are just put into the WEB-INF/classes/ directory????
    Kindly let me know.
    Thanks
    AS

  • Servlets in Websphere - Please help!!!

    Can anybody please tell me this info
    * Where exactly does Websphere start looking for servlet when url is typed and webpage requested.
    * Any info you know about logs, error logs etc - where should I look for them in Websphere
    * What kind of steps should be taken care of when upgrading Websphere
    * Any book/ website u know that can tell me info about the above things - I just want more info/some basic info about internal stuff in Websphere - not what I see on the console.
    Thanks in Advance.

    * this is like with all J2EE compliant application servers defined in the web.xml. In that file, you define your servlets and a servlet mapping. This servlet mapping is the link between the URL-type and the servlet; eg:
    <web-app id="WebApp_1">
    <display-name>Example</display-name>
    <description>Example servlet</description>
    <servlet id="servletmapping">
    <servlet-name>servletmapping</servlet-name>
    <servlet-class>com.something.MyServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping id="examplemapping">
    <servlet-name>servletmapping</servlet-name>
    <url-pattern>*.myservlet</url-pattern>
    </servlet-mapping>
    </web-app>
    * all logs are located in the ../Webspeher/AppServer/logs folder
    * Upgrading websphere from?
    * It speeks a bit for itself, the best website for this is www.ibm.com/websphere (you can also find some good docs for making j2ee applications using websphere on that url)

  • Internal Servlet Error. Please Help!

    Hi All,
    I get an Internal Servlet Error. What's wrong of it?
    Is it any problem in servlet configuration?
    If yes, how can I solve it?
    Thanks very much
    Error: 500
    Location: /Main
    Internal Servlet Error:
    java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
         at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:446)
         at org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoader.java:174)
         at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:265)
         at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
         at org.apache.tomcat.core.Handler.service(Handler.java:254)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:479)

    There's something wrong with your application server setup if the servlet classes themselves cannot be found. Do the build-in examples work?

  • Working with EAR file & (Servlet/JSP) Clustering - Please Help

              Hi,
              In my project we pack our application using EAR file. We read BEA's article, which
              discussed the class loaders hierarchy and it looks like this problem should not occur:
              When the garbage collection is being invoked - it somehow fails to resolve the class
              weblogic.jndi.WLInitialContextFactory.
              We have encountered the following error (stack trace):
              Message: severity="ERROR" sessionId="9IUUN4xoQf1wOkfEN8m62SFjEpNC1e4lLHSzyc2s01GPk5Up25cJ!-1680906364!182460375!7559!7002!1728341859!182464192!7559!7002!1023972500766"
              date="Jun 13, 2002" time="3:49:05 PM" threadId="Finalizer"
              Description:
              Throw:     amdocs.jspInfra.exceptions.FailedToRemoveEjbException: [an error occurred
              while trying to remove an ejb.]
              null- caused by: amdocs.jspInfra.exceptions.InitialContextCreationFailureException:
              [an error occurred while trying to create a new initial context.]
              null- caused by: javax.naming.NoInitialContextException: Cannot instantiate class:
              weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException:
              weblogic/jndi/WLInitialContextFactory]
              amdocs.jspInfra.exceptions.InitialContextCreationFailureException: [an error occurred
              while trying to create a new initial context.]
              null- caused by: javax.naming.NoInitialContextException: Cannot instantiate class:
              weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException:
              weblogic/jndi/WLInitialContextFactory]
              javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory.
              Root exception is java.lang.ClassNotFoundException: weblogic/jndi/WLInitialContextFactory
                   at java.lang.Class.forName0(Native Method)
                   at java.lang.Class.forName(Class.java:195)
                   at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
                   at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
                   at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
                   at javax.naming.InitialContext.init(InitialContext.java:222)
                   at javax.naming.InitialContext.<init>(InitialContext.java:198)
                   at amdocs.jspInfra.userManagement.RequestContext._createContext(RequestContext.java:550)
                   at amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.java:391)
                   at amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.java:415)
                   at amdocs.jspInfra.beans.GenericJspBean._removeConversation(GenericJspBean.java:466)
                   at amdocs.jspInfra.beans.GenericJspBean._cleanUp_(GenericJspBean.java:413)
                   at amdocs.jspInfra.beans.GenericJspBean.cleanUp_(GenericJspBean.java:117)
                   at amdocs.jspInfra.beans.GenericJspBean.finalize(GenericJspBean.java:593)
                   at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
                   at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
                   at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
                   at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)
              

    The context classloader needs to be set so that the thread can load the
              Weblogic context factory class inside the finalizer thread.
              Simply save the context classloader when running inside the ejb code and set
              that inside finalize method so that the class can get loaded correctly.
              1) keep a member variable
              ClassLoader myccl;
              2) Instantiate it in the regular application thread as
              myccl = Thread.currentThread().getContextClassLoader();
              3) In the finalize() method keep this as the first line.
              Thread.currentThread().setContextClassLoader(myccl);
              -Sabha
              "Yossi Cohen" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              >
              > In my project we pack our application using EAR file. We read BEA's
              article, which
              > discussed the class loaders hierarchy and it looks like this problem
              should not occur:
              > When the garbage collection is being invoked - it somehow fails to resolve
              the class
              > weblogic.jndi.WLInitialContextFactory.
              > We have encountered the following error (stack trace):
              >
              > Message: severity="ERROR"
              sessionId="9IUUN4xoQf1wOkfEN8m62SFjEpNC1e4lLHSzyc2s01GPk5Up25cJ!-1680906364!
              182460375!7559!7002!1728341859!182464192!7559!7002!1023972500766"
              > date="Jun 13, 2002" time="3:49:05 PM" threadId="Finalizer"
              > Description:
              > Throw: amdocs.jspInfra.exceptions.FailedToRemoveEjbException: [an error
              occurred
              > while trying to remove an ejb.]
              > null- caused by:
              amdocs.jspInfra.exceptions.InitialContextCreationFailureException:
              > [an error occurred while trying to create a new initial context.]
              > null- caused by: javax.naming.NoInitialContextException: Cannot
              instantiate class:
              > weblogic.jndi.WLInitialContextFactory [Root exception is
              java.lang.ClassNotFoundException:
              > weblogic/jndi/WLInitialContextFactory]
              > amdocs.jspInfra.exceptions.InitialContextCreationFailureException: [an
              error occurred
              > while trying to create a new initial context.]
              > null- caused by: javax.naming.NoInitialContextException: Cannot
              instantiate class:
              > weblogic.jndi.WLInitialContextFactory [Root exception is
              java.lang.ClassNotFoundException:
              > weblogic/jndi/WLInitialContextFactory]
              > javax.naming.NoInitialContextException: Cannot instantiate class:
              weblogic.jndi.WLInitialContextFactory.
              > Root exception is java.lang.ClassNotFoundException:
              weblogic/jndi/WLInitialContextFactory
              > at java.lang.Class.forName0(Native Method)
              > at java.lang.Class.forName(Class.java:195)
              > at
              com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:45)
              > at
              javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
              > at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
              > at javax.naming.InitialContext.init(InitialContext.java:222)
              > at javax.naming.InitialContext.<init>(InitialContext.java:198)
              > at
              amdocs.jspInfra.userManagement.RequestContext._createContext(RequestContext.
              java:550)
              > at
              amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.j
              ava:391)
              > at
              amdocs.jspInfra.userManagement.RequestContext.createContext(RequestContext.j
              ava:415)
              > at
              amdocs.jspInfra.beans.GenericJspBean._removeConversation(GenericJspBean.java
              :466)
              > at amdocs.jspInfra.beans.GenericJspBean._cleanUp_(GenericJspBean.java:413)
              > at amdocs.jspInfra.beans.GenericJspBean.cleanUp_(GenericJspBean.java:117)
              > at amdocs.jspInfra.beans.GenericJspBean.finalize(GenericJspBean.java:593)
              > at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
              > at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
              > at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
              > at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)
              >
              

  • Error in JDBC while using in a Servlet.Please HeLP!!!!!!!

    &#304;s there any one can help me I will be very glad.
    I'm preparing a homework for University and have a small(for me B&#304;&#304;G) problem.
    I want to make a database connection with servlet .
    as a full working program I try to use CONNECT.java To Run in a Servlet.
    My program can run on eclipse platform with out any problem but when I want to use it in my server with servlet (I change the program as a servlet) I take This error What Sould I dou.
    PLEASE Help.....
    MY ERRoR is:
    java.lang.ClassNotFoundExeption: com.microsoft.jdbc.sqlserver.SQLserverDriver
    It works on Ecl&#304;pse but Not in my server with servlet
    HELP HELP HELP....

    You don't have the JDBC-SQLServer driver in the classpath when you run it on the server. (You probably added the driver into the Eclipse project library.)
    Depending on how you set up your server and java container, you might try putting the driver in the "WEB-INF/lib" directory (if it's a .jar file).

  • Urgent:Please Help. Need to deploy web application with servlet:(

    Tomcat 4.0 is already installed.
    Trying to deploy a web application and invoke a servlet through it.
    Here is the command I am using for deploying the application:
    http://localhost:8080/manager/install?path=/NewApplication&war=file:d:\Tomcat4\webapps\NewApplication
    The application get deployed. However, I have a problem. As soon I stop and restart the server, this application is gone.
    1. Please someone help: How should I make it permanent so that the application stays even if I restart the server.
    2. I am not able to access the servlets placed in the /WEB-INF/classes/ sub-directory under NewApplication directory.
    If you need I can cut and paste the web.xml file which will show the deployment descriptor.
    Please help: How do I make this work. I need it urgent.
    Any help will be appreciated.
    Thanks,
    Indrasish.

    The simplest solution would be to put the war file inside the webapps directory and restart the server. You should be able to access the app using the http://servername/app

  • Should I use a servlet? - please help

    Hi,
    This is my problem:
    I have a class (say, DBClass) that connects to the database - it has general functions for insertion, updation, and deletion.
    I have some other classes that use the DBClass to perform insert, update, delete operations on different tables.(e.g., User.java is the class that uses DBClass to add users to the UserMaster table)
    Now, I have a JSP that has a form (to accept user information). Is it right in instaniate a User object in the jsp itself, and call the addUser method (which will use the 'insert' method in DBClass and add it to the database), or will it be right to post the data to a servlet, and do the whole thing there?
    Which is the right way to do it?
    Please help. I am new to the JSP technology..
    Thank you,
    sangita

    Hi sangita,
    It is always recommended that for insertion in the database, u should use a Servlet and for retrieval of data, u should use a Java bean. U can write a DBClass, where u will write one method for returning the database connection and another for closing the connection. These methods u can access from your servlet as well as your bean.
    Hope it will help. Let me know.
    atanu

  • Deploying servlet on Tomcat using "ant install" not working. Please help.

    Hello. Normally I can find answers by using search, but I can't today for some reason. So please bare with me if this has been mentioned before. I will try to provide as much info as possible so that helping me isn't too much a chore. Thank you.
    I have downloaded and installed the JWSDP 1.3. and Tomcat is running. I am also using Ant 1.5.4 (previous installation - not one included with JWSDP) and modeled my build.xml file after the template provided here:
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt.
    When I run ant on my respository, everything builds fine. But when I run Ant with the install target, I get the following error:
    BUILD FAILED
    file:C:/owl/build.xml:366: java.io.IOException: Server returned HTTP response co
    de: 401 for URL: http://localhost:8080/manager/deploy?path=%2Fowl&war=file%3A%2F
    %2FC%3A%5Cowl%2Fbuild
    Here is line 366 build.xml:
    localWar="file://${build.home}"/>
    ...which is included in this block for the target "install":
    <target name="install" depends="compile"
    description="Install application to servlet container">
    <deploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"
    localWar="file://${build.home}"/>
    </target>
    When I point my brower to the url located in the error verbose, I get the following:
    FAIL - Encountered exception java.lang.NullPointerException
    I am trying to get my environment set up correctly before I start spending time developing servlets, but I am getting tempted to just develop to servlets and "manually" installing/deploying them either by copying and pasting or by using the Tomcat manager. I would really like to do everything from Ant though if possible. Please help.

    I don't think this is at all correct:
    localWar="file://${build.home}"/>You've got to create a real WAR file - a JAR file with WEB-INF and all its minions inside it:
    http://access1.sun.com/techarticles/simple.WAR.html
    That's the file you need to refer to there. You can manage that with Ant too, of course.
    Here's what my Ant build.xml looks like for Web apps (there's a build-web.properties file that follows):
    build-web.xml
    <project name="Tomcat Build Tasks" default="clean" basedir=".">
        <target name="init-props">
            <tstamp>
                <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" />
            </tstamp>
            <filterset id="ant.filters">
                <filter token="DATE" value="${TODAY}" />
                <filter token="TIME" value="${TSTAMP}" />
            </filterset>
            <!-- Load in all the settings in the properties file -->
            <property file="build.properties" />
            <!-- Load in all Tomcat settings in the properties file -->
            <property file="build-web.properties" />
        </target>
        <target name="prepare" depends="init-props">
            <mkdir dir="${war.classes}"/>
            <mkdir dir="${war.lib}"/>       
            <mkdir dir="${manifest}" />
        </target>
        <target name="clean" depends="init-props" description="clean up temporary files">
            <delete file="${project}.war" />   
            <delete dir="${war.root}"/>
            <delete dir="${manifest}" />
        </target>
        <target name="set-tomcat-classpath" depends="prepare">
            <path id="tomcat.class.path">                  
                <fileset dir="${tomcat.home}/bin">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${tomcat.home}/shared/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${tomcat.home}/common/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${tomcat.home}/server/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${ant.home}/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
            </path>              
        </target>
        <target name="create" depends="set-tomcat-classpath" description="create the war file">
            <!-- All files at root level -->       
            <!-- Temporarily put the JSPs at root until you figure this out -->
            <copy todir="${war.root}">
                <fileset dir="${src.jsp}"/>
            </copy>
    <!--
            <copy todir="${war.root}">
                <fileset dir="${src.html}" includes="*.html"/>
            </copy>
    -->
            <copy todir="${war.root}/css">
                <fileset dir="${src.css}"/>
            </copy>
            <copy todir="${war.root}/images">
                <fileset dir="${src.images}"/>
            </copy>
            <copy todir="${war.root}/js">
                <fileset dir="${src.js}"/>
            </copy>
            <!-- All files at the WEB-INF level and below -->       
            <copy todir="${war.web}">
                <fileset dir="${src.etc}" includes="web.xml"/>
            </copy>
            <!-- All files in the CLASSPATH lib -->
            <copy todir="${war.web}/lib">
                <fileset dir="${src.lib}" includes="**/*.jar" excludes="**/*-tests.jar, **/junit.jar"/>
            </copy>
            <!-- Put the dispatcher XML in WEB-INF/config -->
            <copy todir="${war.web}/config">
                <fileset dir="${src.etc}" includes="${project}-config.xml"/>
            </copy>
            <!-- Put XSL stylesheets in WEB-INF/xsl -->
            <copy todir="${war.web}/xsl">
                <fileset dir="${src.xsl}" includes="**/*.xsl"/>
            </copy>
            <!-- Put the project JAR file in WEB-INF/lib -->
            <copy todir="${war.web}/lib">
                <fileset dir="${deploy}" includes="**/${project}.jar"/>
            </copy>
            <!-- Create the manifest -->
            <buildnumber />
            <manifest file="${manifest}/manifest.mf">
                <attribute name="Implementation-Title"      value="${project}" />
                <attribute name="Built-By"                  value="${user.name}"/>
                <attribute name="Build-Date"                value="${TODAY}" />
                <attribute name="Major-Version"             value="${major}" />
                <attribute name="Minor-Version"             value="${minor}" />
                <attribute name="Build-Number"              value="${build.number}" />
            </manifest>
            <!-- Create the WAR file -->
            <jar jarfile="${project}.war"
                 manifest="${manifest}/manifest.mf">
                <fileset dir="${war.root}"/>
                <metainf dir="${src.etc}" includes="context.xml"/>
            </jar>
        </target>
        <target name="create-tomcat-admin-tasks" depends="set-tomcat-classpath">
    <!--
            <pathconvert targetos="windows" refid="tomcat.class.path" property="converted.class.path" />
            <echo message="CLASSPATH: ${converted.class.path}" />
    -->       
            <taskdef name="install"     classname="org.apache.catalina.ant.InstallTask"     classpath="tomcat.class.path"/>
            <taskdef name="remove"      classname="org.apache.catalina.ant.RemoveTask"      classpath="tomcat.class.path"/>       
            <taskdef name="reload"      classname="org.apache.catalina.ant.ReloadTask"      classpath="tomcat.class.path"/>
            <taskdef name="deploy"      classname="org.apache.catalina.ant.DeployTask"      classpath="tomcat.class.path"/>       
            <taskdef name="undeploy"    classname="org.apache.catalina.ant.UndeployTask"    classpath="tomcat.class.path"/>       
            <taskdef name="start"       classname="org.apache.catalina.ant.StartTask"       classpath="tomcat.class.path"/>       
            <taskdef name="stop"        classname="org.apache.catalina.ant.StopTask"        classpath="tomcat.class.path"/>       
            <taskdef name="list"        classname="org.apache.catalina.ant.ListTask"        classpath="tomcat.class.path"/>       
            <taskdef name="resources"   classname="org.apache.catalina.ant.ResourcesTask"   classpath="tomcat.class.path"/>       
            <taskdef name="roles"       classname="org.apache.catalina.ant.RolesTask"       classpath="tomcat.class.path"/>
        </target>
        <target name="install" depends="create-tomcat-admin-tasks" description="install the war file on Tomcat">
            <install    url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}"
                        config="file:/${basedir}/${src.etc}/context.xml"
                        war="file:/${basedir}/${project}.war" />
        </target>
        <target name="remove" depends="create-tomcat-admin-tasks" description="remove the war file on Tomcat">
            <remove     url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="reload" depends="create-tomcat-admin-tasks" description="reload the war file on Tomcat">
            <reload     url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="deploy" depends="create-tomcat-admin-tasks" description="deploy the war file on Tomcat">
            <deploy    url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}"
                        config="file:/${basedir}/${src.etc}/context.xml"
                        war="file:/${basedir}/${project}.war" />
        </target>
        <target name="undeploy" depends="create-tomcat-admin-tasks" description="undeploy the war file on Tomcat">
            <undeploy   url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="start" depends="create-tomcat-admin-tasks" description="start an application on Tomcat">
            <start      url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}"/>
        </target>
        <target name="stop" depends="create-tomcat-admin-tasks" description="stop an application on Tomcat">
            <stop       url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="list" depends="create-tomcat-admin-tasks" description="list all applications running on Tomcat">
            <list       url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"/>
        </target>
        <target name="resources" depends="create-tomcat-admin-tasks" description="list all resources on Tomcat">
            <resources  url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"/>
        </target>
        <target name="data-sources" depends="create-tomcat-admin-tasks" description="list all data sources on Tomcat">
            <resources  url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        type="javax.sql.DataSource"/>
        </target>
        <target name="roles" depends="create-tomcat-admin-tasks" description="list all user roles on Tomcat">
            <roles      url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"/>
        </target>
    </project>
    build.properties
    # Properties file for setting up an Ant build.xml
    # Project specific items that change each time
    project=api-prototype
    major=1
    minor=0
    version=${major}.${minor}
    jar.name=${project}
    versiondate=${TODAY}
    # Directory structure (these should never change)
    bin=bin
    deploy=deploy
    doc=doc
    manifest=META-INF
    xml=xml
    # Everything under src should come out of a repository
    src=src
    src.bin=${src}/bin
    src.config=${src}/config
    src.data=${src}/data
    src.dtd=${src}/dtd
    src.java=${src}/java
    src.lib=${src}/lib
    src.profile=${src}/profile
    src.properties=${src}/properties
    src.schema=${src}/schema
    src.sql=${src}/sql
    src.templates=${src}/templates
    src.testdata=${src}/testdata
    src.xml=${src}/xml
    src.xsl=${src}/xsl
    # These are created and deleted by Ant each time
    javadocs=javadocs
    reports=reports
    output=output
    output.classes=${output}/classes
    output.lib=${output}/lib
    # Required for proper use of XDoclet
    xdoclet.home = C:/Tools/xdoclet-1.2b3
    build-web.properties
    war.root=war-root
    war.pages=${war.root}/pages
    war.web=${war.root}/WEB-INF
    war.classes=${war.web}/classes
    war.css=${war.web}/css
    war.js=${war.web}/js
    war.lib=${war.web}/lib
    war.tld=${war.web}/tld
    # Properties needed by Tomcat tasks
    ant.home =
    tomcat.home         =
    tomcat.manager.url  = http://localhost:8080/manager
    tomcat.username     =
    tomcat.password     = MOD

  • Javax.servlet.* Not Found Error - Please help

    I am having a great deal deal of trouble trying to compile a program using javax.servlet and javax.servlet.hhtp.*. I have setup the JAVA_HOME and the CLASSPATH variables as per the Installation instructions. I appear to have hit a brick wall and I am absolutely desperate to get this working. I have installed the J2EE SDK as well as the Servletapi2.1. Please Help.
    Variables:
    CLASSPATH=c:\jdk1.3\lib\tools.jar;c:\j2sdkee1.3.1\lib\j2ee.jar;c:\jdk1.3\jre\bin;c:\jdk1.3\jre\lib;c:\mm.mysql-2.0.14\org;c:\jdk1.3\lib\servlet.jar;
    JAVA_HOME=c:\jdk1.3;
    J2EE_HOME=c:\j2sdkee1.3.1;
    PATH=%PATH%;c:\jdk1.3\bin;c:\j2sdkee1.3.1\bin;
    Error message from compiler:
    L:\PROGRA~1\allaire\jrun\servers\default\loanstest\web-inf\classes\PasswordServlet.java:27: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    L:\PROGRA~1\allaire\jrun\servers\default\loanstest\web-inf\classes\PasswordServlet.java:30: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    L:\PROGRA~1\allaire\jrun\servers\default\loanstest\web-inf\classes\PasswordServlet.java:39: cannot resolve symbol
    symbol : class HttpServlet
    location: class PasswordServlet
    public class PasswordServlet extends HttpServlet

    I can only think of three suggestions.
    One, use your mouse to "cut-n-paste" the value of CLASSPATH and verify that those files are exactly where you think they are, and are spelled right.
    E.g.
    CD C:\JDK1.3\LIB
    DIR SERVLET.JAR
    Two, if they're spelled right, run "jar tvf" on the files to make sure they aren't corrupted or something.
    E.g.:
    JAR TVF SERVLET.JAR
    Three, since you're working in Windoze, try putting the value inside double quotes. E.g.:
    SET CLASSPATH="c:\jdk1.3\lib\tools.jar;c:\j2sdkee1 ... etc ... "
    If you haven't tried the above, give it a go, see what happens.

  • Problem with Accessing Deployed Servlets Please help, very urgent.

    Inspite of going through lots of Docs. I am not able to access the JSP which is deployed using JDeveloper 3.2 in the browser? What should be the URL and where should I place the JSP and the related files in the Apache Server (Specific directory)?
    Please help, this is very Urgent.
    Could I get some sites where I can get detailed description of how to deploy and access Servlets and JSPS using JDeveloper 3.2 for OAS 9i?
    Thanks in advance,
    Regards,
    Kavita.
    null

    Hi Kativa,
    In answer to your first question: In most apache installs, you want to place all your JSPs under the Apache/htdocs directory. This htdocs directory becomes the root directory of your HTTP request, so, for example, to access the file
    Apache/htdocs/mydir/myJSP.jsp
    you'd point your browser to
    server:port/mydir/myJSP.jsp]http://server:port/mydir/myJSP.jsp
    As to your second question: Do you mean Oracle 9iAS? If so, look at this HOWTO: http://technet.oracle.com:89/ubb/Forum2/HTML/006398.html
    JDeveloper 3.2 does not support deployment to OAS (the predecessor to iAS), but there was no OAS 9i.
    null

Maybe you are looking for

  • Select query - timeout error

    hi experts, I have written a pgm where i need to select records from BSAD table. This table has about 10 key fields. But according to my requirement, i can pass only 2 key fields to the table and have to fetch records from this table.  But it goes to

  • G/L Account Opening Balances using DTW

    Is it possible to import G/L account opening balances using DTW? If so, what object would I use? Thank you, Mike

  • Authorization Check while TECO PM ORDER

    While performing action TECO of PM order, system check the authorization of Mtc. Plant of Equipment entered in the  PM Order in place of Mts. plant authorization of PM Order it self. If during the period of PM order creation to TECO PM order the equi

  • [Muse] Bug ou erreur de manipulation

    Bonjour tout le monde. Voilà, j'expose la situation... je fais un bandeau supérieur dans mon gabarit pour garder, lorsque le visiteur scroll, un bandeau avec mon logo, mon menu, le tout épinglé pour que cela reste bien en partie supérieure du navigat

  • Regarding Obsolete table

    hi guys, we are going for upgrade from 46C to ECC. we plan to change the SADR table to ADRC inside the addon program. Customer Created addon program using Standard include where SADR table is used. Now how to modify this program. we cant edit standar