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.

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

    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.

  • Cannot get EL with JSP 2.0 and Tomcat 5 to work.

    I cannot seem to get the EL to work with Tomcat 5 to work. When I use <c:out value="${expr}"/>, I simply get printed out the content of the double quotes as though it is a string. I don't know if EL has to be enabled with JSP 2.0 and I cannot find any documentation on enabling EL with JSP 2.0. Please help.

    Check out [url http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0] this thread , reply #6.
    It covers the basics issues that people encounter installing JSTL.
    I cannot find any documentation on enabling EL with JSP 2.0I guess you haven't looked hard enough.Try the JSP2.0 specification section 3.3.2: Deactivating EL Evaluation

  • 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.

  • Java NetBeans and Firefox will not work together

    I'm just beginnig to learn Java an have installed jdk 1.6.0 and NetBeans IDE 5.5.
    In NetBeans I have the possibility to chose Firefox as a tool to read docs (over the internet).
    But when I try to set it up with the following parameters:
    /usr/bin/mozilla-firefox -remote "openURL({URL})"I get the following error:
    Cannot execute /usr/bin/mozilla-firefox.
    Check that valid external browser property is set.
    From Tools menu choose Options.
    Click Advance Options button, expand External Tool and Settings node,
    then expand Web Browsers and choose valid browser.The only thing I can imagine is there will be something wrong with the command but I can't figure out whats wrong.
    The Firefox shell-script is located an named as above (/usr/bin/mozilla-firefox)
    and when I click at it in konqueror i start nicely.
    So ...??

    Hello everyone... unfortunately i have a similar issue. I have a fresh load of openSuSE 10.2 on a Dell Laptop. It is (intended to be) my main Java/AJAX development box, and I cannot get NetBeans to launch Firefox. A detailed account of my symptoms is below:
    OS Config:
    openSuSE 10.2
    Firefox 2.0 (openSuSE pre-packaged version)
    IDE Config:
    configuration:
    A) Browser set to Firefox (/usr/bin/firefox), arguments: -remote "openURL({URL})"
    B) No browser windows open
    1. Try to launch project (or click on a link in the Welcome page to go to NetBeans.org) and nothing happens. Status bar says "Running command /usr/bin/firefox" but nothing happens.
    2. Run command /usr/bin/firefox -remote "openURL(http://www.google.com)" from a terminal get message "no running window found"
    configuration:
    A) Browser set to Firefox (/usr/bin/firefox), arguments: -remote "openURL({URL})"
    B) At least 1 browser window open
    1. Try to launch project (or click on a link in the Welcome page to go to NetBeans.org) and nothing happens. Status bar says "Running command /usr/bin/firefox" but nothing happens.
    2. Run command /usr/bin/firefox -remote "openURL(http://www.google.com)" from a terminal and new browser opens with google.com
    configuration
    A) Browser set to Firefox (usr/lib/firefox), arguments: URLB) No browser window open.
    1. Launch project or click on link on welcome screen and Firefox launches with correct URL. However, upon closing firefox, I get the error from Netbeans stating that it could not run command /usr/bin/firefox (although everything ran fine)
    2. run command /usr/bin/firefox http://www.google.com from the terminal and it launches firefox to google, but blocks (keeps focus away from the terminal window) until you close firefox and you are given back control of the terminal.
    configuration
    A) Browser set to Konqueror, arguments : {URL}
    B) No browser window open
    1. Launch a project or click on any of the links, and everything runs like a champ, no fuss from NetBeans.
    This didn't happen on my SuSE Linux Enterprise Desktop 10.0 install a few weeks back. That, however, came with Firefox 1.5.x and I dont recall if I updated it to 2.0. At any rate, it seems to be something with the way the -remote command is executed. Does anyone have any more ideas? I want to use this machine for my Java/AJAX and really don't want to have to default to Konqueror.
    Thanks in advance!
    ~v
    Message was edited by:
    vyrt1go

  • NetBeans 6.5.1 and Tomcat 4

    Hello, I've been trying to find some information about this online but it seems there is almost nothing out there or in here.
    I need to maintain an old tomcat 4 webapp (the hosting server has only that version of tomcat), but when you try to add an older version of Tomcat as a server in NetBeans, the option is not present (only 5, 5.5 and 6).
    Is there any possibility to configure Tomcat 4 as a server inside the NetBeans 6.5.1 IDE??
    Thanks!

    hi;
    I am mexican and sorry for english, well lets see, there are a botton then you select a server, click on it "add" then appear alist off servers for default, down appear a textbox called Name, set tomcat 4, then click next select catalina home fo tomcat 4 and other features, most work but, I have just used it to configure firts time the tomcat 6, dont know if that works to tomcat 4.
    thanks on advance
    Miguel Villalobos

  • 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 WVP/Tomcat, "faces-config", must match DOCTYPE root "null"

    With Netbeans 5.5 I suddenly (worked yesterday) get an error when
    starting Tomcat 5.5.17:
    org.apache.commons.digester.Digester - Parse Error at line 9 column 116: Document root element "faces-config", must match DOCTYPE root "null".
    org.xml.sax.SAXParseException: Document root element "faces-config", must match DOCTYPE root "null".
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    The XML parser is complaining about a corrupt schema reference in faces-config.xml inside of web-ui.jar.
    First attempt at a solution: uninstalled WVP and re-installed, hoping for a jar with a valid xml file--no such luck, it's corrupt on install.
    Worst, it looks like JSF 1.2 stuff that's being called--my project is imported from JSC 2 and, presumably, should be using JSF 1.1.
    Second attempt at a solution: download latest JSF1.1 files and copy into netbeans module/ext and project's WEB-INF/lib.
    No luck, same error.

    The following piece of code should work:
         public static final String JAXP_SCHEMA_LANGUAGE="http://java.sun.com/xml/jaxp/properties/schemaLanguage";
         public static final String W3C_XML_SCHEMA="http://www.w3.org/2001/XMLSchema";
         public static final String SCHEMA_SOURCE_XSD = "C:/eclipse/workspace/XSDValidation/config/Providers-def.xsd";
         public static final String JAXP_SCHEMA_SOURCE ="http://java.sun.com/xml/jaxp/properties/schemaSource";
                        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   factory.setNamespaceAware(true);
                   factory.setValidating(true);     
                   try
                        factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                        factory.setAttribute(JAXP_SCHEMA_SOURCE ,new File(SCHEMA_SOURCE_XSD));
    /*                    factory.setAttribute(VALID_SCHEM ,Boolean.valueOf(true));
                        factory.setAttribute(VALID_SCHEM_FULL ,Boolean.valueOf(true));
                   catch (IllegalArgumentException x)
                        // Happens if the parser does not support JAXP 1.2
                        System.err.println("Could not register the providers as the underlying parser" +
                                  "does not support JAXP 1.2");
                   // get the xml document builder
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   Validator handler = new Validator();
                   builder.setErrorHandler(handler);                    
         private class Validator extends DefaultHandler
              public boolean validationError = false;
              public SAXParseException saxParseException = null;
              public void error(SAXParseException exception)
              throws SAXException{
              validationError = true;
              saxParseException = exception;     
              throw new SAXException("failed validation");
              public void fatalError(SAXParseException exception)
              throws SAXException {
              validationError = true;     
              saxParseException=exception;     
              public void warning(SAXParseException exception)
              throws SAXException { }     
    ########################################################

  • Creating WSDL file using Netbeans and JAX-WS

    I have created a web service called calculator in Netbeans IDE.
    I build the project and deployed in Tomcat.
    When I accessed WSDL file i getting as follows
    *<?xml version="1.0" encoding="UTF-8" ?>*
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://actions.calculator.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://actions.calculator.com/" name="calculatorService">
    - <types>
    - <xsd:schema>
    *<xsd:import schemaLocation="http://localhost:8080/calculator/calculator?xsd=1" namespace="http://actions.calculator.com/" />*
    *</xsd:schema>*
    *</types>*
    etc.......
    here schema is imported from another file...
    I need schema to included in the WSDL file itself.
    How can i get a WSDL file like this??
    I am using Netbeans 5.5 and JAX-WS 2.0

    Hi,
    Change the <soap:binding style="document"... to <soap:binding style="rpc"... and see if that works.
    I'm not sure how to get <soap:binding style="document"... working yet - I'm not that experienced in web services yet.
    Hope this helps and is not too late.
    Regards,
    Greg Nye

  • 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.

  • BOBJ XI 3.1 SP7 SSO logout and login again not working

    Hello,
    The customer have a deployment of five BOBJ XI 3.1 SP7 with Tomcat 7 servers and AD integration with SSO.
    The case is that:
    The SSO login works fine on all servers, but when click logout and then go to the address bar and hit enter on the first four servers SSO reacts again, but on the 5th does not. The only way to login again is to close the browser and open it again.
    The configuration and the versions of Tomcats is exactly the same. The only difference is in the version of Windows the first four servers are on Windows 2003R2, but the 5th(the last) is on Windows Server 2008R2. I think the problem is somewhere in the application server(the Tomcat), but the server.xml and the web.xml of the InfoViewApp are the same.
    The SPNs are:
    BOBJCentralMS/hostname serviceaccount
    HTTP/hostame serviceaccount
    HTTP/FQDN serviceaccount
    I'm out of ideas so if somebody can help I'll be happy.
    Thank you in advance!
    Dilyan

    Hi Manna Das,
    I'll check the log, when i go to the customer(have no remote connection).
    Hi Sebastian Wiefett,
    Where in the BOBJ documents is described that the all nodes in the cluster must be on the same OS? I think it does not matters. Only the version of SP and FP must be the same.
    Different browsers are not allowed in the customer's newtwork. Only Internet Explorer.
    I'll try Kerberos debugger. I forgot about it.
    Hi raunak kumar,
    The case is not the same. First the resolution described in SAP Note 1835729 is included in SP7, second here the problem is not on the refresh page(F5), but on click in the address bar and hit "enter". There is difference between the two methods.
    Thank you for the suggestions!

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with JSF 1.2 and Tomcat 6

    Hello guys,
    I have here:
    Tomcat 6.0.10
    JSF 1.2_04_b10_p01
    I followed these steps without success:
    http://forum.java.sun.com/thread.jspa?threadID=787962
    http://forum.java.sun.com/thread.jspa?threadID=5156242
    Here what I did:
    1) Removed the following line in $TOMCAT_HOME/conf/server.xml
    <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />2) Add the following lines to $TOMCAT_HOME/conf/web.xml
         <context-param>
         <param-name>com.sun.faces.expressionFactory</param-name>
         <param-value>org.apache.el.ExpressionFactoryImpl</param-value>
         </context-param>3) Add the following libs to $TOMCAT_HOME/lib
    jsf-api.jar
    jsf-impl.jar
    jstl-1.2.jar
    4) Add the following lines to $MYAPP/WEB-INF/web.xml
         <listener>
              <listener-class>
                   com.sun.faces.config.ConfigureListener
              </listener-class>
         </listener>
         <listener>
              <listener-class>
                   com.sun.faces.application.WebappLifecycleListener
              </listener-class>
         </listener>And here is "the final product":
    INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context '/protocolo'
    10/04/2007 08:18:47 com.sun.faces.config.ConfigureListener registerELResolverAndListenerWithJsp
    SEVERE: Error Instantiating ExpressionFactory
    java.lang.ClassCastException: org.apache.el.ExpressionFactoryImpl cannot be cast to javax.el.ExpressionFactory
         at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1563)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:419)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
         at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)What I need to do? Someone can help me?
    Thank you.

    Thank you for the answer rlubke,
    Well this happened because I had compiled the project with the jstl-1.1
    The workaround to make jsf 1.2 run on tomcat 6 really works.
    But now I have a problem because the JNDI tree in tomcat is read-only ( ro )
    and I need to bind a object in the JNDI so an exception happens:
    WARNING: Ocorreu um erro inexperado:
    javax.naming.NamingException: Context is read only
             at org.apache.naming.NamingContext.checkWritable(NamingContext.java:903)
             at org.apache.naming.NamingContext.bind(NamingContext.java:831)
             at org.apache.naming.NamingContext.bind(NamingContext.java:171)
             at org.apache.naming.NamingContext.bind(NamingContext.java:187)
             at org.apache.naming.SelectorContext.bind(SelectorContext.java:171)
             at javax.naming.InitialContext.bind(InitialContext.java:400)Here is the code:
    try{
         Context newContext = new InitialContext();
         newContext.bind( dataSourceWrappedID, wrappedDs );
         newContext.close();
    }catch(NameAlreadyBoundException nabe){
         // ok no problem..
    }catch(NamingException ne){
         if ( log.isWarnEnabled() ){
              log.warn("Ocorreu um erro inexperado:", ne);
    }You know how to make the JNDI tree in tomcat read-write ?
    Thank you a ton. :-)

Maybe you are looking for

  • Error in deploying Webdynpro  in NWDS

    Hi Experts,             I am facing a error while I m trying to deploy a webdynpro application through NWDS  : Settings SDM host : nepdev SDM port : 50118 URL to deploy : file:/C:/DOCUME1/admin/LOCALS1/Temp/temp52974WebDynpro_Quiz.ear Deployment exce

  • How to install Huawei MediaPad 10 FHD USB Driver (MTP) for windows 8.1

    Hi, My PC's Windows in my workplace and Home is 8.1 Pro. I have Huawei MediaPad 10 FHD. The USB driver can't installed, and i can't use from USB for transfer file or data to tablet. I use USB for transfer to Table in workplace without error or any pr

  • In search of a calendar

    Hey there, many month ago I switched from a Mac a year ago, and now I'm missing a good calendar (like iCal). Is there any known good one? Maya-calendar from eOS is the most similar I found, but not stable on my systems. Last edited by sonnenschein (2

  • The iPhone "iPhone" could not be restored. An unknown error occurred (23)

    Hi All, My wife's iphone recently just stopped working. So we picked her up a new iPhone 4, but I'm trying to get her old white 3G phone working. I was able to get iTunes to recognize the phone and prompt for a restore, but everytime I click the rest

  • Adobe 10, Windows 7, Hebrew PDF file

    Hello, I have just installed Windows 7 Pro and Adobe 10. When I visit now a Hebrew web site and open any PDF, the text looks all shifted left (instead of right - for Hebrew) and all the boxes and frams of the document are missing. The Hebrew wab page