Embedding tomcat to run as a webserver

Hi,
I have compiled the Embedded.java source code to work in my environment.
But the code includes the Thread.sleep , without that the code will terminate.
So the webserver is running only for the time x,
Thread.sleep(x)
The sample code is:
public static void main(String args[]) {
try {
EmbeddedTomcat tomcat = new EmbeddedTomcat();
     tomcat.setPath("d:/jakarta-tomcat-4.0.1");
tomcat.startTomcat();
Thread.sleep(1000000);
tomcat.stopTomcat();
how to avoid the thread.sleep so that the webserver is running continuously until it is shutdown explicitly
Thanks

Try running the tomcat service (embedded.start()) in a separate thread. I got the Embedded.java example working in this fashion by extending Thread and moving the code in the startTomcat() method to the public void run() method. To start the service, just call this.start(). Hope this helps...

Similar Messages

  • JNDI Setup in Embedded Tomcat 5.0.19

    Hi All,
    I have embedded Tomcat 5.0.19 in my application, which is a simple web based database application in servlets. In Embedded Tomcat we don't have server.xml.
    Reference:
    http://www.vsj.co.uk/articles/display.asp?id=319
    I am trying to create JNDI Context to connect to my database.
    My configuration file is like this:
    <naming>
    <context >
    <resource name="jdbc/myDS" type="javax.sql.DataSource" >
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>net.sourceforge.jtds.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:jtds:sqlserver://SQLServer:1433;databaseName=myDB;</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>sa</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sa</value>
    </parameter>
    </resource>
    </context>
    </naming>
    I have put this config file in the root directory and called thru the following method.
    XmlConfigurator.loadConfiguration(getClass().getResourceAsStream("/myConfig.xml"));
    Ref:
    http://directory.apache.org/subprojects/naming/using.html
    I have written a class which starts the embedded tomcat and calls the above method.
    The following is the output of tomcat:
    Apr 15, 2005 3:19:00 PM org.apache.catalina.startup.Embedded start
    INFO: Starting tomcat server
    Apr 15, 2005 3:19:01 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.19
    Apr 15, 2005 3:19:01 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    Apr 15, 2005 3:19:01 PM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
    e
    Apr 15, 2005 3:19:01 PM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
    l=true
    Apr 15, 2005 3:19:02 PM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='view.ApplicationResources', returnNull=true
    Apr 15, 2005 3:19:02 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on port 9889
    Apr 15, 2005 3:19:02 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on port 9889
    I have written another class which does the context lookup function and creates the Connection Object like this:
    public Connection getConnection()
         Context ctx=new InitialContext();
    Context jdbcCtx = (Context)ctx.lookup("jdbc");
    DataSource datasource=(DataSource)jdbcCtx.lookup("myDS");
    return datasource.getConnection();
    but every time my web application calls this function to create a new connection it throws:
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:815)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:198)
    at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at view.DatabaseConnection.getConnection(DatabaseConnection.java:109)
    at view.Admin_LoginValidation.doPost(Admin_LoginValidation.java:42)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:284)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:204)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:257)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
    eContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:567)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
    ContextValve.java:245)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:199)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
    eContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:567)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:184)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
    eContext.java:151)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:164)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
    eContext.java:149)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:567)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:156)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
    eContext.java:151)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:567)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
    6)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :833)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
    ssConnection(Http11Protocol.java:732)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
    :619)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
    ool.java:688)
    at java.lang.Thread.run(Thread.java:534)
    java.lang.NullPointerException
    when I tried Context lookup in the same class which starts Tomcat, there is no problem: it gets the Name jdbc/myDB. How to make the Context Global.
    Please help me out to solve this problem.
    Thanks in Advance,
    Pretty

    in the reource tag u have somet hing called global attribute which will be ur global jndi name with which u can access the resource
    Context ...>
    <ResourceLink name="The name of the linked global resource in the global JNDI context.
    global="The name of the resource link to be created, relative to the java:comp/env context.
    type="The fully qualified Java class name expected by the web application when it performs a lookup for this resource link.
    r"
    i think tat will work
    regards
    shanu
    </Context>

  • Embedded Tomcat Java Application

    Hi
    I am using an Embedded Tomcat Java Application.
    I am getting the following Exception when i run the program.
    java.lang.NullPointerException
         at org.apache.catalina.startup.DigesterFactory.register(DigesterFactory.java:174)
         at org.apache.catalina.startup.DigesterFactory.registerLocalSchema(DigesterFactory.java:130)
         at org.apache.catalina.startup.DigesterFactory.newDigester(DigesterFactory.java:92)
         at org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextConfig.java:435)
         at org.apache.catalina.startup.ContextConfig.createWebDigester(ContextConfig.java:422)
         at org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:499)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:623)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4290)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
         at org.apache.catalina.startup.Embedded.start(Embedded.java:846)
         at EmbeddedTomcat.startTomcat(EmbeddedTomcat.java:77)
         at EmbeddedTomcat.main(EmbeddedTomcat.java:135)
    could anyone tell me how to solve this problem
    Thanx & Regards
    Faisal

    Hi
    R u able to resolve the problems.... If yes please provide me the info... I'm also facing the same problem...
    REgards
    siddhu

  • Problem with embedded tomcat...I think

    Hi,
    To be honest, I am not sure where the best place to post this question is, so I will try here, and then go from there. :)
    I have a website setup on the embedded tomcat webserver that comes with JSE8. I have then written a small app (very small) that uses the HttpURLConnection object to try and connect to a page on this website. Now, if I try and connect to the page via a normal browser, I have no problem, but if I try via the code, I get an 503, Server Unavailable error. I know that the website is working (as I can connect via a browser, as I said), so I am at a loss as to what is wrong. My code is:
                SocketAddress address = new InetSocketAddress("proxy.tfh-wildau.de", 8080);
                Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
                URL url = new URL("http://127.0.0.1:8084/test.html");
                HttpURLConnection hConn = (HttpURLConnection) url.openConnection(proxy);
                hConn.setDoInput(true);
                hConn.setDoOutput(true);
                hConn.connect();
                System.out.println(hConn.getResponseMessage());
                System.out.println(hConn.getResponseCode());If I change the web addres to, say, www.google.com, then there is no problem. Is the problem because I am trying to connect to a server on my own machine? Or is the problem because the server is part of the JSE IDE and too many threads are being created within the JVM...I dunno...I hope someone can shed some light on this, or at least point me towards the appropriate forum.
    Thanks in advance

    never mind...I realised that my internet setup was such that it was still trying to go through the proxy server for local address. Once I told it to bypass the proxy for local address, and removed the Proxy bit of the code, it works fine.

  • Configure the embedded Tomcat Server

    Hello,
    is there a documentation which tells me how to configure the embedded Tomcat Server in the Oracle Content Server? I can't get it work.
    When I try to start an web application from "JSP Server Web App Admin" I get the following error message:
    Content Server Request Failed
    csJspServerErrorAddWebAppService Failed to add context /idc/groups/jsp/documents/adacct/hello. Unable to execute service method 'addContext'.
    [ Details ]
    intradoc.common.ServiceException: !csJspServerErrorAddContext,/idc/groups/jsp/documents/adacct/hello!csUnableToExecMethod,addContext at intradoc.server.jsp.JspServiceHandler.addContext(JspServiceHandler.java:152) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:461) at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:142) at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:75) at intradoc.server.Service.doCodeEx(Service.java:488) at intradoc.server.Service.doCode(Service.java:470) at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1350) at intradoc.server.Service.doAction(Service.java:450) at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1191) at intradoc.server.Service.doActions(Service.java:445) at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1111) at intradoc.server.Service.executeActions(Service.java:431) at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:632) at intradoc.server.Service.doRequest(Service.java:1709) at intradoc.server.ServiceManager.processCommand(ServiceManager.java:357) at intradoc.server.IdcServerThread.run(IdcServerThread.java:195) Caused by: intradoc.common.ServiceException: !csJspServerErrorAddContext,/idc/groups/jsp/documents/adacct/hello!csUnableToExecMethod,addContext at intradoc.server.jsp.JspProvider.addContext(JspProvider.java:391) at intradoc.server.jsp.JspServiceHandler.addContext(JspServiceHandler.java:116) ... 19 more
    And it is also not possible to use jsp layout pages in Site created in Site Studio. When I try to load pages using a jsp layout page the browser displays a blank page.

    Hi,
    Even i am also facing the same issue after following all those steps.
    Please find the error which i m getting.
    csJspServerErrorAddWebAppService The target file cannot be accessed. Unable to rename the file 'F:\stellent\indxpdod2\weblayout\groups\chanpart\@cccd\documents\manufacturing\enhstellsrchint' to 'F:\stellent\indxpdod2\weblayout\groups\chanpart\@cccd\documents\manufacturing\enhstellsrchint~jsp'.

  • Hello world servlet on UCM 11g embedded tomcat

    Hi,
    I'm using UCM 11.1.1.5. I'm trying to run a simple jsp and servlet (hello world) on UCM embedded Tomcat (deployed with a war).
    I successfully executes jsp, however I'm not able to runs servlets...I receive a 404 Http error (generated by WebLogic).
    Deploying the same war on a external standalone tomcat server I successfully run the servlet.
    Have you any idea?
    Any input will be greatly appreciated.
    Thanks for your helps,
    S.

    In order to be more complete, it follows the web.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <display-name>Hello, World Application</display-name>
    <description>
    This is a simple web application with a source code organization
    based on the recommendations of the Application Developer's Guide.
    </description>
    <servlet>
    <servlet-name>HelloServlet</servlet-name>
    <servlet-class>mypackage.Hello</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloServlet</servlet-name>
    <url-pattern>/hello</url-pattern>
    </servlet-mapping>
    </web-app>
    Thank you very much.
    Best regards,
    S.

  • How to deploy war file in embedded Tomcat in UCM

    Hi ,
    Can anyone please share the steps to configure embedded Tomcat in UCM, And steps to deploy individual JSP and War file.
    thanks,
    Edited by: user4884609 on Feb 13, 2012 4:23 PM

    one more question :
    The Url to access war file is something like this :
    http://localhost/idc/groups/jsp/documents/webapps/testwar/test.jsp
    Can we have friendly URL for war file ? something like http://localhost/testwar/test.jsp or may be http://localhost/idc/testwar/test.jsp ?

  • Dynamially modifying faces-config.xml (when tomcat is running)

    i want to add or change the navigation rules or use dynamic navigation in JSF, as it is don in the struts(changing config file when tomcat is running) . i have don it in struts but cannot find way in JSF. do JSF framework provide any facilty for doing this ......... if yess then how?

    i want to add or change the navigation rules or use dynamic navigation in JSF, as it is don in the struts(changing config file when tomcat is running) . i have don it in struts but cannot find way in JSF. do JSF framework provide any facilty for doing this ......... if yess then how?

  • Embedded Tomcat 5.5 return 404 for all request

    I am starting embedded tomcat within a Java application, but it returns 404 when i request a existing static content html file. I have no idea why is that and there is no service using the port. Please advise.
    File structures are as follow:
    base directory: D:\AXIS
    directory with index.html - D:\AXIS\webapps\root\
    other existing dir
    D:\AXIS\webapps\root\WEB-INF\lib\
    D:\AXIS\webapps\root\WEB-INF\
    debug level is set to 5 and following is the response of log screen when i request http://localhost:7070/index.html :
    Command> HttpProcessor[7070][3] An incoming request is being assigned
    HttpProcessor[7070][3] The incoming request has been awaited
    HttpProcessor[7070][3] parseConnection: address=/127.0.0.1, port=7070
    HttpProcessor[7070][3] Normalized: '/index.html' to '/index.html'
    HttpProcessor[7070][3] Request is 'GET' for '/index.html' with protocol 'HTTP/1.1'
    HttpProcessor[7070][3] Header accept = */*
    HttpProcessor[7070][3] Header accept-language = en-us
    HttpProcessor[7070][3] Adding locale 'en_US'
    HttpProcessor[7070][3] Header accept-encoding = gzip, deflate
    HttpProcessor[7070][3] Header user-agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
    HttpProcessor[7070][3] Header host = localhost:7070
    HttpProcessor[7070][3] Header connection = Keep-Alive
    StandardEngine[null]: Mapping server name 'localhost'
    StandardEngine[null]: Trying a direct match
    StandardHost[localhost]: Mapping request URI '/index.html'
    StandardHost[localhost]: Trying the longest context path prefix
    StandardHost[localhost]: Mapped to context ''
    StandardContext[]: Mapping contextPath='' with requestURI='/index.html' and relativeURI='/index.html'
    StandardContext[]: Decoded relativeURI='/index.html'
    StandardContext[]: Trying exact match
    StandardContext[]: Trying prefix match
    StandardContext[]: Trying extension match
    StandardContext[]: Trying default match
    HttpProcessor[7070][3] parseConnection: address=/127.0.0.1, port=7070
    Following is server start code.
    public class EmbeddedTomcat {
    private String path = null;
    private Embedded embedded = null;
    private Host host = null;
    * Default Constructor
    public EmbeddedTomcat() {
    * Basic Accessor setting the value of the context path
    * @param path - the path
    public void setPath(String path) {
    this.path = path;
    * Basic Accessor returning the value of the context path
    * @return - the context path
    public String getPath() {
    return path;
    * This method Starts the Tomcat server.
    public void startTomcat() throws Exception {
    Engine engine = null;
    // Set the home directory
    System.setProperty("catalina.home", getPath());
    System.setProperty("catalina.base", getPath());
    // Create an embedded server
    embedded = new Embedded();
    // print all log statments to standard error
    embedded.setDebug(99);
    embedded.setLogger(new SystemOutLogger());
    // Create an engine
    engine = embedded.createEngine();
         engine.setDefaultHost("localhost");
    // Create a default virtual host
    host = embedded.createHost("localhost", getPath() + "/webapps");
         engine.addChild(host);
    // Create the ROOT context
    Context context = embedded.createContext("", getPath() + "/webapps/root");
         System.out.println("Doc Base - " + context.getDocBase());
         host.addChild(context);
    // Install the assembled container hierarchy
    embedded.addEngine(engine);
    // Assemble and install a default HTTP connector
    Connector connector = embedded.createConnector(null, 7070, false);
    embedded.addConnector(connector);
    // Start the embedded server
    embedded.start();
    public static void main(String args[]) {
    try {
    EmbeddedTomcat tomcat = new EmbeddedTomcat();
    tomcat.setPath("D:/AXIS");
         tomcat.startTomcat();
    catch( Exception e ) {
    e.printStackTrace();
    Thanks is advance,
    Jerry

    in the reource tag u have somet hing called global attribute which will be ur global jndi name with which u can access the resource
    Context ...>
    <ResourceLink name="The name of the linked global resource in the global JNDI context.
    global="The name of the resource link to be created, relative to the java:comp/env context.
    type="The fully qualified Java class name expected by the web application when it performs a lookup for this resource link.
    r"
    i think tat will work
    regards
    shanu
    </Context>

  • How to make Visitor Tracking in embedded Tomcat.

    Hi, Please help me.
    I want to know how to make visitor tracking in embedded Tomcat. If you know, how to catch all the incoming clients to Tomcat, please tell me. I don't know how to catch them.

    enable logging on the server

  • How to make tomcat still running after reboot

    hi all,
    i want ask about how to make tomcat still running after our computer reboot.
    so our server still can serve the the request without we start manualy the tomcat.
    please replies
    thank's before

    *nix or win32 or other?                                                                                                                                                                                                                                           

  • Identifying the port number where Tomcat is running.

    I want to mail the URL of the my application dynamically with the system generated mails. With the help of java.net package I am able to get the IP address of the system, but I have hard coded the port no in the URL. I want to make the port no. also dynamic (E.g. IP address is not hard coded).
    The servlet is deployed to the Tomcat server. What code I write to know the port on which the tomcat is running ?
    thanks in advance,
    Mukesh.

    You could use ServletRequest.getServerPort() to find out the port number on which the request is being sent by the client but I don't know if this will help you.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    EDIT: ServletRequest.getLocaPort() gives the port at which the request is received; I'm not quite sure what the difference is ( I can guess but I'm not certain ) and I don't know which, if either, will be of use to you.
    Edited by: nogoodatcoding on Oct 9, 2007 7:26 PM

  • Apache FileUpload - what version of Tomcat can run it?

    Hi. I'm trying to use the Apache Commons FileUpload component (http://commons.apache.org/fileupload). It works fine on my local PC (Java 1.5.0_15) but fails on the Unix server running Tomcat 4.1.29 and Java 1.4.2_12-b03. I've got the latest version of the upload component in the WEB-INF/lib folder. It throws this error (included only the top section; there are more, similar errors having to do with each fileupload component call). Do I need an older version of the upload component to work with this version of Tomcat and Java? If so, which version do I need to download? The oldest I could find dated to 2003. Thanks.
    The server encountered an internal error () that prevented it from fulfilling this request.
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 15 in the jsp file: /fpauto/viewPremiums.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:12: package org.apache.commons.fileupload does not exist
    import org.apache.commons.fileupload.FileItem;
    ^/usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:14: package org.apache.commons.fileupload.servlet does not exist^
    ^import org.apache.commons.fileupload.servlet.ServletFileUpload;^
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:15: package org.apache.commons.fileupload.disk does not exist
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    ^/usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:16: package org.apache.commons.fileupload does not exist^
    ^import org.apache.commons.fileupload.FileUpload;^
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:74: cannot resolve symbol
    symbol : class DiskFileItemFactory
    location: class org.apache.jsp.viewPremiums_jsp
    DiskFileItemFactory factory = new DiskFileItemFactory();
    An error occurred at line: 15 in the jsp file: /fpauto/viewPremiums.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-4.1.29/work/mywork/fpauto/viewPremiums_jsp.java:74: cannot resolve symbol
    symbol : class DiskFileItemFactory
    location: class org.apache.jsp.viewPremiums_jsp
    DiskFileItemFactory factory = new DiskFileItemFactory();

    Apache FileUpload - what version of Tomcat can run it?First of all, why don't you ask Apache specific questions at the Apache mailinglist?
    Regarding to your actual problem: those are just ordinary compilation errors which are complaining that the mentioned packages and classes aren't available in the classpath. The solution is obvious: add the mentioned packages and classes (or in this case, the JAR file(s) with it) to the classpath during compile time and you're fine.

  • I can't load an icon to my application running in my webserver

    why I cannot load an icon to my java application (jar application) that is running in my webserver. but the application is running just fine in my desktop.
    Need help on this. tnx in advance
    Nashstanley

    try this:
    1. include a copy of your icon to your .jar file
    2. must also include the classpath of your icon to your "manifest" file.

  • Problems getting tomcat to run on localhost or anywhere...

    I have a huge problem, I have a servlet that i'm developing for the company of my internship, and this is the first servlet i've ever had to develop. It has taken me the entire semester to get as far as i have, and i have a lot of time invested in getting this servlet-centric application to work.
    My problem is that i cannot even get tomcat web container to work right on just the local computer- much less the server it will need to run on to support this web app. I have looked through tons of documentation on the web and on the apache website for help on configuring tomcat, and have worked through tutorials on how to get it working, but have not yet had a success story. Time is really running to the line now!
    I have read that in order for tomcat to run on IIS you need to configure 'isapi_redirect.dll' and get IIS to filter requests to tomcat. I have even worked through tutorials in doing this, but cannot get it working still. I have tomcat installed, and even shutting off IIS will not allow me to run tomcat and get even an example file included with tomcat to load up when pointing to http://localhost:8080/ or any port listed in the server.xml config file. I can though, get IIS's default page to come up when it is running by pointing to http://localhost/.
    I have exhausted all ideas i have to try and make it work, and am not consulting the forum for help. I know there must be a simpler way to get tomcat working at least on the localhost. ANY advice that leads to me being able to get tomcat running right so i can even just test my servlet how it would run on my local computer would be very very great help. Also, if help can be given on how to get it installed with least amount of hassles on a web-hosting server it would be very appreciative.
    I am in desperate need of help on this,
    please please help me!
    -mike

    Found the problem- setup turned out a lot easier when i downloaded the right Tomcat file- i had the .zip- which doesn't have an installer on it- so i just talked to a friend, he recommended the one with the installer- less to go wrong in configuration- and it works perfect for the local machine at least- the server might be an issue with support mostly though- don't know yet til i test it there- thanx for trying to help- but got the problem fixed before you guys got the chance to really help much.

Maybe you are looking for

  • Weblogic 10.3.2.0 installation does not pick the right JDK

    The installation does not pick up the right jdk version that is jdk 11.6.0_11 . Although the machine is running the same. Instead it picks up jdk 1.6.0_14. have tested the machine many times. I am Installing Oracle SOA Suite 11g.

  • Can more than one iPhone share a MS Outlook Calendar?

    I successfully installed the iCloud control panel on my PC and was able to set up full access of my Outlook calendar on my new iPhone 4s.  I wondered if it is possible if my wife (using an iPhone 4) can share the same Microsoft Outlook Calendar on he

  • Trying to install Premiere Elements 10 on Windows 7 but keep getting error message 'A reduced set of content has been installed' - help!

    We bought Premiere Elements 10/Photoshop Element 10 a while ago and it worked brilliantly on our Window XP machine, but since we moved to Windows 7 last year we can't get Premiere Elements 10 to work properly and always get the error message 'A reduc

  • To add a string object to a list

    hi all, i am trying a string object usind add method like String s="xyz"; list.add(s) when i try to compile the code it says that the code contains an unchecked exception..please tell me how to handle this exception.....like if its not the correct wa

  • Call Python from java

    Hi, I want to call a python function from java (cannot use Jython) - I am currently using Jepp, however there is very little in terms of documentation (API). I am trying to use the jep.invoke() method to call a function in python script and add param