Getting the context and host name during initialization

I am trying to find a way to get the Context path and the host name during the ContextInitialized event, but without any luck. I think it is very strange that you can not even find the context path or the host name of the application you are running yourself.
Does anybody have an idea?

What I mean are the configuration elements which are put in the server.xml
The BIG problem with the getServletContextName is that this returns the name which is put in the web.xml. But I have a web application which is generic and only some config parameters should be altered. Thats why I need to now in which context I am.
I think the deployment of web applications is wrong by design. I have to specify deployment information inside the application package which in fact should be presented to the servlet container separately. It's like installing new applications on a computer. It should be possible to create 1 installation file (read a web archive) and then specify the location where you want to install it while deploying it (read specify the host name, context location etc.) Now these two are mixed together which I think is wrong.
Besides the above problem, I think it is also not correct to let users specify properties while configuring a context (either in the server.xml or the web.xml) and then not having an equivelant in the object model (Read the ServletContext object).
Morten

Similar Messages

  • I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I have a script called ExportImport for this task, but it only runs in Windows.
    In principle something similar should be possible in AppleScript, but I don't currently have access to a Mac to write it myself.
    tt2

  • ST22 , Need to  get the Transaction and Pgm name using a FUNCTION MODULE ?

    Hi All,
    I need to create a Report for monitoring Dumps which is seen in ST22 every day.
    The function module RS_ST22_GET_DUMPS gives the dump information . But i need to fetch the Program name and the transaction where the dump has happened for my report.(Like when we double click the alv output in ST22 and the next list gives us the complete information , Transaction , Main program name ...etc)
    Kindly suggest me and help me on this .
    Regards,
    Richard A

    Hi
    Funcion module RS_ST22_GET_DUMPS will return the program names where the dump has taken place.
    Pass this program name to function module RPY_TRANSACTION_READ to get the trascation code of the program.
    Regards
    Srilaxmi

  • How to get the constraintlist and column name in a table?

    Hi,
    can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.
    Thanks,
    Deekay

    Deekay wrote:
    can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.To get constraint type:
    select constraint_type from user_constraints where constraint_name = 'YOUR CONSTRAINT NAME';To get constraint columns:
    SELECT column_name from user_cons_columns where constraint_name = 'YOUR CONSTRAINT NAME';SY.

  • How to get the Calendar and Holiday Name from ALBPM engine

    Hi,
    I want to fetch the Calendar Name and Holiday Name that are defined in ALBPM studio/engine.
    How to fetch these through fuego ?
    Bibhu

    Hi,
    Thanks for your help.
    I have executed the code but it did not give me the calendar name as fetchAll() gives me an array.
    I could not find any such method which will give me the Calendar Name.
    The above code give the following result:
    Total Calendar Count: 2 (OK, since I have two calendar in my workspace)
    Calendar Name : fuego.components.CalendarRule@677770 (Want the Calendar Name not this format)
    Calendar Name: fuego.components.CalendarRule@d293b7
    Bibhu

  • How to get the Title and Tcode of a Program during run time

    Hello,
    I am new to abap and I have this question please. Is the a way to get the title, Tcode and Author of a program during run time? I would like to get the name and title of a program or a view or an include during run time.
    Using table TADIR, you can only get the object_name and the author. Is the a way for me to get the Title of the repository object and any Tcode if any is available for the case of a program?
    I loop forward for your respond.
    Thank you.
    Sabina

    You can get it by accessing SYST.
    SY-TITLE for Title
    SY-TCODE for Tcode
    I don't think there is any field in SYST for the Author.
    To get the author name you can use the TRDIR table.
    Regards,
    Naimesh Patel

  • What are the userid,password, and host name for oracle 9i?

    HI Guys.
    I am a research student at the University and the I recently downloaded Oracle 9i for my research. But the problems is also with seting it up. Please could you show me the userid, password, and host name for oracle 9i.
    Thanks in advance for your cooperations.
    Malinga R
    [email protected]

    I believe that starting with 9.2, you have to specify different passwords when you install (can't be the default).
    Justin

  • I downloaded the 32 bit version of photoshop cc 2014. When trying to install I get the message that installer failed to initialize and that this could be due to a missing file. Has anybody a solution ?

    I downloaded the 32 bit version of photoshop cc 2014. When trying to install I get the message that installer failed to initialize and that this could be due to a missing file. Has anybody a solution>?

    Did you unzip the entire contents of the download zip file onto your hard drive before running the installer?  You need to do that.
    I have installed it myself and it went in just fine.
    -Noel

  • UNABLE TO RETRIEVE THE CLIENT IP ADDRESS AND HOST NAME OF A PORTAL USER

    I'm trying to retrive the client IP address and host name of a portal user
    trying to access a portal page using APIs:
    PortletRenderRequest portletRequest =
    (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    HttpServletRequest servletRequest =
    (HttpServletRequest)portletRequest.getAttribute(HttpCommonConstants.SERVLET_REQUEST);
    String l_szClientIPAddress = servletRequest.getRemoteAddr();
    String l_szClientHost = servletRequest.getRemoteHost();
    but i found that for all portal users on different machines IP addresses, the
    returned IP is the same for all which is Portal middle tier IP address.
    So how can retrive the IP addess of a portal user trying to access a portal
    page ?

    Brijesh,
    Do you mean how to see hostname/ip address of client requests processed by the server? If yes, depending on what's your front ending component - Web Cache or OHS, you can configure the access log format to have this information recorded in either of these component's access log file.
    For Web Cache access log file, refer this:
    http://download.oracle.com/docs/cd/B14099_19/caching.1012/b14046/diagnostics.htm#sthref2090
    For OHS access log file, refer this:
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14007/servlog.htm#sthref439
    By default, both Web Cache and OHS are configured to use Common Log Format (CLF) that does record hostname/ip address so if you haven't made any changes to log format, this info is already there for you. Look for $ORACLE_HOME/webcache/logs/access_log file for Web Cache and $ORACLE_HOME/Apache/Apache/logs/access_log file for OHS.
    Thanks
    Shail

  • Change IP and Host name of the server

    Hi,
    Db :11.2.0.3
    Os:Aix6
    OS team are going change IP address and host name of the server which has ASM and DB.
    What are the things we need to follow for this?
    Thanks & Regards,
    VN

    OS team are going change IP address and host name of the server which has ASM and DB.
    What are the things we need to follow for this?1. TNSNAMES.ORA files everywhere
    2. LISTENER.ORA on server
    If there are thin JDBC clients, change IP/hostname in their connection URLs.

  • How can I get the context-parm from a web.xml file using struts?

    Hello:
    I need get the context-param from the web.xml file of my web project using struts. I want configurate the jdbc datasource connection pooling here. For example:
    <context-param>
    <param-name>datasource</param-name>
    <param-value>jdbc/formacion</param-value>
    <description>Jdbc datasource</description>
    </context-param>
    and then from any Action class get this parameter.
    Similar using a simple server can be:
    /** Initiates new XServlet */
    public void init(ServletConfig config) throws ServletException {
              for (Enumeration e = config.getInitParameterNames(); e.hasMoreElements();) {
                   System.out.println(e.nextElement());
              super.init(config);
              String str = config.getInitParameter("datasource");
              System.out.println(str);
         public void doPost(HttpServletRequest req, HttpServletResponse res)
              throws ServletException, IOException {
              // res.setContentType( );
              System.out.println("Got post request in XServlet");
              PrintWriter out = res.getWriter();
              out.println("nada");
              out.flush();
              out.close();
    but only this works for init-params, if I use
    <servlet>
         <servlet-name>MyServlet</servlet-name>
         <display-name>MyServlet</display-name>
         <servlet-class>myExamples.servlet.MyServlet</servlet-class>
         <init-param>
         <param-name>datasource</param-name>
         <param-value>jdbc/formacion</param-value>
    </init-param>
    </servlet>
    inside my web.xml. I need something similar, but using struts inside the action class for that I can get the context-params and call my database.
    Thank you

    To get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
    ServletContext context = getServlet().getServletContext();
    String tempContextVar =
    context.getInitParameter("<your context param >");

  • How to change the fully qualified host name

    Hi,
    how can I change the fully qualiied host name?
    Regards
    Marc

    Hi Michal,
    I'm doing the FlightSeatAvailabilityCheck-Scenarion of the demo example and get an error. To get more details about the error I had a look in the XI Runtime Workbench. There I can see, that the wrong url is called (without the hostname) and  that the access is forbidden (403). Therefore I want to change the fully qualified host name. I knew that I have to change icm/host_name_full but I don't know where I can do it (which transaction)?
    Regards
    Marc

  • Local node not included in the list of host names for grid installation

    I'm attempting to install clusterware on Solaris 11 on 2 nodes. I've tried tweaking the /etc/hosts file in a few different ways by including the fully-qualified name and without it for the localhost, but it still gives me this error every time. The runcluvfy.sh script doesn't run on Solaris 11. Does anyone know how to get around this problem?
    I've tried this using the silent install and with OUI, but got the same error both ways. This is the format of the node names:
    oracle.install.crs.config.clusterNodes=myLocalNode:myLocalNode-vip1,myOtherNode:myOtherNode-vip2
    [FATAL] [INS-40907] Local node not included in the list of host names for grid installation.
    CAUSE: The local node (the node where you are running the installer) was missing from the list of host names you provided.
    ACTION: Include the local node in the list of host names for grid installation.
    Edited by: 982828 on Jan 18, 2013 1:18 PM

    Hi,
    what Oracle Version are you trying to install?
    Best to directly start with 11.2.0.3 and look in MOS for certification, hints requirements.
    Regards
    Sebastian

  • Trying to get the Opening and Closing Balance, 0TOTALSTCK and 0VALSTCKVAL

    Hi Experts, Good Day.
    I am developing a query for Stock Balances, Using Custom cube created with copy from 0ic_c03.
    I am trying to get the Opening and Closing Balance, based on Non-Cumulative KF - 0TOTALSTCK and 0VALSTCKVAL.
    Both The KF's Behaviour for Exception Aggregat. = Last Value
    I am using VARIABLE OFFSET as -1 to get Opening Balance, and just restriction for Closing Balance based on 0CALMONTH
    Unfortunately i am getting data for the periods which does not have data in my Cube. It is taking the total value as closing balance for the periods which we don't have transaction in the cube.
    For Ex. I have data for 09.2010 & 10.2010 a particular material, when i enter 08.2010 as input i am getting the total value of the material.
    I hope you understand the problem and solution soon.
    I will give you more explanation if needed.
    Thanks in Advance....
    Have a great Day Ahead.....
    GopalN

    Hi GopaIN,
    can you explain us process you have done about initialization of data (2LIS_03_BX, cube compression)? it seams like there was data before 09.2010 and you load it with 2LIS_03_BX data source. That data is not in cube, but just used for update markers.
    Edited by: Sasa Todorovic on Mar 25, 2011 9:48 AM

  • How can I display the first and last name using a paramater as employee ID?

    Hi SAP,
    I have a parameter that is called {? Employee ID}.   What I want to do is display the first and last name based on the employee ID value entered in {? Employee ID} in the page header of the report.  Right now, when I put the following formula in the page header only some pages get the right result while other pages dont....
    if table.employeeid = {? Employee ID} then
    table.firstname" "table.lastname
    It appears as though if the first record in the details section on the beginning of each page happens to be the employee under {? Employee ID} then it prints it correctly, if it isn't I get a null value in the page header.
    Anyone have any ideas?
    Z

    Hi Try this,
    Whileprintingrecords;
    if ={?EmpID} then
    Also check the option "Default values for null" in the formula editor.
    Regards,
    Vinay

Maybe you are looking for

  • MD06  Issue - Planned orders not getting displayed

    Hello, Planned order with the exception "Newly created order proposal" does not get displayed in MD06 with the option "Only Unprocessed MRP Lists" in the processing indicator. I am running MD06 report with the following parameters: Plant MRP Controll

  • Error While Creating Sales Order Using OE_ORDER_PUB.PROCESS_ORDER

    Hi All, I am trying to create a sales order using oe_order_pub.process_order api.. The Procedure i had written is as follows. CREATE OR REPLACE PROCEDURE TEST_PROC AS x_return_status VARCHAR2(250); x_msg_count NUMBER; x_msg_data VARCHAR2(250); F varc

  • IPhoto copying unedited pictures into modified folder!

    Hi everybody! recently I've noticed the size of my iPhoto library growing without me adding any photos, so I checked the folders and discovered that whole events had been copied into the modified folder without me even having edited them! I marked al

  • Can I use PSE 10 as an external editor for iPhoto?

    I just downloaded a trailversion of PSE10. Than I selected it as external editor in iPhoto. As I clicked on a Photo in iPhoto and selected "edit in external editor" PSE10 started, but the photo did not appeared as it is used in PSE8 for example. Than

  • Making It Simple!

    Geez, I thought iDVD was supposed to be a simple way to create a slideshow, etc. If this is a simple program, I'd hate to see a hard one! Basic terms are not defined. Buttons, chapters, etc. - why do you need those? I pick a theme, and I see a bunch