Disable automatic context reloading in tomcat  on web.xml chaning

Hi all,
is there a way to disable automatical reloading of webapp if web.xml is changed?

It should be enabled in latest tomcat version as I cannot DISABLE it. Reloading on Servlet changing is enbaled by adding reloadable="true" to context-tag in server.xml

Similar Messages

  • Tomcat vs web.xml

    I know it is offtopic, but i just can't find out what to do to tomcat that it must not be restarted each time when I change web.xml. Course only after restarting it applies new params :(
    Thanks in advance.

    No, as far as I know you have to restart Tomcat to pick up changes to web.xml
    see thread
    http://forum.java.sun.com/thread.jsp?thread=472820&forum=33&message=2187793

  • ejb-name into web.xml automatically

    Hello all,
    I follow the OC4J's tutorial in >>Servlet Developer's Guide<< using Jdeveloper 903.
    there is an EJB session bean named HelloBean.
    From UML Diagram, I can get it, and write the HelloServlet.java to invoke session bean.
    now it is Ok. Jdeveloper online help says that EJB reference <ejb-ref> can be written into web.xml file,
    but it doesn't do it. I manually insert <ejb-ref>...</ejb-ref> into web.xml.
    and change <ejb-name> and <ejb-ref-name> in ejb/HelloBean.
    I want to know how to do this automatically by Jdeveloper 903.
    and how to change session bean's <ejb-name> from HelloBean into ejb/HelloBean?
    Thanks.
    Wu JianHua.

    Automatic insertion of ejb-ref in web.xml whenever EJB dependencies are included in WAR deployment profile.
    Select Tools | Preferences
    Select Deployment in the left hand tree
    Select the check box for "Automatically Fill in <ejb-ref> elements in web.xml
    You can hit F1 hel on the above panel to view the help.
    From help system
    Automatically Fill In <ejb-ref> Elements in web.xmlBy default, JDeveloper automatically inserts corresponding elements to the web module deployment descriptor file, web.xml, whenever EJB dependencies are included in the WAR profile. If an EJB dependency is subsequently removed, however, JDeveloper will leave the elements in web.xml instead of removing them. Clear this checkbox to disable automatic insertion of elements in the web.xml file. Clearing this field prevents extraneous <ejb-ref> elements from appearing in the web.xml. However, do this with caution, since you'll have to make sure that the web.xml file is complete and accurate before deployment.
    raghu
    JDev Team

  • Define a context parameter not using web.xml

    Dears,
    With a web.xml file, it is possible to define a context parameter available in the web app via de ServetContext.getInitParameters method.
    Is it possible to define a context parameter not using the web.xml file ? Can I, in a java Class, init a custom context parameter ? (for exampel, init as a context param a key/value pair read from a property file).
    PS: the need is that the value (hmac key) currently define in the web.xml needs to be updated monthly. Apparently, under WebSphere (the app server we are using) changing the web.xml of the deployed app it not enought for it to be taken into account.
    Sincerely,
    Beno�t Bertrand

    Is it possible to define a context parameter not
    using the web.xml file ? Can I, in a java Class, init
    a custom context parameter ? (for exampel, init as a
    context param a key/value pair read from a property
    file).Does it necessarily have to be a value retrieved through the context param ? AFAIK, there's no way you could programatically 'set' an init param, which going by the name, 'init param' is quite understandable.
    You could define this value in a property file and read it in, in the init method. You should provide a mechanism to reload the new value after 'x' days. One approach is a Timer that does the job, do have a look at SteveJLuke's recommendations on the same in this thread
    http://forum.java.sun.com/thread.jspa?threadID=637355&tstart=0cheers,
    ram.

  • Help me out to specify driver in web.xml

    i am new programmer and i dont no where to specify driver in web.xml so that i ll get connection using datasource. i know the code in jsp but i dont no where and how to specify driver and under what tag.
    This is few steps which i know
    !>jsp side i know what to write ie
    Context ctx=new IntialContext();
    DataSource ds=(DataSource) ctx.lookup("java:comp/env/jdbc/test");
    Connection cn=ds.getConnection("umesh","umesh");
    2> what and where to write in web.xml
    3> i am going to control panel and in that obdc datasource i am going in system tab
    there i am adding oracle and DATASOURCE NAME as "test"
    is this will work or i have to write something in web.xml also
    thanks in advance
    help me out

    In addittion to following the steps as indicated by the above URL, make the context entries in the
    app_root/META-INF/context.xml file .
    As I encountered lots of probelms in settingup the JNDI datasource via server.xml or web.xml file
    To be precise , do follwoing:
    1. Make META-INF directory and add context.xml file to include following:
    <Context path="/app_name" docBase="app_name"
    debug="5" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="Test_log." suffix=".txt"
    timestamp="true"/>
    <Resource name="jdbc/yourDB"
    auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/yourDB">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <!-- Maximum number of dB connections in pool. Make sure you
    configure your mysqld max_connections large enough to handle
    all of your db connections. Set to 0 for no limit.
    -->
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    <!-- Maximum number of idle dB connections to retain in pool.
    Set to 0 for no limit.
    -->
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>
    <!-- Maximum time to wait for a dB connection to become available
    in ms, in this example 10 seconds. An Exception is thrown if
    this timeout is exceeded. Set to -1 to wait indefinitely.
    -->
    <parameter>
    <name>maxWait</name>
    <value>10000</value>
    </parameter>
    <!-- MySQL dB username and password for dB connections -->
    <parameter>
    <name>username</name>
    <value>dbuser</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>dbpwd</value>
    </parameter>
    <!-- Class name for the official MySQL Connector/J driver -->
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <!-- The JDBC connection url for connecting to your MySQL dB.
    The autoReconnect=true argument to the url makes sure that the
    mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
    connection. mysqld by default closes idle connections after 8 hours.
    -->
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/yourDB?autoReconnect=true</value>
    </parameter>
    </ResourceParams>
    </Context>
    2. In the web.xml include following:
    <!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>
    <display-name>Hello, World Application</display-name>
    <description>
         None </description>
    <description>
    Resource reference to a factory for java.sql.Connection
    instances that may be used for talking to a particular
    database that is configured in the server.xml file.
    </description>
    <resource-ref>
    <description> Database </description>
    <res-ref-name>jdbc/yourDB</res-ref-name>
    <res-ref-type>javax.sql.DataSource</res-ref-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    Try to make a war file for your application and deploy it using the Tomcat manager application..
    Asif

  • Edit web.xml programmatically

    And another question
    Can I edit the web.xml from the web application, in session been for example. I want the admin user to add roles from the web application page and grant them to users.
    Then it should be created automatically in the database
    and in web.xml.
    Maybe it is possible to add it in data base but not to web.xml.
    is there a way?
    Thank you, I hope to get answers soon from you.

    There probably are options to do this, but all of them(the ones i know of atleast), are either too cumbersome or an over-kill.
    Why do you want to add security roles/grants for "users" in your "web.xml" ? Apart from compromising security, I think your definitely going to violate some standard there.
    As a general note: In the end, all xml files are parsed and converted to beans. XML files merely are a place holder for convenience. If required you can figure out the bean holding this information and accordingly change the info it.
    Alternatively if you're still persistent in adding this security information on your web.xml the only plausible way i can think of is old-school. Get a file writer and add/edit this info. But this idea is too crazy to even suggest.
    Best suggestion: Design your application in such a way, so as to pick the info from a DB and accordingly handle.
    Cheers,
    K

  • Security constraint in web.xml

    Hi All
    I want to set a security contraint to verfity my system user, I know I need to put the following section into the tomcat created web.xml. But I dont know where is the web.xml on my Tomcat 4.1.24, because i found many web.xml files in different directory.
    Q1) Sorry I know this is a silly question, but can u tell me which web.xml is the one I need to edit in order to set my the security constraint?
    Q2) Instead of editing the created Tomcat web.xml, can I create my own web.xml and put it in <Tomcat_Homw>/webapps/ROOT/WEB-INF. This is just only for the security constraint towards my system.
    Many many thanks
    Kelvin
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Administration</web-resource-name>
    <url-pattern>/admin</url-pattern>
    <url-pattern>/users</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>administrator</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/login</form-login-page>
    <form-error-page>/login-error</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>administrator</role-name>
    </security-role>

    you need to do it for every web-app... thats why there is one web.xml file for each! There is a thing in CATALINA_HOME/conf/server.xml that u can uncomment to enable 'single-logon' which means u cna log on once and be authenticated for every web-app...
    root isn't a web-app i don't think... so therefore u can't restrict access to it (someone correct me if wrong)... I don't know what u mean by restricting access to your 'system'

  • Automate creation of web.xml file for tomcat 4.1.29

    hi , this is with ref to Tomcat 4.1.29, if i am correct, each Servlet in the application has to be mentioned in the web.xml file for the Tomcat to know about it. Is there any way to automate the creation of web.xml file , depending on the contents of the Servlet folder of the application. Any way to escape from writing each Servlet name in web.xml file.
    rc

    Hello,
    Maybe you should check if you can use Ant tool to do
    that. I am not sure if it can help u.
    Zeph.
    http://ant.apache.org/
    It will, specially if used in conjunction with XDoclets :
    http://xdoclet.sourceforge.net/
    XDoclet has Ant tasks to generate web.xml files.

  • 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 get Context paramters out of Tomcat web.xml file

    The Documentation at Tomcat seems to suggest:
    Context initialization parameters that define shared
    String constants used within your application, which
    can be customized by the system administrator who is
    installing your application. The values actually
    assigned to these parameters can be retrieved in a
    servlet or JSP page by calling:
    String value =
    getServletContext().getInitParameter("name");
    Now I want to write a jsp, where the user enters his username and pwd, and this contacts a jdbc connection bean. I want to store the driver name in the web.xml file. Now can some1 please suggest a method as to how I can extract this (It ain't that straightforward as suggested in tomcat doumntation. You cannnot call the above method ithout Servlet Initialization (actually to say ithout HTTP Connection). I succeeded when I had written a servlet, but can some1 please suggest an alternative (bcoz othrwise just to extract that I am writing a servlet).
    Hope I am clear.
    Thanks in advance.

    Edit your web.xml file and add these entries,
    <context-param>
    <param-name>dbUrl</param-name>
    <param-value>jdbc:oracle:thin:@server5:1521:pl2java</param-value>
    </context-param>
    <context-param>
    <param-name>dbDriver</param-name>
    <param-value>oracle.jdbc.driver.OracleDriver</param-value>
    </context-param>
    Place the above entries in between your already existing <web-app> and </web-app> tags.
    Now in your jsp, you can use, <% application.getInitParameter(); %> and in servlet, getServletContext().getInitParameter();
    Hope this helps.
    Sudha

  • How can I disable automatic web translations?

    How can I disable automatic web translations? Like when I open up IMDb and see the movie titles automatically translated from English to Croatian?

    I had the same problem, then I changed the order of the languages in intl.accept_languages (about:config), so that the list now begins with en.
    It's all working properly know, also on imbb in particular.
    Cheers,
    Chris

  • AP801 admin status is disable automatically after router reload

    We've got cisco 887VGW with wireless AP801GN and registering to the controller 7510, 
    ap801 admin status is disable automatically after router reload.
    Is there any opportunity to fix it?
    AIR-CT7510-K9 os version: 7.6.100

    (Cisco Controller) >show sysinfo
    Manufacturer's Name.............................. Cisco Systems Inc.
    Product Name..................................... Cisco Controller
    Product Version.................................. 7.6.100.0
    RTOS Version..................................... 7.6.100.0
    Bootloader Version............................... 7.3.101.0
    Emergency Image Version.......................... 7.3.101.0
    Build Type....................................... DATA + WPS
    System Name...................................... CNDGIDCWLC01
    System Location..................................
    System Contact...................................
    System ObjectID.................................. 1.3.6.1.4.1.9.1.1295
    Redundancy Mode.................................. SSO (Both AP and Client SSO)
    IP Address....................................... 10.15.131.46
    System Up Time................................... 3 days 3 hrs 40 mins 22 secs
    System Timezone Location......................... (GMT +8:00) HongKong, Bejing, Chongquing
    System Stats Realtime Interval................... 5
    System Stats Normal Interval..................... 180
    Configured Country............................... Multiple Countries:CN,HK,TH,US
    --More-- or (q)uit
    Operating Environment............................ Commercial (10 to 35 C)
    Internal Temp Alarm Limits....................... 10 to 38 C
    Internal Temperature............................. +22 C
    Fan Status....................................... OK
    RAID Volume Status............................... OK
    State of 802.11b Network......................... Enabled
    State of 802.11a Network......................... Enabled
    Number of WLANs.................................. 2
    Number of Active Clients......................... 6
    Burned-in MAC Address............................ 64:9E:F3:65:2A:80
    Power Supply 1................................... Present, OK
    Power Supply 2................................... Present, OK
    Maximum number of APs supported.................. 300
    (Cisco Controller) >
    Cisco IOS Software, AP801 Software (AP801-K9W8-M), Version 15.2(4)JB3, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2013 by Cisco Systems, Inc.
    Compiled Wed 18-Dec-13 21:56 by prod_rel_team
    ROM: Bootstrap program is AP801 boot loader
    BOOTLDR: AP801 Boot Loader (AP801-BOOT-M) Version 12.4(23c)JX, RELEASE SOFTWARE (fc1)
    NST6839 uptime is 4 hours, 32 minutes
    System returned to ROM by power-on
    System image file is "flash:/ap801-k9w8-mx.152-4.JB3/ap801-k9w8-mx.152-4.JB3"
    Last reload reason:
    This product contains cryptographic features and is subject to United
    States and local country laws governing import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third-party authority to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. and local country laws. By using this product you
    agree to comply with applicable laws and regulations. If you are unable
    to comply with U.S. and local laws, return this product immediately.
    A summary of U.S. laws governing Cisco cryptographic products may be found at:
    http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
    If you require further assistance please contact us by sending email to
    [email protected].
    cisco AP801GN-A-K9 (PowerPC 8343) processor (revision B0) with 49142K/16384K bytes of memory.
    Processor board ID FGL164624AL
    PowerPC 8343 CPU at 400Mhz, revision number 0x0031
    Last reset from power-on
    LWAPP image version 7.6.100.0
    1 Gigabit Ethernet interface
    1 802.11 Radio
    32K bytes of flash-simulated non-volatile configuration memory.
    Base ethernet MAC Address: 70:CA:9B:2F:49:30
    Part Number                          : 73-11027-11
    PCA Assembly Number                  : 800-28807-11
    PCA Revision Number                  : B0
    PCB Serial Number                    : FOC1634C1G6
    Top Assembly Part Number             : 800-33059-04
    Top Assembly Serial Number           : FGL164624AL
    Top Revision Number                  : B0
    Product/Model Number                 : AP801GN-A-K9       
    Configuration register is 0xF

  • Security constraint in Web.xml of tomcat

    Hi
    I have a web-application running on tomcat . Inside the context folder i have several directories having some pre-defined configuration files . But the user is able to directly access them by typing the path including the fileName in the URL ( I have disabled the listings property however)
    How can i prevent accessing the specific files .... I tried using
    <security-constraint>
    <display-name>Security constarint</display-name>
    <web-resource-collection>
    <web-resource-name>Java Application</web-resource-name>
    <url-pattern>/folder/*</url-pattern>
    <auth-constraint>
    <role-name>tomcat</role-name>
    </auth-constraint>
    </web-resource-collection>
    <auth-constraint>
    <role-name>tomcat</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>OnJava Application</realm-name>
    </login-config>
    This seems to be working fine , but when the user enters the wrong security info thrice , 401 error page is coming instead i want my custom page . Hence i configured an error page for 401 code which overwrited the earlier behavaiour ie.. that BASIC authentication popup is not coming
    Can any one let me know how to go about this

    Hi ,
    I have tried adding the following into web.xml but the security feature just doesnt work and the user can go to any page without any restriction.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Declarative Security Test</web-resource-name>
    <url-pattern>/SuperServlet</url-pattern>
    <url-pattern>/*</url-pattern>
    <http-method>post</http-method>
    <http-method>get</http-method>
    </web-resource-collection>
    <user-data-constraint>
         <transport-guarantee>CONFIDENTIAL</transport-guarantee>
         </user-data-constraint>
    <auth-constraint>
    <role-name>guest</role-name>
    <role-name>member</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    </login-config>
    <security-role>
    <role-name>guest</role-name>
    <role-name>member</role-name>
    </security-role>
    The roles mentioned above have been added correctly into tomcat-users.xml..The version of tomcat I am using is tomcat5.0.28.Please help.

  • How to disable the reminding dialog when close the webi report viewer

    Dear all
    How to disable the reminding dialog when close the webi report viewer
    Background
    When user close the webi report viewer in inforview by click the button in the right-top of the webi report viewer frame. It always prompt a dialog to remind user that the modification will be lost without saving.
    But customer need to disable this dialog, and can clost the report viewer directly.
    So is there any ways to modify this?
    I think it shoule modify some .js file under tomcat, but can not find the solution.
    Thanks a lot, any information woulde be appreciated.
    David Zhang

    I've had the same issue bugging me since installing Snow, er, lion, er, cat, er, cougar, er, Mountain Lion. Incredibly ANNOYING.
    It's stupid stuff like this and reverse scrolling that really turn long-timer users off. I'm personally glad Forstall got fired for blunders such as these.
    I'm serious peeved that turning off iCloud Documents & Data actually deletes documents and data locally. That's just incredibly stupid.
    MANY thanks mende1 for the answer on how to fix it.

  • How to setup web.xml files in Tomcat 4.0.6

    Hi, I'm to new to Java Servlets. i am trying to run my first servlet but it's not showing up..can anyone help me out please!!!
    I created a folders like this:
    webapps/sumitapps/WEB-INF\classes\Forms\login.class
    under sumitapps: i'm puttin all of my .html files(Logins.html)
    under WEB-INF: i put web.xml file and classes folder
    <?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>
    <servlet>
    <servlet-name>login</servlet-name>
    <servlet-class>Forms.login</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>login</servlet-name>
    <url-pattern>/Forms.login</url-pattern>
    </servlet-mapping>
    </web-app>
    <Context path="/sumitapps" docBase="webapps/sumitapps" crossContext="true" debug="0" reloadable="true" trusted="false" >
    </Context>
    under my classes folder i put folder Forms where i'm keeping all of my .class files. my class file name is login.class
    can anyone tell me why i cant run my servlets
    <FORM method="POST" action="Forms.login"
    name=userinfo onsubmit="return checkData()">
    please help me out here
    i can access my html page like this:
    http://lcoalhost:8080/sumitapps/Logins.html
    but when i enter userid and password it doesnt show anything..it takes me to http://localhost:8080/sumitapps/Forms.login
    and shows cannot be displayed

    have a look at www.moreservlets.com. There you can find a free pdf (part of the book, a whole chapter) that explains in deep the use of web.xml.

Maybe you are looking for

  • How do I set up and partition a new HD ?

    If I put a new HD into an old machine, will it just offer me the option to partition it after it powers on, or do I have to do something more technical to partition that drive. I am under the impression that having a large HD partitioned will help me

  • One line item delivery for 3rd party sales order

    Hello Experts, We have configured a 3rd party sales order process where the PR gets created. We are using scheduling agreement(PO) and creating Schedule line and doing a GR for partial line items.  The stock is recieved as a Sales Order stock. But wh

  • Acrobat 9's PDF Printer prints pages individually (W7x64)

    Hello, I have a user that tries to print a document using Acrobat 9's PDF Printer. Despite specifying to print the whole document, the printer prompts a save location for each page of the document. This is done from Excel 2010 Pro Plus with the OS Wi

  • Reinstall previosly purchased product onto new device

    I downloaded and installed Photoshop Elements 10 onto my laptop last Aug.  I just got a new laptop and want to move Element 10 to new device.  I backed-up my photos and uninstalled the program.  Now I can't a link to upload my previous purchase on th

  • Problems enabling nfs client and server

    I just re-build a solaris 11.1x86 on a x4640 SunFire Have problems enabling nfs First i typed the following command: # svcs network/nfs/server disable Second I typed the following command: #svcadm enable network/nfs/server # svcs network/nfs/server o