Executes only if I restart tomcat

I have a JSP page that invokes a function in a bean and the bean deletes some data from database. Basically no data is fed from user. The function has to be invoked on page load.
Trouble is the required function is not performed each time I visit the page.
But works fine if i restart tomcat server and visit the page!!!
any insight into the trouble??
Thanx.

At what point do you call the method? It should not be done in the jspInit method if you want the code to execute each time the page is called (the init method is called only when the page is initialised, which is maybe only once.

Similar Messages

  • Server Admin start/stop doesnt restart tomcat

    Is it just me or does the ServerAdmin app not restart tomcat? I just spent a good hour banding the desk about why the tomcat-users.xml file didnt agree with the manager app, only to find tomcat wasnt being restarted. In the end I killed it from the terminal and let the launchd bring it back up on its own...

    What you see in Object Explorer, is a connection to the server using your local machine credentials, not any "sa" credentials. When you click on the server in registered
    servers (or click "Connect" from Object Explorer), you get a dialog box where you can enter "sa" credentials (or whatever) to log into the server, manage the databases, run queries, etc.
    But the object explorer window doesn't care about those sa credentials, it is using your local machine credentials.
    So, you (user "pippo") open up SSMS and hit "Connect" in Object Explorer and fill in information (sysadmin) to connect to SERVER A - if "pippo" is a local administrator on SERVER A, you will get the green arrow and be able to manage
    by right-clicking in Object Explorer. If "pippo" is not a local admin on SERVER A, you won't be able to. It makes no difference at all that you logged into SSMS (connected to SERVER A through SSMS) as sysadmin.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it

  • Compiling classes and restarting Tomcat

    When making changes to any of my java classes I have to restart Tomcat in order for them to be made. Is this the only way to do it?

    add this line to your server.xml in
    <tomcat_install_dir>\conf directory
    <DefaultContext reloadable="true"/>
    if you have context path tag in this file for your
    application, then add
    the line to this tag as shown below
    <Context reloadable="true"....</Context>
    This will automatically load classes
    This should really only be done in a development environment (but by all means DO use it in a development environment). In a production environment, with lots of simultaneous users, it has a pretty big impact on performance.
    - K

  • Restart tomcat at every servlet modify?

    Hi,
    I'm using tomcat 5.5 and working on some servlets, but when I execute a servlet (http://localhost/my_servlet)
    and then I modify and recompile it, I have to shutdown and restart tomcat to see the new version on work.
    Is this normal? Can I avoid this?
    Thanx

    Well, I have solved the problem editing contex.wml file modifying the line:
    <Context>into the line:
    <Context reloadable="true">Now it works even if refresh time is not so low...
    Thanx to all.
    P.S.
    Adding the line
    <DefaultContext reloadable="true"/>into server.xml file I don't have obtained any result.

  • How can i avoid restarting tomcat server when servlet is modified?

    please advice me that how can i avoid restarting the tomcat server, whenever a servlet file is modified in my application. is their any way ?

    No probs. Here's how I do things...
    1. Install tomcat as normal (e.g. I install to C:\Apps\jakarta-tomcat-5.5.4)
    2. Create a webapps directory in your eclipse project with the following directory structure
    MyEclipseProject
       - src
       - conf
       - webapps
          - MyApplication
             - META-INF
             - WEB-INF
                - classes
                - lib
                - pages3. Set the project's output folder (e.g. bin folder) to webapps/MyApplication/WEB-INF/classes
    4. Put all your jar files in the lib directory
    5. Put JSPs / HTML in the pages directory (you may also want to create additional directories for TLDs, config files etc)
    6. Ensure your web.xml is in the WEB-INF directory
    7. Although it isn't essential I create a context.xml file and store it in META-INF, e.g.
    <Context reloadable="true">
        <!-- Default set of monitored resources -->
         <WatchedResource>WEB-INF/web.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/struts-config.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/tiles-defs.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/validation.xml</WatchedResource>     
    </Context>I use this to set monitored resources that will trigger an automatic appliation reload and to configure JAAS (not shown). See the Tomcat documentation for additional information.
    8. In the 'conf' directory I create a server.xml file used to configure Tomcat (you can copy the one from your <TOMCAT_HOME>/conf/server.xml).
    After copying the file change appBase attribute in the host element to be the full path to the webapps directory. You can also change the HTTP and HTTPS ports if you wish
    9. Download and install the Tomcat Launcher plugin from Sysdeo.
    10. In Eclipse's Preferences menu you will see a new entry for Tomcat. Click this then
    a. Set your Tomcat Version
    b. Set your Tomcat Home
    c. Set "Context declaration mode" to server.xml
    d. Set the configuration file to the full path to your server.xml file created in step 8
    On the "Advanced " sub page select all relevant projects to add to the Tomcat classpath
    On the "JVM Settings" page add all the jars in your WEB-INF lib directory to the class path
    On the "Source Path" page select all relevant projects
    Now if you start Tomcat using the Tomcat icon, you will be able to remote debug your application. If you change web.xml (or any other file in your context.xml watched resources) it will automatically reload. Any changes to JSPs will automatically be picked up (providing your tell your browser not to use the page in cache - e.g. CTRL+F5 in IE)
    There are some limitations that I'm still working on however. Primarily that I haven't included the Tomcat Manager application in my webapps directory, so Sysdeo cannot perform a reload. This means that if I change a source file, and eclipse auotmatically rebuilds, Tomcat doesn't pick up the change unless I either change a watched resource file (e.g. web.xml) or stop and restart Tomcat.
    There's no reason why this can't be fixed, I just haven't got round to it yet.
    I'm sure there are lots of other (probably better) ways of achieving the same thing. This was the first method I tried and it worked, so I stuck with it. I'm not a Tomcat config guru and I'm sure other forum users could provide some improvements should they wish.
    Post if you get into trouble, however I won't be able to respond until next week.
    Cheers,
    Steve

  • How to get a case structure to execute only once in a loop

    I have a while loop that is monitoring temperature. Once the temperature meets or exceeds a given setpoint I want to start a timer. At this point I don't want to monitor the temperature anymore. That is, if the temperature should drop below the setpoint, I don't want to execute the case structure again when the temperture meets or exceeds the setpoint(the temp may oscillate about the setpoint for a given period of time). In any event, I need the case structure to execute only one time, not every iteration of the loop.

    You can put a local Boolean variable "Flag" inside that case structure and
    set "Flag" to False. Outside the case structure, use an "AND" function
    output to control the case structure. The "AND" function has two inputs. One
    goes to the comparison results between real temp and setpoint. The other
    inputs connects to the "Flag" variable. In this way, once you entered that
    case structure, the "Flag" will be turned to False, and then in next
    iteration, you won't get into the case again because the "AND" function will
    be False as your "Flag" is False now.
    Hope this helps.
    Rentian
    1. Inside the case structure, put a
    "BB Herman" wrote in message
    news:[email protected]..
    >I have a while loop that is monitori
    ng temperature. Once the
    > temperature meets or exceeds a given setpoint I want to start a timer.
    > At this point I don't want to monitor the temperature anymore. That
    > is, if the temperature should drop below the setpoint, I don't want to
    > execute the case structure again when the temperture meets or exceeds
    > the setpoint(the temp may oscillate about the setpoint for a given
    > period of time). In any event, I need the case structure to execute
    > only one time, not every iteration of the loop.

  • Condition type has to executed only when other condition type is availabl

    Scenario:  We have two freight condition types YHD1 & YHD6. This YHD6 condition type is a Percentage type calculation and dependent of YHD1 value, for example
    YHD1: 30 EUR then the condition value is 30 EUR
    YHD6: 10 % then the condition value is 3 EUR
    Issue: YHD6 is fetched from Condition records at the time of delivery document, where as YHD1 condition type is inserted into the delivery document through a BDC program in a custom program. BDC program is written in such a way that YHD1 condition record is applied on the first line. This custom program is supposed to execute only after PGI is done for delivery and shipment is created.
    Since, YHD6 is fetched from Condition records; this condition is applied when the delivery document is created. And when this custom program is executed, system is looking to insert YHD1 condition on first line, but YHD6 is already exists this step is unsuccessful.
    Requirement: is it possible to determine YHD6 condition only when YHD1 is available in the document. I mean, YHD1 condition type has to be executed first and then YHD6.

    Hi All,
    Thanks for repling to my query.
    I will explore the opition of developing a Routine to restrict YHD6 condition type. But i have one doubt, suppose i have assigned a routine to YHD6 condition type and when delivery document is created, system fetches the YHD6 condition from the condition record, but due to this routine it will restrict to update the value.
    But when i update the delivery document with YHD1 condtion through custom program, NOW, does the system calls YHD6 again so that now the requirement is fullfilled or do i need to update the Pricing again after YHD1..
    I kindly reqeust you to clarify my doubt, however, i will take up this with my ABAPer and develop a routine.
    Thanks in advance.
    Warm Regards,
    Sridahr

  • I just updated my iphone to ios7 and I keep getting stuck at the 'Set up your iPhone' screen. I click 'Restore from Itunes Backup', but it only ends up restarting after restoring and fails to get past the 'Set up your iPhone' screen. Any ideas?

    I just updated my iphone to ios7 and I keep getting stuck at the 'Set up your iPhone' screen. I click 'Restore from Itunes Backup', but it only ends up restarting after restoring and fails to get past the 'Set up your iPhone' screen. Any ideas?

    Normally, I would suggest restoring the iPad and uninstall and reinstall iTunes but you have done both of those things - more times than you ever imagined!
    Have you thought about turning auto syncing off?
    Without connecting your iPad to your laptop, start iTunes. Click on Edit. Click on Preferences. Click on Devices. Check the box next to "Prevent your iPod etc. from automatically syncing." Click OK.
    If you do this you can backup the iPad right away before it syncs. You may want to go into all of the iTunes tabs and just make sure that all of the current content on the iPad is selected to sync before you actually do sync.
    This doesn't solve the problem, but it would prevent the automatic sync and erasing content. Hopefully, in the next few days- when iOS 5 is released - you will also be relieved of this weird iPad behavior - since the iOS devices are supposed to become PC free.
    BTW - and this is no excuse for what you are experiencing, but I have found that some of the game apps that I had on my iPad turned out to be quite troublesome and after I removed them, my problems went away. I know that is almost sacrilege with regard to the Angry Birds addiction .... But I'm just saying ...

  • Why does my ipod sometimes flashes white then shuts down and then the only way to restart is to restore?

    why does my ipod sometimes flashes white then shuts down and then the only way to restart is to restore?

    If you restored to factory settings/new iPod and still have the problem that indicates a hardware problem.
    Make an appointment at the Genius Bar of an Apple store..
    Apple Retail Store - Genius Bar

  • SAP ADHOC Query execute only

    dear all,
    I have setup a new role and made adhoc query for users to be able to maintain, change etc......
    You can set up authorizations in such a way, that certain end-users in a user group are authorized to maintain and execute queries, while other members of the same user group are authorized only to execute existing queries."
    the above statement, states other memebrs can be setup to execute only?
    what must I do to make the endsers allow them to execute the query only?
    for the first set of users i have within object S_QUERY made them to use change, maintain and translate.
    thanks all

    There is info here: http://help.sap.com/SAPHELP_NW70EHP1/helpdata/EN/de/45daf69ef111d195050000e82de14a/content.htm and here: http://help.sap.com/saphelp_46c/helpdata/en/de/45daf69ef111d195050000e82de14a/content.htm
    Users with S_QUERY actvt=02 can move between infosets with no problem.  If you are removing this then you need to specify which infosets are assigned to a user group and which users are assigned to the user group.  If you have lots of users and queries already then this may be a big piece of work and illustrates why use of queries may save time for one team (developers) but give more work for others.

  • Reload web-inf/web.xml file without restarting tomcat

    Please help me if any one have a solution .
    I am doing development in jsp, servlet. I am using tomcat5 as a webserver.
    i want to reload web-inf/web.xml file without restarting tomcat.

    From the tomcat admin page you can stop/start and refresh individual applications. See the tomcat documentation. Which, when you have a question about tomcat, you should always do first.

  • How to execute a servlet on  jakarta-tomcat-4.0.3

    Please let me know how to execute a servlet on  jakarta-tomcat-4.0.3 .I am able to compile it .
    Regards,
    Saurabh Singhal

    Hi
    You must provide a mapping in your web.xml configuration file. This mapping will allow you to access servlet via url in form: "http://[domain]:[port]/[context]/servlet/[servlet full qualified name]"
    This file should be located at $TOMCAT_HOME/conf.
    Sample web.xml contains:
    <web-app>
        <display-name>Sample Database App</display-name>
        <description>
         This is a simple application.
        </description>
        <servlet>
            <servlet-name>MyServlet</servlet-name>
            <servlet-class>MyServletImpl</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>MyServlet</servlet-name>
         <url-pattern>/myservletaddr</url-pattern>
        </servlet-mapping>
    </web-app>
    You can find more info at:
    http://scitec.uwichill.edu.bb/cmp/online/CS36L/tutorials/TomcatIntroduction/TomcatIntroSampleApp.html
    or
    http://www.moreservlets.com/Using-Tomcat-4.html

  • How to execute only once the *copy* about LRF1 tcode ?

    Hi Experts !
    I duplicated the LRF1 tcode by ZLRF1 tcode with the main program SAPLZLRFMON (please see below).
    I have an issue with the execution about the ZRLF1 tcode, normally the LRF1 tcode can be execute only once under the same warehouse number, but my transaction ZLRF1 can be execute by more than one user at a time. I debug the execution about the ZLRF1 with a breakpoint set into LZLRFMONF01 include (include test connection) but the system excute the transaction without regard to the breakpoint set into LZLRFMONF01. Did I forget anything ?
    thanks in advance for your help.
      System-defined Include-files.                                 *
      INCLUDE LZLRFMONTOP.                        " Global Data
      INCLUDE LZLRFMONUXX.                        " Function Modules
      User-defined Include-files (if necessary).                    *
    *Class implementations
    INCLUDE LZLRFMONCL2.
    *INCLUDE LLRFMONCL2.
    INCLUDE LZLRFMONCL3.
    *INCLUDE LLRFMONCL3.
    INCLUDE LZLRFMONCL4.
    *INCLUDE LLRFMONCL4.
    INCLUDE LZLRFMONCL5.
    *INCLUDE LLRFMONCL5.
    INCLUDE LZLRFMONCL6.
    *INCLUDE LLRFMONCL6.
    INCLUDE LZLRFMONCL7.
    *INCLUDE LLRFMONCL7.
    INCLUDE LZLRFMONCL8.
    *INCLUDE LLRFMONCL8.
    INCLUDE LZLRFMONCL9.
    *INCLUDE LLRFMONCL9.
    INCLUDE LZLRFMONCLA.
    *INCLUDE LLRFMONCLA.
    *PBO-Modules
    INCLUDE LZLRFMONO01.
    *INCLUDE LLRFMONO01.
    INCLUDE LZLRFMONO03.
    *INCLUDE LLRFMONO03.
    *PAI-Modules
    INCLUDE LZLRFMONI01.
    *INCLUDE LLRFMONI01.
    INCLUDE LZLRFMONI03.
    *INCLUDE LLRFMONI03.
    INCLUDE LZLRFMONF01.
    *INCLUDE LLRFMONF01.
    INCLUDE LZLRFMONF02.
    *INCLUDE LLRFMONF02.

    CHRISTIAN MEYER wrote:>
    >  Did I forget anything ?
    Yes - Standard SAP programs quite often check the program name and transaction code being executed. If you look at program SAPLLRFMON, you'll see that it uses both the program name and transaction code (LRF1) in a number of places. You have to go through your copy, looking for these places and add the logic for your trasnaction code an program names.
    Rob

  • Help!!!   I cant restart Tomcat Server  -StandardServer.await: create[8005]

    help!!! I cant restart Tomcat Server
    The following error is thrown on startup console:
    &#22196;&#37325;&#30340;: StandardServer.await: create[8005]:
    java.net.BindException: Cannot assign requested address: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.<init>(ServerSocket.java:185)
         at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
         at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)1)I checked that no any process occupy port 8080 and 8005
    2)I modified the server.xml and change other port to use. the error is still shown
    Does anyone know what the problem is?
    thanks a lot!
    Edited by: perfectlifepan on Aug 17, 2010 3:50 AM

    In the past I have accidentally had my Tomcat service started and tried to start it up another instance in a development environment causing this error (recreated it just now):
    java.net.BindException: Address already in use: JVM_Bind:8080Yours is
    java.net.BindException: Cannot assign requested address: JVM_Bindwhich leads me to believe from a few quick web searches that it might be an underlying network(ip) problem and not a port problem.
    (wifi/lan switching? permission problem?)
    Either way it seems like something a classic reboot would solve. :-)
    Good luck!

  • Strategy plan with package to be executed only once

    Hi All,
    Created a time based maintenance plan with strategy. Included 4 maintenance packages in the strategy. One of the maintenance package should be executed only once upon scheduling the maint. plan and should be due on the date on scheduling.
    What scheduling parameters are to be maintained?
    Regards,
    Abhijit

    Hi Abhijeet,
                      The Functionality of Offset is actually different.
    Suppose you procure a new Equipment, you have erected and comissioned, but the use will anly after 3 months as the predessing and subsequent Equipment needs some time for the Erection and comissioning, in this case, you maintenance plans should start after 3 months only,
    for this reason the Offsetting Field is used.
    that is if you maintain the offseting of 3 months then the cycle will start after 3 months.
    it means that if today is 20th December and you have a cycle frequency of 1 month and you give the offseting for 3 months then your plan will be only activated from 20th march,and the first order will be generated 1 month(cycle period) after that.
    that is 20th April.
    Hope it further clarifies your doubt.
    Regards,
    Yawar Khan

Maybe you are looking for