How to get parms from web.xml?

Hello,
I want to store some config parms in web.xml and read them from within JSP.
What is the syntax for the web.xml and the code needed in JSP to read it?
Thanks
Frank

Global parameters:
<context-param>
    <param-name>myParam</param-name>
    <param-value>1</param-value>
  </context-param>
//Accessing in a servlet
getServletContext().getInitParameter("myParam");
// in a JSP
<%
application.getInitParameter("myParam");
%>
// using JSTL
${initParam.myParam}

Similar Messages

  • How to get data from web service in ADF mobile

    I'm new to ADF mobile application development. I'm currently blocked in a scenario. I have a web service(from third party) which needs <wsse:Security> to retrieve data. In soapUI, the web service will retrieve the response only when there is this security tag. Otherwise it will give response as invalid security. The web service looks like this:
            <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xx="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/" xmlns:get="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/get_login/">
                   <soapenv:Header>
                      <xx:SOAHeader>
                         <!--Optional:-->
                         <xx:Responsibility>XXX</xx:Responsibility>
                         <!--Optional:-->
                         <xx:RespApplication>XXX</xx:RespApplication>
                         <!--Optional:-->
                         <xx:SecurityGroup>XXX</xx:SecurityGroup>
                         <!--Optional:-->
                         <xx:NLSLanguage>XXX</xx:NLSLanguage>
                         <!--Optional:-->
                         <xx:Org_Id>XXX</xx:Org_Id>
                      </xx:SOAHeader>
        <The portion which is excluded from the soap, but which is required for getting response>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                         <wsse:UsernameToken wsu:Id="UsernameToken-1">
                            <wsse:Username>XXX</wsse:Username>
                            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXX</wsse:Password>
                            <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">XXX</wsse:Nonce>
                            <wsu:Created>2013-02-13T08:58:50.649Z</wsu:Created>
                         </wsse:UsernameToken>
                      </wsse:Security>
        <The portion which is excluded from the soap, but which is required for getting response>
                   </soapenv:Header>
                   <soapenv:Body>
                      <get:InputParameters>
                         <!--Optional:-->
                         <get:P_USERNAME>XXX</get:P_USERNAME>
                      </get:InputParameters>
                   </soapenv:Body>
                </soapenv:Envelope>
    I tried the steps described in ADF mobile tutorial to get web service data. But I'm getting response code 500 from the server. I tried the steps for secured web service also. But I'm not sure which security policy has been implemented in the web service. I tried with oracle/wss_username_client_token_policy and some others but didn't succeed. Later I tried by creating web service client/proxy. But as Oracle ADF only supports java 1.4, I got errors in the generated code(errors on generics and annotation).
    The WSDL for the web service is as follows:
        <definitions xmlns:tns="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns1="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/get_login/" name="XX_FS_MOB_LOGIN" targetNamespace="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/">
        <types>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/get_login/">
        <include schemaLocation="http://27.251.157.211:8000/webservices/SOAProvider/plsql/xx_fs_mob_login/APPS_XX_FS_MOB_LOGIN_GET_LOGIN.xsd"/>
        </schema>
        <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/csf/soaprovider/plsql/xx_fs_mob_login/">
        <element name="SOAHeader">
        <complexType>
        <sequence>
        <element name="Responsibility" minOccurs="0" type="string"/>
        <element name="RespApplication" minOccurs="0" type="string"/>
        <element name="SecurityGroup" minOccurs="0" type="string"/>
        <element name="NLSLanguage" minOccurs="0" type="string"/>
        <element name="Org_Id" minOccurs="0" type="string"/>
        </sequence>
        </complexType>
        </element>
        </schema>
        </types>
        <message name="GET_LOGIN_Input_Msg">
        <part name="header" element="tns:SOAHeader"/>
        <part name="body" element="tns1:InputParameters"/>
        </message>
        <message name="GET_LOGIN_Output_Msg">
        <part name="body" element="tns1:OutputParameters"/>
        </message>
        <portType name="XX_FS_MOB_LOGIN_PortType">
        <operation name="GET_LOGIN">
        <input message="tns:GET_LOGIN_Input_Msg"/>
        <output message="tns:GET_LOGIN_Output_Msg"/>
        </operation>
        </portType>
        <binding name="XX_FS_MOB_LOGIN_Binding" type="tns:XX_FS_MOB_LOGIN_PortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GET_LOGIN">
        <soap:operation soapAction="http://XXX:8000/webservices/SOAProvider/plsql/xx_fs_mob_login/"/>
        <input>
        <soap:header message="tns:GET_LOGIN_Input_Msg" part="header" use="literal"/>
        <soap:body parts="body" use="literal"/>
        </input>
        <output>
        <soap:body use="literal"/>
        </output>
        </operation>
        </binding>
        <service name="XX_FS_MOB_LOGIN_Service">
        <port name="XX_FS_MOB_LOGIN_Port" binding="tns:XX_FS_MOB_LOGIN_Binding">
        <soap:address location="http://XXX:8000/webservices/SOAProvider/plsql/xx_fs_mob_login/"/>
        </port>
        </service>
        </definitions>
    Please help me to figure out a solution for this.
    Thanks in advance
    Rino

    how to store the data in the mobile which i fetched from the server using RMS. Can u give me a eg. code. here and send me a link to my email id. [email protected]
    I am using Oravle10g as the database. It is installed in the server.
    I made a connection in servlet using ODBC:JDBC.
    I am able to see the data fetched from the server in my mobile.
    Now, i am trying to save the data. But i dont know how to use the RMS to connect to the Oracle database or pass the string etc.
    Do help me if you dont mind.
    I kept reading and tried some codes but i failed.
    Me still trying...........
    Thanks in Advance.

  • 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

  • How get data from Web Service with token?

    Can I get data from Web Service made with Java?
    This WS has a Token.
    Any ideas o reference?
    Regards!
    Fran Díaz | twitter: @frandiaz_ | Blog: {geeks.ms/blogs/fdiaz/} | Communities: {onobanet.es} & {secondnug.com}

    We've now added this ability to Web.Contents. You can say something like
    Web.Contents("http://my.web.service/1", [Headers=[#"The-Token"="0a0138ef2d"]])
    and it will pass a header with the key "The-Token" and the value "0a0138ef2d" as part of the HTTP request. For security reasons, this will only work for anonymous web requests.
    The December preview can be downloaded from
    http://www.microsoft.com/en-us/download/details.aspx?id=39933&WT.mc_id=blog_PBI_Update_PowerQuery

  • How to get FILENAME from FILE PATH

    does anyone know how to get filename from a file path for example
    FILE PATH: C:\Project\uploadbean\web\uploads\Button.txt
    returns
    FILENAME: Button.txt

    @BalusC
    ust for a reference cause i'm new in JSP This has nothing to do with JSP, but with basic knowledge of an essential API. I have given you the link to the File API. Are you saying that you refused to read the API documentation, which clearly explains you how to use the File and shows which methods are all available to you undereach the straightforward getName() method, and expecting that the others may chew the answers for you? Loser.

  • How to get data from PDF form?

    PDF forms can send data in url like GET or POST method. Is it possible to get data from url, like in PHP http://sever/file.php?item1=value1&item2=value2&item3=value3
    In APEX url have specific construction and I don't know how to get value of items (1...3)
    Please let me help to find simple method of geting data from URL.
    Best Regards,
    Mark

    The APEX URL syntax is detailed here
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#BCEDJBEH
    How to get it from PDF is another matter...
    I'm working on an app that downloads PDFs with a Large amount of data as a blob, takes that blob and changes it to XML, then goes through the xml to validate each section of data and then add it into the schema that my apex app is referencing....
    I didn't write the original code but I do know that it isn't a quick thing to implement and includes using some uploading some java jar files to your schema and writing some custom java code.
    Someone else may be able to help with grabbing PDF data into the URL for the amounts of data you want to pass to apex.
    Gus..
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!
    Edited by: Gussay on Sep 21, 2009 5:52 PM

  • How to get answers from forum

    Hi,
    Just wondering, how to get answer from forum.  Some time, for simple question, I don't see anybody replying. 
    Is there any other platform we get define answer or is there any support who can connect to our system suggest resolution?
    Thanks,
    -Anand

    anand_gp wrote:
    Just wondering, how to get answer from forum.  Some time, for simple question, I don't see anybody replying.
    If it's really a simple question, then most people probably think the poster can get the answer from the documentation, or by searching the forum for previous answers.
    However, most of the time, it's not that the question actually is simple. It's usually a question that is being asked simplistically, making it nearly impossible to answer (or often even understand). To get an effective response to a question, it needs to be the right question, asked in the right way.
    Describe the the problem/requirement (not the attempted solutions) in detail:
    How to ask questions
    Re: 2. How do I ask a question on the forums?
    Include as much relevant information with the question as possible, starting with:
    APEX version
    DB version, edition and host OS
    Web server architecture (EPG, OHS or APEX listener), server platform, and host OS
    Browser(s)/version(s) used
    UI/Theme
    Templates
    Region type (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. To get a detailed answer then it's appropriate for the questioner to take on a significant part of the effort by reproducing the problem on apex.oracle.com before asking for assistance with specific issues, which can then be seen at first hand in a real APEX environment.

  • How to get coordinates from Google Map

    I wonder how to get coordinates from Google Map to JavaFX application when click has occured. Here is an example of code:
    public class JavaFXApplication extends Application {
    public void showCoordinates(String coords)
            System.out.println("Coordinates: " + coords);
        @Override public void start(Stage stage)
            final WebView webView = new WebView();
            final WebEngine webEngine = webView.getEngine();
            webEngine.load(getClass().getResource("googlemap.html").toString());
            webEngine.getLoadWorker().stateProperty().addListener(
                    new ChangeListener<State>() {
                        @Override
                        public void changed(ObservableValue<? extends State> ov, State oldState, State newState) {
                            if (newState == State.SUCCEEDED) {
                                JSObject window = (JSObject) webEngine.executeScript("window");
                                window.setMember("java", new JavaFXApplication());
            BorderPane root = new BorderPane();
            root.setCenter(webView);
            stage.setTitle("Google maps");
            Scene scene = new Scene(root,1000,700, Color.web("#666970"));
            stage.setScene(scene);
            stage.show();
       public static void main(String[] args){
            Application.launch(args);
    // googlemap.html file
    <!DOCTYPE html>
    <html>
        <head>
            <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
            <style type="text/css">
                html { height: 100% }
                body { height: 100%; margin: 0px; padding: 0px }
                #map_canvas { height: 100%; background-color: #666970; }
            </style>       
            <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
            </script>
            <script type="text/javascript">           
                function initialize() {
                    var latlng = new google.maps.LatLng(40.75089, -73.93804);
                    var myOptions = {
                        zoom: 10,
                        center: latlng,
                        mapTypeId: google.maps.MapTypeId.ROADMAP,
                        mapTypeControl: false,
                        panControl: true,
                        navigationControl: true,
                        streetViewControl: false,
                        backgroundColor: "#666970"
                    var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);    
                    document.map = map;
            google.maps.event.addListener(map, 'click', function(event) {
                //java.showCoordinates(event.latLng); ???
            map.setCenter(location);
            </script>
        </head>
        <body onload="initialize()">
            <div id="map_canvas" style="width:100%; height:100%"></div>
        </body>
    </html>Edited by: krbltik on 03.10.2012 22:59

    Hi, welcome!
    You may also have a look at GPS Info Qt, available for free at Ovi Store: http://store.ovi.com/content/165671
    GPS Info Qt is a nice Qt app. I have it on my C6-01 and I like it.
    Regards.

  • Move env-entry from web.xml into deployment plan

    I have:
    <env-entry>
    <env-entry-name>USERNAME</env-entry-name>
    <env-entry-value>someUser</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    and I'd like to move it from web.xml into my_app_plan.dat. Is it possible? How?
    Thank you in advance!

    Let me describe my case in few more words...
    I have some kind of client-server app. Clients have OC4J installed and they download myApp.ear and myApp_plan.dat files and by using script (Windows CMD batch file) clients install those files with admin_client.jar, OC4J's admin utility. The problem is that I have 2 different types of clients and I have client specific settings set in web.xml file and each time I compile myApp.ear I have to uncomment/comment some lines in web.xml.
    So, to make a long story short, I need a way to deploy those settings separated from (outside of) myApp.ear. By following you link, I have read that orion-web.xml should reside inside WEB-INF folder of myApp.ear, which is not good for me.

  • How to get data out of XML?

    Hi,All.
    I am running SAX (JAXP1.01) in Applet to process XML file. My question is how to get data out of xml format according to the field name (@age,@rank etc)
    and write into string buffer seperated by comma.
    Should I use SAX or DOM? (file size is big)
    My xml as follow :
    <ROOT>
    <FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@team/relay}">
         <ObjectName>Field124</ObjectName>
         <FormattedValue>HUNTER</FormattedValue>
         <Value>HUNTER</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@age}">
         <ObjectName>Field125</ObjectName>
         <FormattedValue> 19</FormattedValue>
         <Value> 19</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
         <ObjectName>Field126</ObjectName>
         <FormattedValue>43</FormattedValue>
         <Value>43</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{results.athrel_name}">
         <ObjectName>Field127</ObjectName>
         <FormattedValue>1-1 NORRIE</FormattedValue>
         <Value>1-1 NORRIE</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2}">
         <ObjectName>Field128</ObjectName>
         <FormattedValue>1:54.75</FormattedValue>
         <Value>1:54.75</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1course}">
         <ObjectName>Field129</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1std}">
         <ObjectName>Field130</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2course}">
         <ObjectName>Field131</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield2std}">
         <ObjectName>Field132</ObjectName>
         <FormattedValue>QT</FormattedValue>
         <Value>QT</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@points(left)}">
         <ObjectName>Field133</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@pointsdecimal}">
         <ObjectName>Field134</ObjectName>
         <FormattedValue/>
         <Value/>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="{@points(right)}">
         <ObjectName>Field135</ObjectName>
         <FormattedValue>0</FormattedValue>
         <Value>0.00</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@timefield1}">
         <ObjectName>Field136</ObjectName>
         <FormattedValue>1:55.98</FormattedValue>
         <Value>1:55.98</Value>
    </FormattedReportObject>
    <FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{@Rank}">
         <ObjectName>Field137</ObjectName>
         <FormattedValue>43</FormattedValue>
         <Value>43</Value>
    </FormattedReportObject>
    Repeat...
    </FormattedReportObject>
    </ROOT>
    ------------------------------------------------

    For big files use SAX: quicker and less memory usage.
    The xerces parser from Apache has some examples. Basically what you do is scan the XML, remembering what tag you are and once you find the right tag, read the contents.

  • How to get hostname from targetlist in custom deployment procedure?

    When I make a simple procedure with a phase that will loop through a procedure hostname list
    and a hostcmd or directive inside that will use the hostname ex change a configuration file. How to get hostname from the hostname targetlist?
    I would rather not use $(hostname) or similar function if I can get the hostname from the target list.
    Edited by: user476601 on 2012-09-06 05:59

    I have tried that and cannot get it to work.
    I have tried to make a procedure with:
    parameter
    - parallel fase
    - step directive with hostname parm based on simple sh script (echo $hostname)
    - map hostname setvalue %TargetName%
    In a hostcmd step you cannot access %TargetName% directly
    it doesn't work. Please come with an example if you have tried it.
    /René

  • How to access HttpServletRequest from Web Dynpro

    Hi,
    How could I get HttpServletRequest from Web Dynpro. I used the following code
    IWDRequest req = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
    HttpServletRequest hreq = (HttpServletRequest) reg;
    but it's throwing ClassCastException.
    Is there any other way?
    Thank you

    I am building an application based on IPC API. I need to pass HttpSession as a parameter to initialize some IPC objects. Mainly trying to create IPCClient object.

  • How to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    how to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    Make sure Settings > iCloud > Photos > iCloud Photo Library (Beta) = "Off"
    Then sync your iPhone using iTunes and make sure your sync settings for photos are set correctly in iTunes.

  • I got a new computer and don't know how to get music from ipod touch to itunes library

    I recently got a new computer and don't know how to get music from my ipod touch to show on my itunes library. 

    You need to transfer the iTunes folder from the old computer to the new one.
    iTunes: How to move your music to a new computer (Mac or Windows):
      http://support.apple.com/kb/HT4527

  • I have a new MacAir and don't know how to get info from my USB stick and my SD photo card.  Can anyone help me please?

    I have a new MacBook Air and don't know how to get info from my USB stick and get info from my SD card.  Can anyone help, please?

    Plug the stick and/or card into the appropriate slots on the side of your Air. Do you see icons for the devices appear on the desktop? Click into them to see what files are there.
    Matt

Maybe you are looking for

  • How to print from safari on the ipad2?

    I setup my printer on my wireless network and i was able to print a document using "pages".My dad was trying to print an attachment from his email in safari and after the print job was sent, the printer did nothing.I cant seem to print from safari. T

  • Kernel panics after updating firmware

    Kernel panics began at startup after updating firmware about 2 weeks ago. Went through the KP repair routines prescribed by thexlab.com. Found no problems with the hard drive, permissions, etc. Did erase and install (with Leopard OS dvd bought from b

  • A question about RequestDispatcher

    I'm using Tomcat ... when clicking a button on a webpage, Test.class (servlet) is executed. And Test.class forwards request and response to another servlet MyFD.class. both Test.class and MyFD.class are located in the same directory .../WEB-INF/class

  • FI Report Painter (FGI1) - add new button in output screen

    Hi all, I have a report created by tcode FGI1 (Create Drill-down Report) which bases on form 0SAPBSPL-01 (Fin. Statement: Actual/Actual Comparison). I wanna know if there are any ways to add a new button in output screen after report execution (i.e t

  • Neues Plug in für Windows Camera Raw 2.3

    Ich suche verzweifelt auf der Adobe Homepage für meine Canon EOS 20D das neue Camera RAW. Wer kann mir weiterhelfen? Ich würde mich über Hilfe sehr freuen. Mit freundlichen Grüßen Marianne Schlüter