Netbeans and Tomcat

Hello all.
I have some confusion using Netbeans (v6.1) and Tomcat (v6).
I have developed a Website that uses a MySql DB. The Website execute on the port 8080 with a DB named "Dev" and in a context call "/Dev" so I can access my application with "http://localhost:8080/Dev/". It works perfectly and everything is beautiful. I think it runs under the Tomcat_base that Netbeans includes (under /home/user/.netbeans/...).
Then I want to put this Website in a kind of Production environment. So I copy the built .war to the "webapps" of my Tomcat (under /usr/local/tomcat...) and start the Tomcat server. I configured this Tomcat to work on the port 80 and in a context called "/Prod" so I should be able to run the application with "http://localhost/Prod/".
The question is: I have different Databases for both environments (I mean different DB running on the same Mysql), so I don't know how to do the Dev-Prod change or configure it in an elegant way. I think I can just develop the Website in Development and before copying the .war file to Production, change both the path and the DB name in the "context.xml" file, and then build the WAR. I guess it must be a better way to do it, but I don't know it.
Can someone give me some advice please?
I appreciate your help, thank you very much.
Sarah.

I believe this is the way to do it:
If your context is called MyProject, I imagine under tomcat/conf/catalina/localhost there is a file called MyProject.xml. You put configuration information such as database connection info in this file. This file should not be within the war file so when you alter MyProject and deploy it, it doesn't alter this file. In Eclipse IDE, you do not give it permission to alter this file (the option is a checkbox in one of the menu items), note: let it auto-generate it the first time, then yurn off that feature. Your production enviornment will have a different MyProject.xml file than your development enviornemnt. I suggest changing the file to read-only in both production and development so it doesn't accidently get altered.

