How can JSP access web.xml

I have a JSP application that requires properties that are kept in a text file, which I am currently reading from. I would like to move these properties in the web.xml file and read them from there.
I know how to read properties for a servlet from web.xml, however I do not know how to do this for a JSP. Can someone advise me?
Thanks
Matthew

I'm not exactly sure what you are looking for, but if it's something you can do from a servlet, then you can do it from a JSP the same way. Remember, JSPs are compiled into servlets anyway. Just use the implicit objects (HttpServletRequest request, ServletContext application, etc)

Similar Messages

  • How can i access web when i am connected through a proxy?

    HI,
    I am rakesh from bangalore. I want to know how can i access web when i am connected to internet throug a proxy. are there any classes to handle this in java.net package?
    Thanking you
    Rakesh

    the URL class can also handle a proxyserver.
    URL urlobj = new URL("http", proxyhost, proxyport, url);

  • How can i access web sites configured for internet explorer?

    I try to access web sites thatwork with internet explorer from my mac and cannot load the home page.  How can i access these pages?

    Not sure if you're using a different browser than Safari. If not try Firefox or Chrome.

  • SJSC2u1 JSP accessing web.xml session-config session-timeout

    What is the best way of accessing web.xml session-config session-timeout from JSP page ?
    I wish to have this on the JSP page and also have it count down automatically.
    I did this by creating a propery in the session bean and then used javascript to count it down.
    Is there a better way ? Simpler Way ?
    /Roger

    What is the best way of accessing web.xml session-config session-timeout from JSP page ?
    I wish to have this on the JSP page and also have it count down automatically.
    I did this by creating a propery in the session bean and then used javascript to count it down.
    Is there a better way ? Simpler Way ?
    /Roger

  • How can JSP access a COM+ component

    I have to develop JSP pages that leverage existing Microsoft COM+ components. Can anyone suggest a good resource or provide me with a quick explanation/overview of how I would access a COM+ component from JSP? I'm getting exhausted searching the internet for answers only to come up empty. Thanks...

    I use Neva Object (www.nevaobject.com) for this sort of thing. This is a commercial product. The product does what it says it does and that is as far as I will endorse it.
    Since purchasing it I came accross
    http://staff.develop.com/halloway/code/jawin.html
    This looks like it will do much of the same thing but is more suitable for scriptable COM objects. It is also an open source license.
    I don't have any experience with jawin but the support community looks strong. Checking out their website will be worth your time.
    Good luck
    Bill

  • How can I access WEB-INF/lib

    Hello all,
    I deployed JClient application using Java Web Start.
    I have the following lines in jnlp file
    <resource>
    <jar href="WEB-INF/lib/share.jar" />
    </resource>
    There's actually share.jar under WEB-INF/lib directory,
    but I got error message when execute the application.
    It seems that I can't access files under WEB-INF via http.
    Does anybody know why?
    Thanks in advance.

    Sorry for being picky on this. Oracle is not doing it, it is the software you're using, ie JDeveloper in your case.
    AFAIK, the Servlet spec states that every library that is needed by the Servlet application should be put under WEB-INF/lib. These libraries are not accessible for any other usage.
    JDev is doing this because your web application needs it.
    If your JNLP application needs it too, JDev should be smart enough to include it twice in your WAR file, once for your web application and once for your JNLP application.
    On the other hand I really hate software that is too smart and causes more problem by being smart than everything else.
    Having said that, please file an enhancement request on Metalink for JDev for better library management for JNLP applications.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can I access xml document from javascript whithin a JSP page

    how can I access xml document from javascript whithin a JSP page?
    I have a JSP that receives an XML document from a JavaBean, so I can access it within the entire JSP, but I need to access it from the javascript inside the JSP... and I have no idea how i can do this.
    Thanks in advance!

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • How to map jsp in web.xml

    Hi,
    CAn anybody tell me that how to map .jsp in web.xml
    thanx
    vjoy

    Same as servlets, except that you specify jsp-file in place of servlet-class - see below
      <servlet>
         <servlet-name>MyJspServlet</servlet-name>
         <jsp-file>/jspServlet.jsp</jsp-file>
      </servlet>
      <servlet-mapping>
         <servlet-name>MyJspServlet</servlet-name>
         <url-pattern>/myJspServlet</url-pattern>
      </servlet-mapping>cheers,
    ram.

  • How can I access my iCloud account on the web from my phone

    how can I access my iCloud account on the web from my phone
    iPhone 5 iOS 8.3
    I have iCloud turned on, location services on, find my phone works but when I try to access iCloud via Safari on the phone it takes me to a page Apple.com,
    iCloud then three options
    set up iCloud on my phone (i have)
    Install Find my phone, it is installed and it works from my MBP
    or install find my friends, I don't need that I have no friends.
    my calendars and contacts and bookmarks and all are all sync'd and working on the phone, but i thought if I typed in iCloud.com on the phone in Safari I would go to my iCloud web page that looks like this on my Mac.
    Is that NOT how iCloud should/would look on my phone via Safari?
    This is maybe a dumb question after 3+ year of iPhone'ing
    thank you for clarifying or helping me to understand
    jojoguitar_mmn_usa

    I've been playing with a Galaxy here at work and here's what I've found so far - please feel free to jump in and suggest alternative methods to configure or access the various icloud components.
    So the original Q: Can you access your icloud account on Android?
    Not entirely: the website can't be used from an android browser (not properly - even with Dolphin HD and posing as different browsers it won't load correctly.  So Find my iphone is out, so is the address book or looking at your e-mail or calendar just in a browser window
    I was able to setup my e-mail using the IMAP settings published here:
    http://support.apple.com/kb/HT4864
    Be sure to setup the account manually - and note if you have trouble using SSL try TLS (that worked for me)
    Address book is a no go so you'll have to use iTunes to sync all your contacts over to Gmail - if you still have an iPad it means managing contacts in two places though .  Same goes for your calendar - transfer it to Gmail and forget about iCloud's calendar.  Nice instructions here: http://howto.cnet.com/8301-11310_39-20064060-285/how-to-switch-from-iphone-to-an droid/
    iWork is an Apple proprietary bit so don't expect much there.
    So in my case, if I'm really going to make the switch to a Galaxy from my iPhone it really means I'm going to have to switch to using google as the backend.  The timing to swap over to a galaxy/android phone is not the greatest - given that I'd have to give up my Apple addiction (syncing photos and itunes and losing access to my device tracking).  Plus I still have an iPad and a mac and like living in the Apple ecosystem.  I think I'll wait and see what the new iPhone looks like before I commit

  • How can i Store web links in my iPad for easy access?

    How can i store web links in iPad for easy access?

    Add them as a bookmark in the Safari web browser. You can sync bookmarks between your computer and iPad too using iTunes or iCloud.

  • How can I access JSP variables from a JavaScript function in a JSP page?

    Respected sir
    How can I access JSP variables from a JavaScript function in a JSP page?
    Thanx

    You may be get some help from the code below.
    <%
        String str="str";
    %>
    <script>
        function accessVar(){
           var varStr='<%=str%>';
           alert(varStr);// here will diplay 'str'
    </script>

  • How can i access and assign java xml Document variable in javascript block

    How can i access and assign org.w3c.dom.Document variable in javascript block
    I tried this xmlDoc = "<%=xmldoc%>";
    it is not working
    plz give me solution.
    thanx
    Vidya

    The solution would only work on MS IE browsers, as other browsers do not support an XML DOM.
    It can be done, but you would be stuck with using the Microsoft broswer. If that is acceptable, I have some example code, and a book recommendation.

  • How to deploy the web.xml file when trying to use the JSP SDK from SAP?

    I want to use the adduser.jsp which downloaded form SAP SDK samples to add user in BO, but I cannot run it sucessfully. I believe it's caused the web.xml file was not deployed appropriately.
    could you please teach how to deploy the web.xml file for the JSP samples ?
    Could you show me some sample of web.xml for the SDK jsp files? Thank you very much!

    Ensure that you have followed below directory structure while deploying your web application.
       web_application_name
          WEB-INF
             lib
             classes
    web.xml must be placed in WEB-INF. Ensure that you have included all the jar files and other necessary files in your application.
    For more information refer to the below link:
    http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm
    Regards,
    Anuj

  • How can I access a web site that is blocked?

    The website listed below is blocked. How can I access it?

    https://webinar.cms.hhs.gov/e13581911/event/event_info.html <br />
    Loads for me. What indication do you get that it is blocked?

  • (261936172) Q general How can I access an EJB hosted on a remote server?

    Q<general> How can I access an EJB hosted on a remote server?
    A<general> The ability to add EJB control files enables you to access an EJB that
    is deployed to the server on which your web service is running. When you select
    "add EJB control" you need to supply the home and remote interfaces for the EJB
    as well as the JNDI name. This does not provide you with the capability for creating
    a control for a remotely hosted EJB. To use a EJB hosted on another server you
    will have to provide the appropriate code within your web service itself. You
    will have to programmatically gain to access the JNDI for the remote server, lookup
    up the home stub and use it to create the remote stub for the EJB. Of course,
    to make this work you must have the necessary client interfaces in you classpath
    (home and remote interfaces) which can easliy be achieved by adding the EJB client.jar
    file to the lib directory in the webservice WEB-INF folder.

    just define the different server path in the description xml file
    <jndi-name>jnp://serverA(B)/....</jndi-name>

Maybe you are looking for