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.

Similar Messages

  • Dynamically Modifying Target XML Namespace

    Dear All,
    We have a requirement of dynamically modifying the namespace of the target XML   . The scenario is as follows:
    There are multiple recipients of a message, and two of the recipients are using the same target structure, but with a different XML namespace. We are catering to the different receivers using different interfaces, but because these two recipients are using the same Target message type, hence they can only point to any one namespace (the XML namespace mentioned in this target message type). For example, the required target messages look like:
    Message expected at recipient 1:
    <ns0:root xmlns:ns0="http://target1.com">
    <tagA/>
    <tagB/>
    <tagC/>
    </ns0:root>
    Message expected at recipient 2:
    <ns0:root xmlns:ns0="http://target2.com">
    <tagA/>
    <tagB/>
    <tagC/>
    </ns0:root>
    Obviously, we can only create one message type with name root, and that can point to only 1 namespace. However, we need 2 different namespaces, based on the input payload. For example, if a flag in the input has a value 1, we set the namespace as "http://target1.com"; if it has value 2, we set the namespace as "http://target2.com". We are thinking of dynamically deriving the namespace at the time of mapping, but can not figure out a way to do so. We are currently using Graphical Mapping for one of the recipients; do we have to employ XSLT/ABAP mapping to achieve this? Has anybody done a work around this kind of a problem?
    Awaiting Answers.
    Thanks and Sincere Regards,
    Sid

    Hi Peter,
    Thanks for replying. Unfortunately, we are using PI 7.01 and not PI 7.1. Any other ideas?
    Nice blog though!
    P.S: Obviously, we could use 2 different interfaces pointing to the same message type, essentially creating two different communication channels towards the 2 receivers, and modify the payload within these channels using some Adapter Modules. However, this solution looks rather like firing a cannon to kill a fly, and I surely hope PI does have some other capabilities to achieve this using a single interface and single comm channel, which I do not know of (digging through help.sap right now), or can not think of right now.
    Thanks and Regards,
    Sid

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

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

  • Can a web.xml include another web.xml ?

    The application i am working at has alot of servlets and i was wondering if i can put some order in my web-app by separating my web.xml in different smaller web.xml's ?

    I can sympathize with you as far as the readability goes.
    I know that Tomcat 4 provides a GUI that's intended to make editing server and container level XML files a lot easier, but I'm not certain if it handles application level XMLs too. I think it's safe to say that version 5 will probably either support modifying web.xml files through the GUI or someone will make that feature available through an add-on module.
    In the meantime, the length of the XML doesn't affect Tomcat. I would just put up with it until the tool comes along.

  • XCM configuration path in web.xml file

    Hi,
    Here is a requirement that all the XCM configuration files are stored at local desktop(like QAT, PRD..), and need to use them by modifying web.xml.
    Please let me know at
    1)which web.xml tag the path of XCM confiuration files to be specified.
    2) specify the names of the XCM files for configuration to be put in that folder.
    Thanks,
    Devender V

    Hi,
    1)which web.xml tag the path of XCM confiuration files to be specified.
    Try to find below lines in your web.xml
    <context-param>
            <param-name>path.xcm.config.isa.sap.com</param-name>
            <param-value>/WEB-INF/xcm/sap/system/bootstrap-config.xml</param-value>
            <description>Turns the Extended Configuration Management on if a
                path to the configuration file is specified. It is a
                relative path, with context-root of web application as root</description>
        </context-param>
    bootstrap-config.xml file contains XCM configuration related XML file path. You can modify or extend this file and give your user Define path.
    Also you can find below line in web.xml file.
    <!-- Action Servlet Configuration -->
        <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>com.sap.isa.core.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/config.xml,/WEB-INF/xcmadmin-config.xml,/WEB-INF/ccmsims-config.xml,/WEB-INF/ipc-config.xml,/ipc/customer/config.xml,/WEB-INF/config_lwc_b2b.xml,/WEB-INF/scheduler-config.xml,/WEB-INF/ipcpricing-config.xml</param-value>
            </init-param>
            <init-param>
                <param-name>config/user</param-name>
                <param-value>/WEB-INF/config_user.xml</param-value>
            </init-param>
            <init-param>
                <param-name>config/dealerlocator</param-name>
                <param-value>/WEB-INF/config_dealerlocator.xml</param-value>
            </init-param>
            <init-param>
                <param-name>initconfig</param-name>
                <param-value>/WEB-INF/xcm/sap/system/init-config.xml</param-value>
            </init-param>
    I hope this will help you.
    eCommerce Developer

  • Overriding web.xml using Plan.xml

    Hi,
    I want to override certain values (MAX_ROW_FETCH_SIZE)  in web.xml using Plan.xml for a servlet deployed on weblogic server.
    My web.xml looks like this.
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             version="2.5">
      <servlet>
        <servlet-name>trial</servlet-name>
        <servlet-class>oracle.apps.cmi.sv.fwk.webui.trial</servlet-class>
        <init-param>
          <param-name>MAX_ROW_FETCH_SIZE</param-name>
          <param-value>50</param-value>
        </init-param>
        <init-param>
          <param-name>JDBC_MAX_FETCH_SIZE</param-name>
          <param-value>20</param-value>
        </init-param>
      </servlet>
      <servlet-mapping>
        <servlet-name>trial</servlet-name>
        <url-pattern>/trial</url-pattern>
      </servlet-mapping>
    </web-app>
    My Plan.xml looks like this
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd">
      <application-name>SPUF</application-name>
      <variable-definition>
        <variable>
          <name>SessionDescriptor_timeoutSecs_13708393894780</name>
          <value>3602</value>
        </variable>
        <variable>
          <name>MAX_ROW_FETCH_SIZE</name>
          <value>3</value>
        </variable>
        <variable>
          <name>JDBC_MAX_FETCH_SIZE</name>
          <value>2</value>
        </variable>       
      </variable-definition>
      <module-override>
        <module-name>SPUF.war</module-name>
        <module-type>war</module-type>
        <module-descriptor external="false">
          <root-element>weblogic-web-app</root-element>
          <uri>WEB-INF/weblogic.xml</uri>
          <variable-assignment>
            <name>SessionDescriptor_timeoutSecs_13708393894780</name>
            <xpath>/weblogic-web-app/session-descriptor/timeout-secs</xpath>
          </variable-assignment>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>web-app</root-element>
          <uri>WEB-INF/web.xml</uri>
          <variable-assignment>
            <name>MAX_ROW_FETCH_SIZE</name>
            <xpath>/web-app/servlet/init-param/[param-name="MAX_ROW_FETCH_SIZE"]/param-value</xpath>
            <operation>replace</operation>
          </variable-assignment>
          <variable-assignment>
            <name>JDBC_MAX_FETCH_SIZE</name>
            <xpath>/web-app/servlet/init-param/[param-name="JDBC_MAX_FETCH_SIZE"]/param-value</xpath>
            <operation>replace</operation>
           </variable-assignment>                     
        </module-descriptor>
        <module-descriptor external="true">
          <root-element>wldf-resource</root-element>
          <uri>META-INF/weblogic-diagnostics.xml</uri>
        </module-descriptor>
      </module-override>
      <config-root>/home/oracle/ebssdk2</config-root>
    </deployment-plan>
    I can see new value reflected for "Session TimeOut" for service configuration.
    However when I use service to query certain data while considering "MAX_ROW_FETCH_SIZE" parameter, It is still querying 50 rows (Value in web.xml) at a time instead of 3 (As defined in Plan.xml)
    I am using servlet init method to get init parameters in my java file.
    Can someone help me to overcome from this issue or have any suggestion?

    You could use Apache Ant and create 2 separate WAR files , one for development and one for production.
    Normally I don't create a WAR file for the development environment. WAR file is made only for production.
    This is how my Ant task runs currently.
    1) For the development environment the ant task runs only to compile Java classes and nothing else, web.xml is that for development environment.
    2) When the app is ready for production , I run Ant to copy all files from my dev folder to a temporary build folder - during this copy I filter out the .java files (since there's no longer a need for them in production) only class files are moved.
    3) Then I treat the above temporary folder as the source folder, and run the Jasper pre-compiler which significantly alters the web.xml file .
    But the good part is that my original development web.xml stays unaltered since it is in it's own folder.
    4) Then finally I run a WAR task on the processed contents of the temporary build folder which contains the modified web.xml
    This way each environment has it's own web.xml .

  • WAR Deployment and overriding web.xml

    Hi there,
    I've been racking my brains out trying to determine if it is possible to override specific declarations of my WAR file's web.xml without actually mutating it.
    I have a web application contained in a WAR and want to simply copy it to the webapps folder of my container and then maintain another file that overrides the web.xml's servlet/init-param declarations. The web.xml that is part of the WAR is development specific and I want to declare production information without upsetting the WAR file.
    Am I barking up the wrong tree i.e. going about this all-wrong - is there a "J2EE way" of overriding WAR file declarations?
    Thanks for any help.
    Cheers,
    -C

    You could use Apache Ant and create 2 separate WAR files , one for development and one for production.
    Normally I don't create a WAR file for the development environment. WAR file is made only for production.
    This is how my Ant task runs currently.
    1) For the development environment the ant task runs only to compile Java classes and nothing else, web.xml is that for development environment.
    2) When the app is ready for production , I run Ant to copy all files from my dev folder to a temporary build folder - during this copy I filter out the .java files (since there's no longer a need for them in production) only class files are moved.
    3) Then I treat the above temporary folder as the source folder, and run the Jasper pre-compiler which significantly alters the web.xml file .
    But the good part is that my original development web.xml stays unaltered since it is in it's own folder.
    4) Then finally I run a WAR task on the processed contents of the temporary build folder which contains the modified web.xml
    This way each environment has it's own web.xml .

  • How do you modify the web.xml to lock down the pages from a user role

    how do you modify the web.xml to lock down the pages from a user role

    I'll make a stab at your question:
    The following is an example of where a URL is protected within a web.xml deployment descriptor. In this example, the URL /protectedA within the application is protected:
    <!-- security constraints -->
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>protectedA</web-resource-name>
    <url-pattern>/protectedA</url-pattern>
    </web-resource-collection>
    <!-- authorization -->
    <auth-constraint>
    <role-name>sr_developer</role-name>
    </auth-constraint>
    </security-constraint>
    Sun's explaination here:
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Security4.html

  • Dynamically building web content using XML file(s)

    Hello All!
    I was recently tasked with a project to design a monitoring web application for our "in-house" built web applications. There is a certain set of modules and parameters that we need to monitor: GSLB --> Web Tier --> App Tier --> Database.
    Almost all (80%) of our applications share the same parameters that need to be monitored, but there are about a hundred of them. So here is what I'm thinking of doing....
    1. Create an XML document for each application (An example layout is included at the end of this post) and save it in the Applications directory.
    2. Setup a Spring Framework project, and create code to dynamically go through the Applications directory and kick-off the monitoring logic for each <application/> item. Basically, the code will just traverse through all of the xml files (I might even create just 1 xml file with all of the <application/> items in it), read the "metadata" for each application, and start the backend processing, as well as display the data in a dynamically-generated web GUI (based on the XML structure and data).
    Again, most of our applications (80%) have the same modules/parameters, therefore adding an application would only require us adding another <application/> element to the already-existing xml document (or adding an additional XML document). The code would do the rest...In regards to the rest 20% of applications, I would create a customize XML document with additional metadata (the code, in that case, would be able to handle the additional metadata).
    So here are my questions:
    1. What do you think of the idea itself? I'm sure that I'm not the only one who's thought of this, so are there any best-practices in this regard?
    2. The reason I thought of using Spring is that it is XML-based (there are many reasons for me using Spring actually -- Security, ORM integration, etc), and it might facilitate my efforts. I'm thinking that even if reading through the Applications directory isn't such a good idea, I can somehow utilize Spring's dependency injection & AOS to create the appropriate solution. Have anybody tried this before and willing to share ideas, implementation approach, etc?
    3. Other than Spring, what might help me accomplish this task?
    4. Is this feasible (from a time and effort stand-point), or should I just do it the old-fashioned way?
    Thanks in advance!
    Vladimir
    I am including a sample (very rough-draft) XML file of what the input might look like:
         <applications>
              <application name="Remote Application">
                   <vip>somethingUNIQUE.mycompany.com</vip>
                   <sys-level>LAB</sys-level>
                   <lb-type>GTM</lb-type>
                   <farms>
                        <farm name="Farm 1" id="1">
                             <member-name>sslname.mycompany</member-name>
                             <ip-address>34.34.24.242</ip-address>
                             <application-servers>
                                  <application-server name="Some Name1">
                                       <ip-address>
                                            34.983.238.32
                                       </ip-address>
                                  </application-server>
                                  <application-server name="Some Name 2222">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </application-server>
                                  <application-server name="Some Name 3425">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </application-server>
                             </application-servers>
                             <web-servers>
                                  <web-server name="Some Name1">
                                       <ip-address>
                                            34.983.238.32
                                       </ip-address>
                                  </web-server>
                                  <web-server name="Some Name 2222">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </web-server>
                                  <web-server name="Some Name 3425">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </web-server>
                             </web-servers>
                        </farm>
                        <farm name="Farm 2" id="2">
                             <member-name>sslvpn01.downingtown</member-name>
                             <ip-address>34.34.24.250</ip-address>
                             <application-servers>
                                  <application-server name="Some Name 3425">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </application-server>
                             </application-servers>
                             <web-servers>
                                  <web-server name="Some Name1">
                                       <ip-address>
                                            34.983.238.32
                                       </ip-address>
                                  </web-server>
                                  <web-server name="Some Name 3425">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </web-server>
                             </web-servers>
                        </farm>
                   </farms>
              </application>
              <application name="Tech Tools">
                   <vip>technicalUNIQUE.tools.mycompany.com</vip>
                   <sys-level>LAB</sys-level>
                   <lb-type>GTM</lb-type>
                   <farms>
                        <farm name="Farm 1" id="1">
                             <member-name>tools.tech</member-name>
                             <ip-address>34.34.24.214</ip-address>
                             <application-servers>
                                  <application-server name="Some Name 2222">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </application-server>
                                  <application-server name="Some Name 3425">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </application-server>
                             </application-servers>
                             <web-servers>
                                  <web-server name="Some Name1">
                                       <ip-address>
                                            34.983.238.32
                                       </ip-address>
                                  </web-server>
                                  <web-server name="Some Name 2222">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </web-server>
                             </web-servers>
                        </farm>
                        <farm name="Farm 2" id="2">
                             <member-name>tools.tech222</member-name>
                             <ip-address>34.34.24.415</ip-address>
                             <application-servers>
                                  <application-server name="Some Name1">
                                       <ip-address>
                                            34.983.238.32
                                       </ip-address>
                                  </application-server>
                                  <application-server name="Some Name 2222">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </application-server>
                                  <application-server name="Some Name 3425">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </application-server>
                             </application-servers>
                             <web-servers>
                                  <web-server name="Some Name1">
                                       <ip-address>
                                            34.983.238.32
                                       </ip-address>
                                  </web-server>
                                  <web-server name="Some Name 2222">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </web-server>
                                  <web-server name="Some Name 3425">
                                       <ip-address>
                                            34.343.248.32
                                       </ip-address>
                                  </web-server>
                             </web-servers>
                        </farm>
                   </farms>
              </application>
         </applications>

    Hello jschell!
    Again, the question was more about the overall architecture and design rather than monitoring implementation.
    So here is what I have now:
    1. A spring application that will do the following:
    Read in the "architecture.xml" file (a portion is shown below). This file will dictate not only the type of monitoring but also the layout (explained later).
    The architecture.xml is marshalled to entity objects -- Model (s), with nested Model "children"
    This array of Model(s) is what the server-side application will use to populate the monitoring parameters.
    When the Impl gets a hold of the Model(s), it traverses through all of these entities and does whatever processing it needs to do (Health check, routing check, etc), and produces Item(s) objects, which are similar in structure to the Model(s) entities, but have actual values that need to be displayed on the front-end. Each item might have an array of other, children, Item(s)
    2. A GWT application asks for the Items array, and displays them on the front-end.
    What I did already:
    *1. Created a base Spring project that accepts GWT requests and returns a set of Item(s) (statically-generated, since I don't have the proper Impl yet).*
    *2. Created the GWT project and the layout. GWT communicates with the Spring app (which runs on tomcat for now) and upon retrieving the Item(s) it recursively renders them into displayable items, with different background, borders colors, width, etc (based on the populated values and their nested children, if any) . The last code snippet is the definition of the Item class.*
    Basically, the architecture is setup and the next step is the actual implementation of the monitoring and routing logic -- which wasn't the point of this post, since I already did most of it for a different project :)
    Thanks for the replies though....
    Vladimir
    <serviceView name="YYYYYYYY XXXX">
         <item layout="vertical">
              <!-- The top level application name -->
              <item name="Routing XXXXXXX  (RX)"/>
              <!-- The GSLB name and Active Farms printout -- Work in Progress-->
              <item  name="RX GSLB - xxxxxxx.xx.xxxxxxxx.com" layout="vertical">
                   <dynamicText type="gslb_farms">
                        <param name="vip" value="xxxxxxxx.xx.xxxxxxxxx.com"/>
                   </dynamicText>
              </item>
              <!-- The farms Row -->
              <item layout="horizontal">
                   <!-- The 1st Farm -->
                   <item name="Farm 1" layout="vertical">
                        <operationalState name="xxxxxxx.xx.yyyyyyy.com" type="gslb_farm">
                             <param name="vip" value="activate.g.comcast.com"/>
                             <param name="farmName" value="RX.WT.F1.VIP">
                        </operationalState>
                        <hc name="RX.WT.F1.VIP" type="poller"/>
                        <!-- DataCenter name -->
                        <item name="PDX" value="PDX"/>
                        <!-- Web Tier -->
                        <item layout="horizontal">     
                             <item name="WEB1" description="WEB1" detailedView="someservice_level_xmlname.xml">
                                  <hc name="RE.WT.F1.rdw01" type="poller"/>
                             </item>
                             <item  name="WEB2">
                                  <hc name="RE.WT.F1.rdw02" type="poller"/>
                             </item>
                        </item>
    public class Item implements Serializable{
         private static final long serialVersionUID = 1L;
         public final static String _ROUTING_STATUS_ENABLED = "_ROUTING_STATUS_ENABLED";
         public final static String _ROUTING_STATUS_DISABLED = "_ROUTING_STATUS_DISABLED";
         public final static String _ROUTING_STATUS_UNKNOWN = "_ROUTING_STATUS_UNKNOWN";
         public final static String _HEALTH_STATUS_GOOD = "_HEALTH_STATUS_GOOD";
         public final static String _HEALTH_STATUS_BAD = "_HEALTH_STATUS_BAD";
         public final static String _HEALTH_STATUS_UNKNOWN = "_HEALTH_STATUS_UNKNOWN";
         // This is what will be printed out -- the static text
         private String name = null;
         // If detailedView is not empty, then a link for this item shows up
         // that opens up a Dialogue Box
         private String detailedView = null;
         // If detailedView is not empty, then a link for this item shows up
         // that opens up a completely new Service View
         private String serviceView = null;
         // Layout Information
         private boolean verticalLayout = true; // VERTICAL or HORIZONTAL
         // Coloring Information
         private String routingStatus = _ROUTING_STATUS_UNKNOWN; // ENABLED, DISABLED, UNKNOWN
         private String healthStatus = _HEALTH_STATUS_UNKNOWN; // HEALTHY or NOT-HEALTHY
         // Children
         private Item children[] = null;

  • Making changes in web.xml dynamically

    Hi all,
    I have a requirement in which i need to redirect request to com site if it is from desktop browser and to WAP site if request for wap site or from a mobile device
    Have servlet ready doing it but presently taking only to two harcoded URLS of .com and .mobile sites.in web.xml.
    Now i want dynamic changes in web.xml through a servlet to changes those URLs to respective request.
    Thanks in advance,
    dcosta_halo

    The web.xml file is only a data storage file. When a Java Web Server starts up, it read the web.xml file and creates the appropriate objects that live in the JVM and manage parts of the applications hosted by the server. Any changes to the web.xml data file while the server is running are lost once the server is turned off. You need to figure out another design, possibly having the servlet read a database table to get URL strings.

  • Modifying Infoview web.xml

    i am modifying infiview web.xml but changes are not reflectin.
    just to test i changed home page to say aaa.com and restarted server.
    it should throw error but it is not...anybody can help me?
    thanks
    in advance

    i have developed a java web application and i am able to login through enterprise but not through windows Ad . for that i was making some changes in web .xml but nothing was happening so i tried to change the home page so that i can see changes are reflecting.
    I made changes in \Tomcat55\webapps\InfoViewApp\WEB-INF\web.xml
    <!-- The default home page -->
        <context-param>
            <param-name>homepage.default</param-name>
            <param-value>/jsp/listing/home.jsp</param-value>    </context-param>
    instead of <param-value>/jsp/listing/home.jsp</param-value>i am giving
    <param-value>google.com</param-value>
    according to me it should through error...but it is showing the page we see by  <param-value>/jsp/listing/home.jsp</param-value>    </context-param>
    so is it the wroung web.xml i am changing...

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

  • How to use dynamic file as welcome-file-list in web.xml

    I have configured my web.xml file as this,
    <web-app>
    <context-param>
    <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    <param-value>.xhtml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>login.jsf</welcome-file>
    </welcome-file-list>
    </web-app>
    and my login.xhtml file as this,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:f="http://java.sun.com/jsf/core">
    <body>
    <f:view>
    <h:form>
    UserName:<h:inputText id="userName"
    value="#{bean.userName}" rendered="true"
    required="true"/>
    Password:<h:inputText id="password"
    value="#{bean.password}" rendered="true"
    required="true"/>
    <h:commandButton id="submit" value="Submit" action="#{bean.authenticate}" />
    </h:form>
    </f:view>
    </body>
    </html>
    but when i deploy this using tomcat and try to put url as this,
    http://localhost:8080/project
    Its not identifying welcome file from web.xml
    I am getting error like this,
    The requested resource (/project/) is not available.
    How to resolve this,
    Thanks,
    Vinutha

    This might help:
    http://forum.java.sun.com/thread.jspa?threadID=696586
    As well, you might have to change the servlet-mapping in your web.xml. The url-pattern, I think, needs to be .xhtml. Your login.jsf file in the welcome list will need to be renamed to login.xhtml.
    CowKing

Maybe you are looking for

  • Preview won't stop searching old document

    I opened several PDF files in preview. I did a 'search' for a word... preview locked up. I forced quit. reopened and its back at the search status and freezes again. I tried opening another document and it goes back to the previous documents and sear

  • Deleted windows partition still in MBR

    Hi, I searched google all day long and found out some clues about what could be the problem (even found someone having the same problem as I have) but no solution to repair beside formatting and reinstalling from scratch. What happened is that I had

  • FocusListener not working

    hello everybody, class MyPanel extends JPanel implements FocusListener    public MyPanel(String str)       // some gui code of this class (ignored for brevity)       dialog = new JDialog();       dialog.getContentPane().add(this);       dialog.setSiz

  • Complete loss of library

    Hi All New to this and I wonder if anyone can help. Our P.C has been on the blink recently and whilst I was away my partner decided it was about time it was fixed and sent it off to a P.C repair guy. The guy said that the registry was shot to pieces,

  • Converting Nexus 2000 FEX from Single Homed to Multihomed

    Greetings! I have a 2248TP FEX and two 5548UP Nexi.  Yesterday, one of the 5548s experienced an issue that caused it to go offline.  The FEX is single-homed to that 5548, and so everything connected to it went offline as well. I want to multihome the