Tomcat startup VS service

Hi
I am using Struts1.2.2 and tomcat5.0.0.28 and windows xp.
I tried to open notepad,when i click jsp link using following code
Runtime.getRuntime().exec(�notepad.exe�);
Its work for me, If start tomcat thru %TOMCAT-HOME%\bin\startup command.
But its not working for me if i Start Tomcat as service.
Plaese help me in this regrads.
Thanks in advance.
Isma

Just to note that this will open Notepad on the server where the java code is running.
However it won't open notepad on the client machine.
Try clicking the link from a remote machine and see what happens ;-)
Cheers,
evnafets

Similar Messages

  • Tomcat 4 as service plus invoke servlet on startup

    Hi all. My two questions are as follows, any feedback is much appreciated.
    1st)
    I wish to run tomcat as a service where it will start automatically on startup plus you can restart it from the win 2000 service console. I have followed the advice on the following link http://www.prabhums.org/weblogs/?postid=237 which places an entry into the service console but doesn't start or stop tomcat as required.
    2nd)
    On tomcat startup I wish to invoke a servlet when the service starts. Where would I config this and any parameters etc? web.xml?
    Thanks in advance
    Tas

    It's very simple to have a servlet startup. Just use the load-on-startup element in your wbe.xml when you define the servlet.
    <servlet>
       <servlet-name>MyServlet</servlet-name>
       <servlet-class>com.kcole.mypackage.MyServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
    </servlet>Use a different number. I believe the numbers indicate order of startup.
    We use them to mainly to start processes/threads that run at an interval, like a TimerTask for example. We use them for things like setting up our custom connection pool and setting up jobs such as checking directories for files to import, etc.
    As to what the request and response objects contain, I don't think there are any. The servlet spec doesn't say regarding this when using the load-on-startup. It runs the init() method.
    Karl

  • Initialize a web service when Tomcat startup

    Hi,
    I have a web service, built using Axis 2 1.2, that will do all the initialization at the first service call (e.g. create new database tables, create JAXB objects, etc), but it's taking too much time to do those tasks (at least twice slower than a normal service call with everything ready).
    i was wondering if i can do the initialization at Tomcat startup, instead of doing it at the first service call, so that the first service call could always get the highest possible performance..
    Thanks..

    problem resolved... i've created a servlet class to initialize everything, and i have modified web.xml to call this servlet class when tomcat startup.

  • Tomcat as a service

    Is it possible to run Tomcat as a service under Win2K. If so, how do I do it? We need it to run all the time, even when I log off the machine.

    Hello,
    I had the same problem and I found that the tomcat.exe can be used to install a service.
    tomcat -install Tomcat %java_home%\jre\bin\server\jvm.dll "-Djava.endorsed.dirs=%catalina_home%\bin;%catalina_home%\common\endorsed" "-Djava.class.path=%java_home%\lib\tools.jar;%catalina_home%\bin\bootstrap.jar" "-Dcatalina.base=%catalina_home%" "-Dcatalina.home=%catalina_home%" "-Djava.io.tmpdir=%catalina_home%\temp" -start org.apache.catalina.startup.Bootstrap -params start -stop org.apache.catalina.startup.Bootstrap -params stop
    Succes

  • Running Tomcat as a service

    I have two questions about running Tomcat as a service.
    First, when I try to install and start tomcat 3.3.2 with the java sdk 1.4.0 using jk_nt_service, the service won't start. When I execute the following command, jk_nt_service -S Tomcat-3.3-2-Dev, I get a response of Tomcat-3.3.2-Dev failed to start. When I execute the following command, net start Tomcat-3.3.2-Dev, I get a system error 1067 response. Does anyone know how to get around this error?
    Second, if we try to run Tomcat 4.1.27 as a service, we get very slow response compared to running startup.bat in the bin directory. Does anyone know why this is and what could be done to improve the performance?
    Jim Field

    I don't know the answer to the first question.
    Regarding the second one: when you say "slow response", do you mean for every request you send to the service compared to sending the same request to Tomcat started with startup.bat, or are you referring to just starting the service?
    Have you measured the response time for a number of requests to both the service and script-started Tomcat, or is this a subjective judgement? MOD

  • Classic JVM hangs when running Tomcat as Windows Service

    Hi!
    I am running a Tomcat 3.2.4 application, written with Java 1.3.1_01.
    To run it as a Windows Service (W2000), I am using a slightly altered version of JavaService, which works fine so far: I can use both the "hotspot" and the "server" JVM's (by selecting the jvm.dll from the respective subfolder of the JDK/jre/bin folder).
    However, when I try to run the same application with the "classic" JVM, the service starts, inside of it Tomcat starts, the first output appears (to the stdout logfile) and after some time Tomcat simply hangs - it doesn't respond to anything anymore, 0% CPU, no output to logfiles anymore, doesn't even respond to normal Tomcat shutdown (e.g. when stopping the service, Windows waits the standard timeout then just kills it).
    Using the classic JVM in a console (e.g. not through JavaService and the classic/jvm.dll) works fine! No problems!
    Anyone here who can offer any help on this?
    Any hints why Tomcat may behave correctly in 5 out of six possible configurations (hotspot-server/client as service or console or classic as console) but hanging with 1 configuration (classic as service)?
    Also, on my W2000 box where this happens, the moment Tomcat hangs, I hear a Windows warning sound being played (the standard warning gong), like it happens when an info dialog pops up - only there is no dialog or whatever and the same moment Tomcat's CPU usage drops to 0% (although the app is still in startup and should do some more work for a few seconds).
    This also doesn't always happen at the same moment during startup, but each time at a different moment, e.g. I can not pin it down to something that is done during startup, it just happens a short while (sometimes earlier, sometimes later) after startup...
    Of course, I could simply say "forget classic, it's being phased out anyway", only: The SAME thing happens with IBM's Java 1.3 VM too (except for the gong sound, which seems to be Sun-JVM specific ;-)! And I would very much like my app to be able to run on IBM's VM (usually I'm using Sun's VMs everywhere, but we have a few stray W2000 boxes with SP2 where Sun's 1.3.1_0x VMs crash with our application [not hang like described above, but really crash, even when run as a console]) and on those boxes the IBM JVM in a console works fine - now I only have to get it working as a service too (and while researching why it hangs I saw that Sun's classic JVM hangs too, so I figured, I first find out why that happens, with the hope that the fix is applicable to IBM's JVM too...).
    Thanks already,
    Johannes

    re setting classpath when using JavaService
    for Win2k, Tomcat 3.3.1a, JDK1.2
    below is my script for creating/installing JavaService
    (based on Alexandria web site version). However, if i
    try to add .jar files to classpath (ie, CP environment
    variable), the service does not work. It only works
    when this single .jar file is there. How can .jar or
    .zip files be added to classpath for this service?
    I've not been working with Tomcar as a service, so can't help directly, but can offer some comments that might be of use (apologies if they aren't!).
    There are Tomcat scripts for V3.1, V3.2 and V4 with the JavaService code from Alexandria SC. Looks like you need one for V3.3 as well?
    In these others, there are fairly long lists of jar files in the classpath, so I would expect it to work correctly for the version you are using (unless there is a problem with the way that classloaders are involved, which is something that is known to get in the way for some app server-based programs).
    I would expect the classpath to work if changed from what you have listed to something like the following:
    set CP=%TOMCAT_HOME%\lib\tomcat.jar;%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME$\lib\other_library.jar
    Is that what you have tried to do, and found problems?
    Does this version of Tomcat bundle all of its resources into a single jar file (tomcat.jar), or is that a file you have created yourself?
    Is the problem found when loading and starting Tomcat itself, or from within your server-based application?
    Does it fail to load a 'standard' Tomcat library archive, or a jar file containing your own program code?
    set CP=%TOMCAT_HOME%\lib\tomcat.jar
    echo %CP%
    JavaService.exe -install "Jakarta-Tomcat"
    %java_home%\jre\bin\classic\jvm.dll
    -Djava.class.path=%CP% -Dtomcat.home=%TOMCAT_HOME%
    -Djava.security.policy=%TOMCAT_HOME%/conf/tomcat.policy
    -Xms128m -Xmx128m -start
    org.apache.tomcat.startup.Main -params start -stop
    org.apache.tomcat.startup.Main -params stop -out
    %TOMCAT_HOME%\logs\stdout.log -err
    %TOMCAT_HOME%\logs\stderr.log
    Regards,
    John Rutter

  • During installation of itunes using Windows 7 64-bit, I have this error come up every time during installation.  Tried uninstalling and re-installing, tried msconfig startup and service checks. At my wits end. Help!

    During installation of itunes using Windows 7 64-bit, I have this error come up every time during installation. 
    "An Error occured during intstallation of Assembly "Microsoft .VC80.CRT type="win32". version="8.0.50727,6195", public Key Token="1fc8b3b9a1e18e3b, processor Architecture'+x86'".  This is all followed by some more text and code HRESULT:0x80070005   
    Ive tried uninstalling and re-installing, tried msconfig startup and service checks. At my wits end. Help!
    Anne Marie

    Probably should've searched around a bit more. Just saw a similar forum post to my own in which redownloading and burning solved another user's similar issue. As of now I've redownloaded the 64-bit ISO, burned it, and so far so good (at 72% extracting files). I will repost here if it was a success in hopes that other users with a similar issue find this and benefit from it. Hope I didn't just waste anyone's time with a question that had already been answered (haha)

  • CiscoWorks Tomcat Servlet Engine service does not start

    Hello!
    CiscoWorks  Tomcat Servlet Engine service does not start.
    Events in the Windows Event Viewer:
    The CiscoWorks Tomcat Servlet Engine service terminated unexpectedly. It has done this 1 time(s).
    output pdshow and file stderr.log,  hs_err_pid2128.log attached.
    Do  you have an idea how to resolve this?
    Thanks!

    The only things which I see are wrong are the start types for the IPM NG database engine and HUM database engine services.  They must be set to Manual, not Automatic.  However, that would not account for the Tomcat crash.  The crash points to an error in the code which processes regdaemon.xml, but I see no reason why that should be failing.  As I said before, I think it would be best to open a Service Request.  Remote access would be helpful to dig into this problem in more detail.
    Please support CSC Helps Haiti
    https://supportforums.cisco.com/docs/DOC-8895
    https://supportforums.cisco.com

  • I get a error when starting Apache Tomcat 6.0 service

    Hi Friends,
    I get a error when starting Apache Tomcat 6.0 service. Do you help me?
    Kind regards.
    Fatih Temiz
    First Step:
    Second Step:
    Thanks for helps...

    It seems like the JVM is pointing to incorrect .dll file.
    Goto Apache bin directory, and from there open Apache[version]W.exe
    Click the "Java" tab and ensure the first textbox "Java Virtual Machine" is pointed to the correct jvm.dll
    If it was pointed to the JDK then it is wrong. Repoint it to the jre jvm located at \jre6\bin\client\jvm.dll
    Let me know if it resolves the issue.

  • Tomcat startup configuration question

    Can anyone tell me how I can...
    ...add the following parameter to Tomcat startup:
    -Djava.awt.headless=trueWhich file is the advice referring to (and where can I find it)?
    And in which part of the file should I make the insertion?
    Thanks,
    James

    Add JAVA_OPTS="-Djava.awt.headless=true" in $TOMCAT_HOME/bin/startup.sh

  • How to start process at tomcat startup

    Hello frens
    I need to start a process when tomcat startup
    the problem is when tomcat startup i have a bat file PushMsg.bat which content are as .............
    cd c:
    cd \tomcat\webapps\myApp\WEB-INF\classes
    java SendMsg
    i need to run this bat file as tomcat get startup .how to achieve this????????????

    Se16 -- table:RSPCPROCESSLOG - click on display entries.
    Entet the variant, instance start date (this info you can get from the "display message" of PC.
    Now execute to display the table entries of RSPCPROCESSLOG.
    Next goto SE37 transaction --enter RSPC_PROCESS_FINISH
    Take the entries from the above table to set the input parameters of the FM.
    I_logid = log_id(from above table)
    I_type = type(from above table)
    i_variant = varaint (from above table)
    i_instance = (from above table)
    Click on F8(EXECUTE)
    now the actual process is set to gree and the process chain will be triggered (rest of the PC with out repeating the step from where is was red).

  • Hi experts - cannot run HTTPS on tomcat as a service application

    I have configured HTTPS on my tomcat 4.1 web server.
    Now, when I run Tomcat as a console application it works fine and there is no problem. But When I run Tomcat as a service application, the server starts as a service properly but when I try to access the pages it says that "The Page Cannot Be Displayed"
    The configuration for HTTPS in conf/server.xml file is like this:
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                   port="443" minProcessors="5" maxProcessors="75"
                   enableLookups="true"
                acceptCount="100" debug="0" scheme="https" secure="true"
                   useURIValidationHack="false" disableUploadTimeout="true" >
          <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
                   clientAuth="false" protocol="TLS" keystorefile="C:\Documents and Settings\deepak\"/>
        </Connector>M using tomcat 4.1
    Please experts help me with this.

    And what does your catalina.out logfile say?

  • Run servlet automatically when tomcat startup

    Dear all
    I need help to run servlet automatically when tomcat startup without starting even the application containing the servlet
    thanks in advance

    lol
    i've the same problem with my car,I want it to go ahead but without starting the engine and using all this gasoline...
    Seriously... the servlet IS almost your application
    when you start the server, the application starts to
    check the init() method of the servlet Interface
    and the "load-on-startup" parameter of the servlet in the deployment descriptor

  • Loading JNI library on Tomcat startup

    I am trying to load a JNI library on startup of servlet. I have written the following code in my servlet init function:
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    log.info("Loading native libraries...");
    System.loadLibrary("foo");
    log.info("Native libraries loaded...");
    On Tomcat startup, I see the "Loading native libraries..." message, but I don't see the "Native libraries loaded...". As if the system hung in the System.loadLibrary function.
    Anybody knows how to solve this problem?
    Martin

    The specification specifically forbids the use of native libraries in container objects. So you might want to take that into consideration with whatever you are doing.
    If you do want to do that then I would suggest loading it outside of the container. There is probably some configuration option that allows you to force tomcat to load something on start up.
    You might also want to consider if hot deploys are part of your future. If they are then you might want to put the interface inside of your own custom class loader, so you can probably control the unload of the shared library.
    If you search the J2EE lists you will find that almost everyone states that JNI should not even be loaded into the server. Instead you should create a seperate application and use RMI to access it. Myself I think that is overkill, but I would probably consider exactly what I am interfacing to before making that final decision. If your JNI library blows up it will take down the entire server (which is why the spec forbids it.)

  • Tomcat Denial of Service Attack

    The signature id 5648 (Tomcat Denial of Service Attack) seams to be prone to false positives....
    We have seen in a number of incidents, that when the destination of this attack uses the ephemeral port of 8007 with an established connection on TCP port 80, the signature is often triggered. The signature looks for the content \xfe\x0f
    Is anyone else seeing this problem?

    Can you please send me some more information and we can look into refining this signature.
    An IPLog dmp file or a traffic capture would help me dig into the cause of the false positive.
    -jonathan

Maybe you are looking for

  • Hi, safari keeps crashing on my macbook when I try to save a page to me reading list!! So annoying. I have pasted the crash report here.

    Process:         Safari [42936] Path:            /Users/USER/Desktop/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:         5.1 (6534.50) Build Info:      WebBrowser-75345000~1 Code Type:       X86-64 (Native) Parent Proc

  • Bootcamp - Catalyst Control Center - help me!

    Hello, I've tried to install catalyst control center for windows 7 bootcamp, I can't seem to find the download for the actual program, I only find the drivers for it, I did find the program once, and installed it, but then I only had 2 different tabs

  • Not able to purchase in lenovo site

    (Unable to authorize your transaction. Please select another payment method to complete your order Eventhough I have Amex International card and shipped to US address still I am getting this error . Any help wrt this would be great. PS: I am using am

  • Cancillation of billing

    Hi all I would like to cancil the billing through VF11 tr. The log generated is data inconsistency due to precancillation of line item The original invoice is having billing plan  containing no of items in which three line items are already cancilled

  • Why Cant I download Flash player?

    When I try to download the latest flash player, I press run but when I press that, a file comes up saying "Open with" and under it says choose the file you want to use to open this file, I click Exploer Internet and I cancels out, I keep trying but t