How to modify web.xml init parameters?

Hi all!
I need to modify my application's init parameters on the fly.
I think that if i can get those parameter through FacesContext, then i should can set them too.
Anybody knows if it is possible ou how to do it?
Thanks,
Cezar

Hi all!
I need to modify my application's init parameters on the fly.
I think that if i can get those parameter through FacesContext, then i should can set them too.
Anybody knows if it is possible ou how to do it?
Thanks,
Cezar

Similar Messages

  • Web-inf\web.xml init parameters

    Hi,
    I use several servlets/JSPs which are using common init parameter, is there a way to specify that some init parameters are common or must I write all the parameters for all of my servlets/JPSs ?
    Thanks

    yah that's what I mean, have your parameters in your web.xml file and have a Servlet read them when the application starts up (using ServletConfig). Then you put the values into the application scope where all the JSPs and Servlets can read them. So lets say you specify a parameter called "html-path" with a value of "/www/html/" you could read this in your JSPs like this:
    String htmlPath = application.getAttribute("html-path");I can't remember how to do his off-hand but I know it works.

  • JSF 1.2 web.xml configuration parameters

    Actually, I know these JSF 1.2 web.xml configuration parameters:
    javax.faces.CONFIG_FILES
    javax.faces.DEFAULT_SUFFIX
    javax.faces.LIFECYCLE_ID
    javax.faces.STATE_SAVING_METHOD
    Are there any more available?
    (I have to study its performance implications in conjunction with RichFaces ones).

    The JSF 1.2 specification document would contain the information you're looking for.

  • How to generate web.xml automatically?

    Hi all!
    I am new to servlets. I have configured the tomcat 5.5.9 with eclipse 3.0 succussfully. It is generating the class files. But I want to know how to generate web.xml through it.
    Thanks in advance...
    Code Snooker

    AFAIK, there's no template for generating web.xml.
    Navigate to <TomcatInstallDir>/webapps/
    You would find lot of directories - each one being a web application.
    Navigate to any one, say ROOT and then to the WEB-INF directory
    under that.
    You would find a web.xml.
    Copy it into your <web-application-dir>/WEB-INF folder and make necessary changes
    cheers,
    ram.

  • How should my web.xml be ?

    Hi,
    I have a servlet application. In my application, I make a call to my servlet through my index.html as follows:
    <Form Action="/greeting/servlet/GreetingServlet" method="POST">
    I also pass the values "name" and "email" through index.html
    I have my servlet located at "D:\Amith\Servlet Applications\greeting\WEB-INF\classes"
    I have added following lines in my server.xml
    <Context path="/greeting" docBase="D:\Amith\Servlet Applications\greeting">
    </Context>
    The application runs fine with Tomcat 3.3.2 without web.xml
    But when i try to run the application with Tomcat 5.0.24, I get the error
    "HTTP Status 404 - /greeting/servlet/GreetingServlet"
    Can anyone help me with this. Should i have web.xml for this. If yes, how should my web.xml be ?
    Please help, I am unable to solve this problem from a very long time. I am really struck !!!
    Thanks,
    ammi

    <web-app xmlns = "http://java.sun.com/xml/ns/j2ee" version = "2.4">
    <servlet>
         <servlet-name>GreetingServlet</servlet-name>
         <servlet-class>project.image.DynamicImageServlet</servlet-class>
    </servlet>
    <servlet-mapping>
         <servlet-name>GreetingServlet</servlet-name>
         <url-pattern>/greeting/servlet/GreetingServlet</url-pattern>
    </servlet-mapping>
    </web-app>the servlet-class tag should contain the package where your servlet .class file is held. Just omit my one

  • How to deploy web.xml in OAF to server?

    Hello,
    Currently i used oracle 9i jeveloper to develop OAF page for EBS 11.5.10
    based on requirement, i need create a new JSP file and change default web.xml file in jeveloper. Who can help how to deploy new web.xml to server? Thank you very much!
    Added following code to web.xml
    ---web.xml------------
    <servlet>
    <servlet-name>barbecue</servlet-name>
    <servlet-class>net.sourceforge.barbecue.BarcodeServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>barbecue</servlet-name>
    <url-pattern>/CreateBarCode</url-pattern>
    </servlet-mapping>
    -----------------------------------

    Anyone know how to deploy web.xml in local jeveloper to server? thanks a lot!

  • How to Modify Server.xml and web.xml inTomcat

    Hii
    i am very new to tomcat..and using servlets..so plx tell me hw i can modify the server.xml and web.xml....
    if my installables are in c:\program files\apache group\tomcat4.1
    ok...i have my servlets file in c:\program files\apache group\tomcat4.1\webapps\ap1\WEB-INF\classes..so plz advice me on modifying the server.xml and web.xml....also tell me how and what we do in mapping
    Plz tell me soon...
    thanking u in advance.
    rahul
    Take care.:)

    for web.xml you need something like this, i took this from the web.xml under the examples directory in tomcat:
    <?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>
    servletToJsp
    </servlet-name>
    <servlet-class>
    servletToJsp
    </servlet-class>
    </servlet>
    <servlet>
    <servlet-name>
    CompressionFilterTestServlet
    </servlet-name>
    <servlet-class>
    compressionFilters.CompressionFilterTestServlet
    </servlet-class>
    </servlet>
    </web-app>
    basically you need to map the servlet with a class, for servlet-name call it whatever you like, you'll be using this name in the url to access you servlet, for the class give it the name of the class, java complied class, that's it.
    server.xml is used to configure tomcat.

  • Modifying web.xml in Weblogic

    Hi, I'm deploying an application written in JDeveloper 11.1.1.2.0 to Weblogic 10.3.2.
    I'm trying to edit the web.xml file of the application. I tried to edit it here:
    c:\Oracle\Middleware\user_projects\domains\uat_domain\servers\AdminServer\tmp\_WL_user\DrawingManagement\2ubcsw\war\WEB-INF\web.xml
    However, any changes are not reflected in the application even though I have restarted Weblogic. However, when I change the values in JDeveloper and then deploy to Weblogic, the values are reflected in the web.xml defined above.
    Is Weblogic caching this web.xml? If so, how do I modify it?
    Edited by: Sean Ong on Aug 8, 2010 9:11 PM

    Hi,
    If you will try to edit the "web.xml" from the following Location: c:\Oracle\Middleware\user_projects\domains\uat_domain\servers\AdminServer\tmp\_WL_user\DrawingManagement\2ubcsw\war\WEB-INF\web.xml
    Then it will not be reflected. Because as soon as you deploy your Application on WebLogic it Reads the "web.xml" *(At Deploy time Once)* and keeps it in Memory. So if you really want to change the Deployment descriptor then You will need to redeploy the Application after editing it inside your JDeveloper project it self.
    Or as an alternative you can use the "plan.xml" feature of weblogic to change the DDs...like: http://forums.oracle.com/forums/thread.jspa?threadID=1107834&tstart=0
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are Here)

  • Dynamically modifying web.xml

    Hi,
              I am trying to write code that will dynamically add a servlet definition to a deployed application. ie, the deployment descriptor is dynamically edited. In Tomcat, I am able to edit the web.xml file(when the app is exploded) or I can edit the in memory copy and produce a servlet definition on the fly
              I am trying to do the same of Weblogic 8.1. Everything is straightforward as long as the app is exploded, in which case I simply edit the web.xml file..when the app is not exploded, this is not possible. I tried using MBeans to see if I can add a servletRuntimeMBean to a deployed application, but this does not seem possible..looks like these beans are instantiated by the container and there is no handle for developers to create instances of these beans. I was wondering if it was possible to edit the in memory copy of web.xml that the servlet container records. Any suggestions in this regard would be highly welcome
              Thanks, and sorry for the lengthy email!
              Ram

    <taglib>
         <taglib-uri>/mytags</taglib-uri>
         <taglib-location>/mytags.tld</taglib-location>
    </taglib>That means that your tag libaray definition is located at /root/mytags.tld. Some people put them in the WEB-INF, which would make it /root/WEB-INF/mytags.tld.
    The taglib-uri is how you are going to reference it in your JSP. With the above setup, here is how you would reference in your JSP
    <%@ taglib uri="/mytags" prefix="myTagPrefix" %>
    <myTagPrefix:mySpecialTag/>
    Hope this helps.

  • Modifying web.xml for a custom tag

    Hello all, I'm trying to create a custom tag, and I'm having trouble trying to understand some elements of web.xml. Can someone tell me in detail what <taglib-uri> is? I know <taglib-location> is the directory where the .tld file is stored.
    Also, is there anywhere online where I could find out more about the different compinents of web.xml? (I can't find any good websites).
    Thanks a lot.

    <taglib>
         <taglib-uri>/mytags</taglib-uri>
         <taglib-location>/mytags.tld</taglib-location>
    </taglib>That means that your tag libaray definition is located at /root/mytags.tld. Some people put them in the WEB-INF, which would make it /root/WEB-INF/mytags.tld.
    The taglib-uri is how you are going to reference it in your JSP. With the above setup, here is how you would reference in your JSP
    <%@ taglib uri="/mytags" prefix="myTagPrefix" %>
    <myTagPrefix:mySpecialTag/>
    Hope this helps.

  • How to reupdate web.xml

              hi,
              I downloaded WLS 6.0, W2K for testing.
              Whenever I updated web.xml for my new servlets, I need to stop and restart weblogic
              server.
              Is there any way for weblogic to detect that web.xml had changed and updated accordingly
              or command line to trigger update in web.xml?
              thanks.
              - yoke
              

              An application or application component can be dynamically redeployed while the server is running. This may be useful if you want to update a deployed application or application component without stopping and restarting the WebLogic Administration Server. To dynamically redeploy a JAR, WAR or EAR file, simply copy the new version of the file over the existing file in the /applications directory.
              You can also dynamically redeploy applications or application components that have been deployed in exploded format. When an application has been deployed in exploded format, the Administration Server periodically looks for a file named REDEPLOY in the exploded application directory. If the timestamp on this file changes, the Administration Server redeploys the exploded directory.
              If you want to update files in an exploded application directory, do the following:
              1. When you first deploy the exploded application, create an empty file named REDEPLOY in the directory where the exploded application resides.
              2. To update the exploded application, copy the updated files over the existing files in that directory.
              3. After copying the new files, touch the REDEPLOY file in the exploded directory to alter its timestamp.
              When the Administration Server detects the changed timestamp, it redeploys the contents of the exploded directory.
              yoke <[email protected]> wrote:
              > thanks for the doc link.
              > In figure 6.1, it said that I should be able to see the "Configuration->application".
              > However, I had only see the following tabs under configuration:
              > General, Cluster, HTTP, SSL, Tuninh, Protocols, Compilers.
              > I don't have "application" tab, how can I bring out the application tab?
              > thanks.
              > - yoke
              > Dimitri Rakitine <[email protected]> wrote:
              >>http://e-docs.bea.com/wls/docs60/adminguide/appman.html#1027432
              >>
              >>yoke <[email protected]> wrote:
              >>
              >>> hi,
              >>
              >>> I downloaded WLS 6.0, W2K for testing.
              >>> Whenever I updated web.xml for my new servlets, I need to stop and
              >>restart weblogic
              >>> server.
              >>
              >>> Is there any way for weblogic to detect that web.xml had changed and
              >>updated accordingly
              >>> or command line to trigger update in web.xml?
              >>
              >>> thanks.
              >>
              >>> - yoke
              >>
              >>
              >>--
              >>Dimitri
              Dimitri
              

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

  • How to transport web xml content in portal

    Hi Everyone,
    I have created web xml content in my dev portal which has user messages.Now i wanr to transport all these to QA portal.i have transported all the content using KM content transport procedure. i even transported /etc/xmlforms.
    now if i check in QA portal i can see all the message links but when i click these links,a window pops up with XML code of that particular form instead of that message.
    Is there anything which i have forgotten or which needs to be done.
    Please do the needful.
    Thanks and Regards,
    Atul Dumbre.

    Hi Mikhail,
    Thanx a ton for your reply.
    My problem has been solved and now i can see all the web xml forom content in my QA Portal.
    But now my problem is that when i edit or create new message in my QA Portal it doesnt reflect in my User message area or in the messages list.
    Could you please help me out with that
    Thanks and Regards,
    Atul Dumbre
    Edited by: AtulDumbre on Jun 8, 2011 7:47 AM

  • How to edit web.xml deployment descriptor from console in weblogic 8.1?

    In weblogic 7.0, deployment descriptor such as web.xml can be edited from the admin
    console, but on weblogic 8.1 I can't find a way to do so.
    Is this function taken out? Why is it taken out? Do I have an alternative to edit
    it without unpacking and packing the EAR or WAR?
    Thanks in advance.
    Bill

    In weblogic 7.0, deployment descriptor such as web.xml can be edited from the admin
    console, but on weblogic 8.1 I can't find a way to do so.
    Is this function taken out? Why is it taken out? Do I have an alternative to edit
    it without unpacking and packing the EAR or WAR?
    Thanks in advance.
    Bill

  • Re: how to recover web.xml after editing by word?

    Do you seriously think that there's a way to reconstruct the full XML from these tiny pieces of information? One can guess, but it builds down to re-writing the web.xml
    Your best bet is to get the last version of that file from your [version control system|http://en.wikipedia.org/wiki/Revision_control]. You surely use one, right? And if you don't, then you now know why you should be using one.

    xzeng wrote:
    Thanks. Fortunately I got a web.xml with similar format from other's folder.
    It is terrible. All the tabs in web.xml are missing and changed into microsoft word's tabs. Be careful.We are. We would never ever ever use Word as a text editor and we use a version control system.

Maybe you are looking for