Similar Messages

  • Communication problem between NetBeans and Tomcat

    hi!
    i got a quite mysterious problem. here is what happens:
    - i start NetBeans 5.5.1 (the first time)
    - i want to debug my JSF-Project, the Debugger starts
    - After a few seconds the debugger waits for tomcat (it sais: "Waiting for Tomcat...") and tomcat starts
    - Again after a few seconds the tomcat-debugger-output sais "Tomcat startet in 3333 ms".
    okay.
    when i enter http://localhost:8084/ in my browser i get the tomcat homepage, so the server has definitely started! But nothing happens in NetBeans and nothing happens with my project....
    In the lower-right corner i see this blue working-bar that sais "deploying project" but nothing happens. The Project-Debugger-Output still sais "Waiting for Tomcat..." but nothing happens...
    And after something around 3 minutes (i guess it's a timeout) i get the error "Starting of Tomcat failed." But is HAS started, i can login to the Administration-Area in my browser!
    so i guess there is a communication problem between netbeans an tomcat. Netbeans waits for a message from tomcat but tomcat doesn't send it..or netbeans doesn't understand it.
    But the story goes on:
    When i press the debug-button a second time it takes only a few seconds till i get the message: "Tomcat server port 8084 already in use". OF COURSE! Because Tomcat has already startet and can't be stoped by NetBeans.
    i'm trying to solve this problem for 4 days now, so i would be very happy if anyone has an idea where to start/continue the search...
    thanks,
    flo.
    some system-info:
    - windows vista business 32-bit
    - no firewall is running
    - AntiVir Personal Edition IS running
    - Yahoo Widgets Engine IS running
    - no other software is running
    and finally the tomcat-log:
    Using CATALINA_BASE: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base
    Using CATALINA_HOME: C:\Program Files\NetBeans\enterprise3\apache-tomcat-5.5.17
    Using CATALINA_TMPDIR: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\temp
    Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_12
    Listening for transport dt_shmem at address: tomcat_shared_memory_id
    21.09.2007 18:27:50 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\cvsnt;
    21.09.2007 18:27:50 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:50 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1862 ms
    21.09.2007 18:27:50 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    21.09.2007 18:27:50 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    21.09.2007 18:27:50 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    21.09.2007 18:27:53 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:54 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    21.09.2007 18:27:54 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    21.09.2007 18:27:54 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    21.09.2007 18:27:54 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3626 ms

    As i wrote before, the same problem occured for me. I have found a solution which is : Go to tools menu and then select options . In the proxy info, select No Proxy.
    I hope this help you

  • NetBeans and tomcat 5.0 work in a different manner

    If I compile the servlet Contatore.java by means of NetBeans, it's ok only if I execute it by means of Netbeans with the following url in my browser
    http://localhost:8084/servlet/Contatore
    on the contrary if I execute it by means of Tomcat 5.0 only changing the port from 8084 ti 8080,
    http://localhost:8080/servlet/Contatore
    then I have the following error
    HTTP Status 404 - /servlet/Contatore
    type Status report
    message /servlet/Contatore
    description The requested resource (/servlet/Contatore) is not
    available.
    Apache Tomcat/5.0.24
    Can someone explain me why these 2 differente behaviours
    Perhaps is it impossible to use a folder named "servlet" ?
    Thanks
    Eugenia Mariani

    I thought NetBeans used Tomcat as its servlet/JSP engine, no?
    The /servlet context is special in Tomcat. You invoke servlets that aren't mapped in the web.xml using URL http://host/ContextName/servlet/ServletName. When you give a URL like http://localhost:8080/servlet/Contatore, you're asking Tomcat to invoke a servlet named Contatore in the default ROOT context. Is there such a thing?
    Tomcat prefers that servlets and Java Beans be in packages these days. If it's not, there might be problems.
    I wouldn't name a context of mine "servlet". I don't deploy apps of mine in the default ROOT context, either. I create a context for each Web app.

  • Error starting web service with netbeans and tomcat

    Hi i'm trying to test a web service connection with mysql i follow all the steps showed here:
    http://jaxenter.com/from-database-to-restful-web-service-to-html5-in-five-minutes-48908.html
    the log :
    Using CATALINA_BASE:   "D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base"
    Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.3"
    Using CATALINA_TMPDIR: "D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\temp"
    Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_11"
    Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.3\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.3\bin\tomcat-juli.jar"
    17-Sep-2014 10:48:22.880 INFO [main] org.apache.catalina.core.AprLifecycleListener.init La biblioteca nativa de Apache Tomcat basada en ARP que permite un rendimiento óptimo en entornos de desarrollo no ha sido hallada en java.library.path: C:\Program Files\Java\jdk1.8.0_11\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\Users\investigacion01\Desktop\adt-bundle-windows-x86_64-20140702\sdk\tools;D:\Users\investigacion01\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools;C:\Windows\System32;C:\Program Files (x86)\nodejs;C:\Program Files (x86)\Git\bin;D:\Users\investigacion01\AppData\Roaming\npm;D:\Kony\ImageMagick;D:\Kony\Ant\bin;C:\Program Files\apache-ant-1.9.4\bin;C:\Program Files\Java\jdk1.8.0_11\bin;D:\Users\investigacion01\Desktop\adt-bundle-windows-x86_64-20140702\sdk\platform-tools;D:\Users\investigacion01\Desktop\adt-bundle-windows-x86_64-20140702\sdk\tools;.
    17-Sep-2014 10:48:23.062 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8084"]
    17-Sep-2014 10:48:23.086 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
    17-Sep-2014 10:48:23.088 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
    17-Sep-2014 10:48:23.090 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
    17-Sep-2014 10:48:23.090 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 523 ms
    17-Sep-2014 10:48:23.113 INFO [main] org.apache.catalina.core.StandardService.startInternal Arrancando servicio Catalina
    17-Sep-2014 10:48:23.113 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.3
    17-Sep-2014 10:48:23.120 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Desplieque del descriptor de configuración D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf\Catalina\localhost\HelloWorldWebService.xml
    17-Sep-2014 10:48:23.153 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
    17-Sep-2014 10:48:23.180 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/HelloWorldWebService]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1744)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@2b6fe9b5]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
      at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4841)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4966)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 10 more
    Caused by: java.lang.IllegalArgumentException: The main resource set specified [D:\Users\investigacion01\Documents\HelloWorldWebService\build\web] is not valid
      at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:627)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      ... 13 more
    17-Sep-2014 10:48:23.181 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Error durante el despliegue del descriptor de configuración D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf\Catalina\localhost\HelloWorldWebService.xml
    java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/HelloWorldWebService]]
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1744)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
    17-Sep-2014 10:48:23.182 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Desplieque del descriptor de configuración D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf\Catalina\localhost\manager.xml
    17-Sep-2014 10:48:23.462 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars Al menos un JAR, que se ha explorado buscando TLDs, aún no contenía TLDs. Activar historial de depuración para este historiador para una completa lista de los JARs que fueron explorados y de los que nos se halló TLDs. Saltarse JARs no necesarios durante la exploración puede dar lugar a una mejora de tiempo significativa en el arranque y compilación de JSP .
    17-Sep-2014 10:48:23.871 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGenerator.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [347] milliseconds.
    17-Sep-2014 10:48:23.899 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Desplieque del descriptor de configuración D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf\Catalina\localhost\prueba.xml
    17-Sep-2014 10:48:23.902 WARNING [localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
    17-Sep-2014 10:48:25.055 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars Al menos un JAR, que se ha explorado buscando TLDs, aún no contenía TLDs. Activar historial de depuración para este historiador para una completa lista de los JARs que fueron explorados y de los que nos se halló TLDs. Saltarse JARs no necesarios durante la exploración puede dar lugar a una mejora de tiempo significativa en el arranque y compilación de JSP .
    17-Sep-2014 10:48:25.061 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Desplieque del descriptor de configuración D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf\Catalina\localhost\ROOT.xml
    17-Sep-2014 10:48:25.158 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars Al menos un JAR, que se ha explorado buscando TLDs, aún no contenía TLDs. Activar historial de depuración para este historiador para una completa lista de los JARs que fueron explorados y de los que nos se halló TLDs. Saltarse JARs no necesarios durante la exploración puede dar lugar a una mejora de tiempo significativa en el arranque y compilación de JSP .
    17-Sep-2014 10:48:25.166 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8084"]
    17-Sep-2014 10:48:25.185 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
    17-Sep-2014 10:48:25.186 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2096 ms
    17-Sep-2014 10:48:27.370 INFO [http-nio-8084-exec-3] org.apache.catalina.startup.HostConfig.undeploy Repliegue (undeploy) de la aplicación web que tiene como trayectoria de contexto /prueba
    17-Sep-2014 10:48:27.411 INFO [http-nio-8084-exec-1] org.apache.catalina.startup.HostConfig.deployDescriptor Desplieque del descriptor de configuración D:\Users\investigacion01\AppData\Roaming\NetBeans\8.0\apache-tomcat-8.0.3.0_base\conf\Catalina\localhost\prueba.xml
    17-Sep-2014 10:48:27.414 WARNING [http-nio-8084-exec-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
    17-Sep-2014 10:48:28.345 INFO [http-nio-8084-exec-1] org.apache.jasper.servlet.TldScanner.scanJars Al menos un JAR, que se ha explorado buscando TLDs, aún no contenía TLDs. Activar historial de depuración para este historiador para una completa lista de los JARs que fueron explorados y de los que nos se halló TLDs. Saltarse JARs no necesarios durante la exploración puede dar lugar a una mejora de tiempo significativa en el arranque y compilación de JSP .
    17-Sep-2014 10:48:28.374 INFO [http-nio-8084-exec-1] org.apache.catalina.util.LifecycleBase.start The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/prueba]] after start() had already been called. The second call will be ignored.

    This message comes up for me when i run a project that is different than what's indicated in the error message. In fact, the project has been deleted, yet, it still is referenced during the "run" step.

  • NetBeans 5.0 and Tomcat 4.1

    Hello,
    I'm using NetBeans 5.0 and I have been using the Bundled Tomcat version 5.5.9 for my servlet container and everything's been great. Now that I'm ready to push my application up to a web host, I found that my host (lunarpages) runs with Tomcat 4.1 which uses version 2.3 of the servlet container. Tomcat 5.5 uses servlet container 2.4.
    So I downloaded Tomcat 4.1 (which has 2.3) and I don't know how to properly tell Netbeans to use it. When I open Server Manager and select 'Add Server', I can't just tell NetBeans to point to my Tomcat 4.1 directory. It wants me to select from a dropdown list of servers and Tomcat 4.1 isn't in the list.
    I tried to fake NetBeans out by selecting the 'Tomcat 5' server and pointing to my Tomcat 4.1 directory but I'm getting the following message when I try to run:
    FAIL - Unknown command /deploy
    C:\workspace\myApp\nbproject\build-impl.xml:425: Deployment error:
    Can anyone point me in the right direction on how to get Tomcat 4.1 running with NetBeans 5.0?
    Thanks,
    Eric

    I found that my host (lunarpages) runs with Tomcat 4.1 which uses version 2.3 of the servlet containerPlease read the post before answering, the reasoning is crystal clear.
    I don't have a concrete answer to this problem, but I do have a suggestion.
    1) You can add your own tomcat server to netbeans. Under the runtime tab you will find servers, if you right click this you can add a server. Use this to manually configure your own server
    2) as for the servlet spec problem, when creating a web project setting the java EE version to 1.3 might solve the problem... I can't tell this for sure because I've never done it.

  • NetBeans and JSP pages

    I'm using the netBeans IDE to develope my project and the project is web application. But I've a problems with this IDE.
    Q1. The default page is index.html and the default home for the project is say $HOME, when I write http://localhost:8084/$HOME/index.html the browser displace error message. I've to run this file from the netBeans. Do I need to run netBeans and run the file from the IDE to access the index.html file?
    Q2. The second problem is; once I run the index file from the netBeans and then use this address http://localhost:8084/$HOME i.e if I remove the index.html file form the URL the Browser displays all the files that I've in my project but I don't won't this to happend. Is there any means to avoid this problem?
    Thank you indavance.

    I'm using the netBeans IDE to develope my project and
    the project is web application. But I've a problems
    with this IDE.If you are new to application development, then I recommend not using any IDE - it is better to configure everything manually http://tomcat.apache.org/tomcat-6.0-doc/appdev/index.html to understand what's going on under the hood.
    Once you understand what's going on, then it will be much easier to configure your IDE.
    Q1. The default page is index.html and the default
    home for the project is say $HOME, when I write
    http://localhost:8084/$HOME/index.html the browser
    displace error message. I've to run this file from
    the netBeans. Do I need to run netBeans and run the
    file from the IDE to access the index.html file?Check this with NetBeans User Mailing List
    Q2. The second problem is; once I run the index file
    from the netBeans and then use this address
    http://localhost:8084/$HOME i.e if I remove the
    index.html file form the URL the Browser displays all
    the files that I've in my project but I don't won't
    this to happend. Is there any means to avoid this
    problem?
    Thank you indavance.

  • Glassfish with NetBeans and Eclipse

    Hi,
    I have both NetBeans Java EE and Eclipse IDE for Java EE Developers installed on my laptop. With NetBeans Java EE I have the installed the Glassfish and Tomcat server . Can I use/'integrate' this same Glassfish and Tomcat server with my Eclipse installation or is it advisable to install a "standalone" Glassfish &Tomcat server specific for my Eclipse environment?
    Thanks.
    Guy

    Hi!
    Yes you can integrate/use Glassfish and Tomcat with your Eclipse installation.
    For Glassfish support in Eclipse (assuming you are using Eclipse Luna) you have to install first: http://marketplace.eclipse.org/content/glassfish-tools-luna
    The integration is really simple: https://blogs.oracle.com/oepe/entry/getting_started_with_glassfish_4
    Hope hits help,
    Kind regards.

  • From netbeans to tomcat.

    Hi all.
    I downloaded netbeans and
    I wrote a website using JSP and Servlets.
    Now, I don't need the netbeans so ...
    I downloaded only tomcat.
    I entered the project's folder -> build -> web -> *.*
    and copied all files and folders in this directory to webapps\Web1\
    (Web1 is my project name).
    Anyway, I can run and see the JSP files but I can't run the servlets.
    I tried to compile all java files but..
    When I'm compiling the files it says :
    StepOneServlet.java:3: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    StepOneServlet.java:16: cannot find symbol
    symbol: class HttpServlet
    public class StepOneServlet extends HttpServlet {
    ^
    StepOneServlet.java:18: cannot find symbol
    symbol : class HttpServletRequest
    location: class StepOneServlet
    And theres alot more...
    what should I do ?

    well ...
    netbeans makes it so easy !
    Everything works great under netbeans !
    my jsps, my servlets and jdbc.
    Until now, I didn't need to set a CLASSPATH variable.
    The problem is : netbeans takes memory !
    To save memory I want to run only the tomcat server.
    I know there is a tomcat server under netbeans
    and I know where is my project's web.xml.
    Anyway, I setup the CLASSPATH -> Tomcat's common/lib directory.
    The errors gone but new errors appeared.
    Here are few samples:
    FinalServlet.java:4: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    FinalServlet.java:15: cannot find symbol
    symbol: class HttpServlet
    public class FinalServlet extends HttpServlet {
    There is one type of error I can't understand.
    under the folder "Source" I have my servlets..
    Inside the folder "Source", there is another folder "beans"
    with two java files in it (these file are my project's beans).
    I tried without compiling the beans, I tried once after I compiled the beans and I keep getting these errors.
    When I run from the folder "Source" the command javac *.java
    It says:
    FinalServlet.java:30: package beans does not exist
    beans.Message m = (beans.Message)
    request.getSession().getAttribute ("messageBean");
    ^
    I tried put the *.class in the folder "source"
    but I keep getting this errors and I don't know why !
    Thank you all in advance.

  • Problem launching a jsp page with eclipse and tomcat

    Hi,
    I have just started using eclipse and tomcat for creating dynamic web pages. I tried to launch a jsp page after starting the tomcat server with the URL: http://locahost:8080/HelloWorld/, an error page was displayed as below:
    HTTP Status 404 -/
    type Status report
    message /_
    description The requested resource (-) is not available
    Apache Tomcat/5.5.17
    I didn't get any error at the console and when i just typed http://localhost, a pop up menu saying that the connection was refused when attempting to contact localhost.
    I'm not sure what is the problem here. Could it be the permssion to the localhost is not granted by the system as the eclipse IDE is running using linux?
    Hope someone can help.
    Thanks.

    http://www-128.ibm.com/developerworks/library/os-ectom/

  • Right problem with apache and tomcat

    Bonjour;
    I use a user login "apache" to stop/start Apache and tomcat. Because never launching apache et tomcat as root.
    But I have the following problem with apache (file error.log) :
    [Tue May  6 17:26:22 2003] [error] Connection "warpConnection" cannot connect
    [Tue May  6 17:26:22 2003] [error] Cannot open connection "warpConnection"
    [Tue May  6 17:27:01 2003] [error] Re-Trying to deploy connections
    As root the error msg does'nt exists (lost)
    Best regards;
    A+;

    Run it from the shell to see whats wrong:
    # httpd

  • Authentication problem with JWS and TOMCAT

    Hi everyone !
    I have a problem with Java Web Start (1.0.1) and Tomcat (4.0.4).
    I'm trying to call my application via Web server Tomcat with restricting access.
    My configuration is the following :
    The deployment descriptor web.xml is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <mime-mapping>
    <extension>jar</extension>
    <mime-type>application/java-archive</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>java</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>JNLP</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>
    <!-- Define a Security Constraint on this Application -->
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <!-- NOTE: This role is not present in the default users file -->
    <role-name>standard</role-name>
    </auth-constraint>
    </security-constraint>
    <!-- Define the Login Configuration for this Application -->
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>MY APPL</realm-name>
    </login-config>
    </web-app>
    And jnlp File is:
    <jnlp
    spec="1.0+"
    codebase="http://host:8080/Official/"
    href="Application.jnlp">
    <information>
    <title>Application release 0.10</title>
    <vendor> XXXX </vendor>
    <homepage href="/"/>
    <description>Application</description>
    <description kind="short">My Application</description>
    <icon href="Icon.gif"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.3"/>
    <jar href="Jar1.jar"/>
    <jar href="Jar2.jar"/>
    <jar href="Jar3.jar"/>
    <jar href="Jar4.jar"/>
    <jar href="Jar5.jar"/>
    <jar href="Jar6.jar"/>
    <jar href="Jar7.jar"/>
    <jar href="Jar8.jar"/>
    <jar href="Jar9.jar"/>
    <jar href="Jar10.jar"/>
    <jar href="MyApplication.jar"/>
    </resources>
    <application-desc main-class="com.xxxx.tool.cm.MyApplication"/>
    </jnlp>
    With the above configuration the Java Web Start not work.
    I'm expecting the message box for insert username and password instead it returns the messagge error :
    An error occurred while launching/running the application.
    Vendor: XXXX
    Category: Download Error
    Unable to load resource: http://host:8080/Official/Application.jnlp
    The Exception error is:
    JNLPException[category: Download Error : Exception: java.lang.NullPointerException : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
         at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I have tried to remove the restrict access in the deployment descriptor (web.xml) and java Web Start WORKS !!!!!!
    I'll appreciate any idea or hint!
    Thanks in advance

    Check this out
    http://forum.java.sun.com/thread.jsp?forum=38&thread=456250
    Mad Einstein

  • Why do I need to restart Apache and Tomcat every time a java file is change

    If a java file is changed and complied the changes are not reflected if Tomcat is not restarted.
    The settings in server.xml are as:
    <!-- Tomcat Manager Context -->
    <Context path="/manager" docBase="manager" debug="0" privileged="true"/>
         <Context path="/cf" docBase="cf" debug="0" reloadable="false"/>
    Here "cf" is my Application folder under webapps. The reloadable property when set to "true" for standalone Tomcat on Windows98 reflects the changes for compiled java files without restarting Tomcat. But on Linux 7.1 with Apache 1.3.19 and Tomcat 4.0.3 this is not working.
    Also tried out with Manager Application of tomcat-users.xml with reloadable="false" as well as reloadable="true",
    But when I reload the application using the command
    http://servername:8080/manager/reload?path=/appli.name
    It tells me that the application is reloaded but changes in the java file are still not reflected.
    Also when reloaded through Manager Servlet, Only my load-on-startup servlet is reloaded, but other java classes are not.
    Is it neccessary to execute this reload command from the server itself. I m executing it from a remote m/c. and have mapped the application with a domain name virtually.
    Is it the case with Tomcat on Linux with Apache. Or is something going wrong on my part.
    Can someone Help out plz.
    Regards,
    Rupali

    or you can "touch" your web.xml file.
    touch web.xmlor that command is for *nix systems, not sure what the Windows command is.  But basically, when you edit the web.xml, even if it means updating the last modified time, it will restart only your application and you should see the changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to install Java and Tomcat on my VPS

    Hello,
    I am new in Java.
    I would like to install Java and Tomcat on my VPS server.
    Do you know which doc or info i should read?
    Thanks a lot.
    Gil

    The free Perian will do it for you automatically.
    Additional free new machine setup stuff:
    Install and update your Flash here
    http://get.adobe.com/flashplayer/
    Install Perian (addiitonal Quicktime codecs)
    http://perian.org/
    Install the Unarchiver (uncompress software)
    http://wakaba.c3.cx/s/apps/unarchiver.html
    Flip for Mac (for Windows media in Quicktime)
    http://www.telestream.net/flip4mac-wmv/overview.htm
    VLC (plays anything just about)
    http://www.videolan.org/
    Easy Find (finds everything on a Mac)
    http://www.devon-technologies.com/download/index.html
    OnyX (maintenance, cleanup, repair utility)
    http://www.titanium.free.fr/

  • Preinstalled apache, apache2 and tomcat

    Hello,
    I'm setting up a Sun Fire V490 running solaris 10 for use as a web server. I need to have Apache httpd version 2 and tomcat version 4.x to run.
    So I found that the machine comes with apache httpd 2 preinstalled and also apache httpd 1 with fully integrated tomcat engine.
    But as stated I need to have apache httpd 2 with tomcat running!
    Apart from configuring the system to run httpd version 2 instead of version 1 by use of svcadm, I'm wondering how to get a solid solution to also have tomcat running. Ok I could simply install a tomcat version from apache.org, but I would like to ensure that this is the right solution for e.g. future upgrades.
    So if anybody has got some more knowledge but this issue, I would be happy about letting me know!
    Thanks, Raimund

    Hey, I came into the same question while configuring tomact on Sun server.
    So, what did you finally do...........?
    any help will be great....
    Thanks,

  • Setting up eclipse and tomcat

    Does anyone here have any expertise configuring these two products?(eclipse and tomcat)
    I have my tomcat server running and it process them jsp pages just fine. I have also installed the plugin to get tomcat configured with eclispe.
    I am just having problems running a jsp file directly from tomcat. it always points to a file on the hd and not to the webapps area like it's supposed to......

    Sure - we use that combo for development all the time.
    What's the problem specifically? Did you create a new Tomcat project in Eclipse? If you did, then it will automatically add the project's web path as a context to Tomcat, and you can browse directly to it using your browser.
    FYI - note that the context that is created is going to point to the eclipse workspace directory - NOT the default webapps directory that you might have configured for Tomcat. That's OK.
    - K

Maybe you are looking for

  • Dialog boxes come up missing data, blanks where options should be.

    Adobe Reader 10.1.0 Problem just started, when I bring up a dialog box to print or set preferences, the box comes up but all of the text normally in place is missing.  I get the box, but the drop down boxes are empty as are all the page selection box

  • Toshiba RDXV60KB - On playback only sound but no picture

    Recently got this DVD recorder, but on playback I am only getting sound but no picture. Struggling to see where I have gone wrong.

  • Subreport parameter question

    I have a report on liquor licensees that brings in zero to several values (extra license privileges)  in a subreport.  It works ok but I can't get a parameter/selection criteria to work.  I can get it to select based on the parameters, but when I don

  • Multiple versionsof Excel Add-in on same client PC?

    <p>Sorry if this has been asked before, but I could not find arelated post.  Is it possible to have multiple versions of theExcel add-pinon a single user pc.  We have new applicationbeing developed in 7.1.5 Mona new server , buthave older apps on old

  • Showing Cursor.WAIT when doing lengthy operation in JavaFX

    I'd like to show a busy cursor when an image is loading. In Swing, I used to do this by showing a glass pane with a busy cursor. How do I do this in JavaFx?