Accessing the ServletContext from a class that is not a Servlet?

Is there any way of accessing the ServletContext from a class that is not a
          Servlet? The class is being used as part of a Web Application.
          Thanks.
          

http://www.mozilla.org/mirrors.html
Mozilla has download mirrors around the globe. If it is on the list, it is trustworthy.

Similar Messages

  • How to access the Oracle from Unix when SID is not provided?

    How to access the Oracle from Unix when SID is not provided.
    User Name : xxx
    Password : yyy
    SID : SID
    I use to access it using below command from Unix prompt:
    sqlplus xxx/yyy@SIDNow since I dont have SID, how to access the Oracle DB from Unix Box?
    User Name : xxx
    Password : yyy
    Service Name : zzz
    Regards,
    Sunny.

    Hi Ajay
    Thanks for the suggesstion :)..It worked as well.
    The Actual problem was in the "tnsnames.ora" file where in I need to make entry for the new SERVICE name.
    Now I am able to connect it properly.
    Regards,
    Sunny.

  • Trying to access a file from a host that is not available

    If I try to access a file on a host that is not available/unreachable, it hangs up for about 5-10 minutes. Is there any way to speed this up? I am using JDK 1.4.2
    String filename = "\\\\ip\\myFile.txt"; // ip address is unreachable
    File f = new File(filename);
    f.exists(); // hangs hereTIA,
    DB
    Edited by: Darth_Bane on Aug 14, 2009 9:33 PM
    Edited by: Darth_Bane on Aug 14, 2009 9:34 PM

    I think you can use an IP address in the File spec. Windows allows you to use the IP address rather then the hostname in a // address (UNC?) infact its faster to use the ip over the hostname (windows networking is SLOW anyway)
    Why not try dertimining if the machine is connected to the network before trying to get the file? There is something in the NetworkInterface API about pinging a IP or was that in the Socket API. eitherway, i think finding out if the computer is available before the file would make sense, that way you arnt waiting arround to find out if the file on an unavailable machine isnt there when you know the machine isnt online.
    Thats my two cents.

  • Why does my web service web.xml reference a class that is not a servlet?

    In jDeveloper 10.1.3, I created the simplest web service I could think of. I created a HelloWorld class that has one method that accepts a name as a parameter and returns "Hello " + name. Using the wizards, I was able to get it to run just fine in my development environment. However, if I generate a WAR file and deploy it to Tomcat 5.5, it chokes on the web.xml. Here it is...
    <pre>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <servlet>
    <description>Web Service MyHelloWorldServiceSoapHttpPort</description>
    <display-name>Web Service MyHelloWorldServiceSoapHttpPort</display-name>
    <servlet-name>MyHelloWorldServiceSoapHttpPort</servlet-name>
    <servlet-class>com.dex.b2b.HelloWorld</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>MyHelloWorldServiceSoapHttpPort</servlet-name>
    <url-pattern>MyHelloWorldServiceSoapHttpPort</url-pattern>
    </servlet-mapping>
    </web-app>
    </pre>
    The servlet-class value is my simple HelloWorld class, not a servlet. How is this suppose to run, if the servlet-class value is not a servlet? It certainly did not run in Tomcat 5.5. I can't get it to run on Oracle App Server 10.1.2 either.
    Thanks

    Hi fellrunningpictures-
    Picasa web albums shows you that message because they are not fully compatible with the latest version of Firefox. I would recommend contacting Picasa to encourage them to become fully compatible. I found a link for contacting them here:
    * [http://support.google.com/picasa/?hl=en http://support.google.com/picasa/?hl=en]
    Hope that helps.

  • How to access the objects from  multiple classes in  ABAP Objects

    <b> Give me The scenario and solution to the above problem </b>

    In abap OO you can have only one super class.
    multiple inheritence can be acheived by inheriting multiple interfaces.
    abap OO is similler to that of JAVA in inheritence.
    so you can not have classes a and b both as super at same time for a class.
    however if still you want to acheive your perpose then you can do it using heirarchical inheritance where b inherits a and c inhrites b. so this way public methods will be accesible in c
    do revert back if any other doubt.
    check this link for more clear picture:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/frameset.htm
    regards.
    kindly close the thread if problem by awarding points on left side.
    Message was edited by: Hemendra Singh Manral

  • How to access form objects from different class?

    Hello, I am new to java and i started with netbeans 6 beta,
    when i create java form application from template i get 2 classes one ends with APP and one with VIEW,
    i put for example jTextField1 with the form designer to the form and i can manipulate it's contents easily from within it's class (let's say it is MyAppView).
    Question>
    How can i access jTextField1 value from different class that i created in the same project?
    please help. and sorry for such newbie question.
    Thanks Mike

    hmm now it says
    non static variable jTree1 can not be referenced from static context
    My code in ClasWithFormObjects is
    public static void setTreeModel (DefaultMutableTreeNode treemodel){
    jTree1.setModel(new DefaultTreeModel(treemodel));
    and in Class2 it is
    ClasWithFormObjects.setTreeModel(model);

  • [svn:osmf:] 13401: PARB changes: removing nesting capabilities from MediaContainer, and introducing a separate MediaContainerGroup class ( that is not a MediaContainer) that now holds the functionality.

    Revision: 13401
    Revision: 13401
    Author:   [email protected]
    Date:     2010-01-09 07:37:48 -0800 (Sat, 09 Jan 2010)
    Log Message:
    PARB changes: removing nesting capabilities from MediaContainer, and introducing a separate MediaContainerGroup class (that is not a MediaContainer) that now holds the functionality.
    Modified Paths:
        osmf/trunk/apps/samples/framework/NestedMediaContainersSample/NestedMediaContainersSample .as
        osmf/trunk/framework/MediaFramework/.actionScriptProperties
        osmf/trunk/framework/MediaFramework/.flexLibProperties
        osmf/trunk/framework/MediaFramework/org/osmf/containers/HTMLMediaContainer.as
        osmf/trunk/framework/MediaFramework/org/osmf/containers/IMediaContainer.as
        osmf/trunk/framework/MediaFramework/org/osmf/containers/MediaContainer.as
        osmf/trunk/framework/MediaFramework/org/osmf/display/MediaPlayerSprite.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/MediaFrameworkTests.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/containers/TestMediaContainer.as
    Added Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/display/MediaContainerGroup.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/display/TestMediaContainerGroup.as

    Hi,
    these concepts are used and implemented in jGuard(www.jguard.net) which enable easy JAAS integration into j2ee webapps across application servers.
    cheers,
    Charles(jGuard team).

  • How can i access the EJB from a Webdynpro

    Dear all,
    How can i access the ejb , from a webdynpro?.
    Is there any way to do that?.
    I want to write the entire code (business functions) within the EJB and i wan to access the entire methods from a WebDynpro Application.This is the situation.
    Please help me to , resolve this problem.(Here im using JDBC Connection .. etc.).
    I want to do the basic connection setting's and data retrieval part within the EJB and use that within the WebDynpro..
    how can i seperate this two(i mean, i want to seperate the JDBC connections and WebDynpro,i dont want to hard code any connection parameters within the webdynpro code)
    So that i want use that saet of particular function's in many webdynpro applications..
    (i dont need any help regarding webservice way.)
    If anyone can , please help me..
    I tried that javabean class , manifest file , that way (importing javabean model).
    but im getting errors.
    I cant properly utilize that..
    So please help me with steps regarding that,,
    for javabean
    and if any , for EJB also..
    with regards
    Kishor.G

    HI,
    Since webdynpros follows Model View Controller Architecture You can access EJBs in webdynpro(views/frontend) infact to connec to database uding JDBC you have to utilise EJB ( opening connection to database closing, and other Business functionality).See this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/web dynpro tutorial and sample applications.faq#q-7
    <b>How to access the Car Rental Web Service?</b>
    Regards,
    RK

  • Accessing a JTextField from another class

    I 've got 2 classes I am trying to get the value of a JTextField that located in a second class see the code
    class1 myClass = new class1();
    String text = myClass.jTextField1.getText();
    System.out.print(text);What happens is when i run the program and enter some text in the jTextFild1 and then click on my Jbutton it does not print anything
    the JButton is in the caller class
    Could anyone explains to me what is wrong

    an example would help maybe....
    if you want to access your jtextfield from another class then:
    import javax.swing.*;
    public class FieldHolderClass {
    public JTextField jtf = null;
    public FieldHolder() {
      JFrame jf = new JFrame();
      jtf = new JTextField();
      jtf.setText("this is the text that is here when other callerclass seeks for text");
      jf.getContentPane().add(jtf);
      jf.setVisible(true);
    public class CallerClass {
    public static void main(String args[]) {
      FieldHolderClass fHolder = new FieldHolderClass();
      System.out.println((fHolder.jtf.getText());
    }of course i have not written any swing app for a long time, so i might have forgotten everything... so, don't flame me when that code does not compile.
    the thing that it's supposed to show, is that you make a <b>public</b> variabel (jtf) and you simply ask for it from another class by typing holderclass instances name dot and that variable name (in this case jtf) and dot and then call the method on that variable (or object...)
    it might also be that you want your code to work the way that when you enter a text into jtextfield, then after pressing enter it would get printed on terminal...
    in that case you should also register some Listeners... i remember that back when i was just getin' to know java then i had problems with it as well... but then again, i didn't read any manuals...
    i hope i was somewhat help...

  • Accessing MXML ArrayCollection from ActionScript class?

    I have an MXML file that has an arraycollection for my Tree
    component. I am overriding the updateDisplayList function in order
    to add lines to all of my nodes in the Tree.. however I can't seem
    to figure out how to access that ArrayCollection from inside the
    actionscript class?
    I have tried the methods used to pass variables between two
    MXML files (like a popup window - which I have used in the past and
    it works great).
    My actionscript class code is almost identical to this
    example here:
    http://www.iepl.net/treeControlSample/treeControlSample.html
    In the above example the data is static, but my data is going
    to change sometimes and I need access to the entire dataProvider
    (ArrayCollection) in order to make the lines work right.. this has
    been very frustrating for me! :)
    if anyone knows of a better way to achieve gettign lines to
    the siblings in a Tree.. please let me know!
    Any help would be super duper awesome!

    I have found the solution to this. My problem was similar to
    the one cheftimo was having in this post:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1367784&enterthread=y
    The answer is to import mx.core.Application into the
    component you are trying to access the variable from and then call
    it by using 'Application.application.<var name>'
    Thanks to Greg Lafrance!

  • How to construct table in jsp for the resultset from helper class

    Hi Dudes!!!
    Want to construct table in jsp for the resultset, but the resultset are retrieved at the helper class.I constructed Table in Helper class Using StringBuffer and return it as string from the helper class.Is their any other feasible and efficient way to construct table in Jsp for the resultset from Helper class.Solution will be highly appreciated.Thanx in Advance.

    no, we can't.
    Certainly noone can with such vague specifications even if they had the intent to do so.
    "the computer", which computer?
    "attach to our current page", what is meant by that?
    And noone should ever help you if you're planning to breach security anywhere.

  • How do I access the music from my Mac drive while booted into Windows?

    How do I access the music from my Mac drive while booted into Windows via Bootcamp? I tried using MacDrive but it's not supported for Vista 64-bit edition. Is there another program out there that I can use? I just want to be able to access my music that's on Leopard while in Vista. Any advice will be much appreciated. Thanks in advance.

    Your best bet is to move the music on the Windows side since Leopard will be able to read and play the music from the mounted Windows drive (Leopard will not be able write anything to the Windows NTFS partition).
    In your case it won't work the other way around.
    Axel F.

  • How to make Firefox access the internet from Oracle Ent. Unbreakable Linux?

    Hello
    I have a Dell Duo Core x86 laptop that multiboots Windows 2003 Server, Windows XP and Oracle Enterprise Unbreakable Linux. I use Internet Explorer to
    access my email while at the library so I know my laptop can access the internet. I just installed the Oracle Enterprise Unbreakable Linux in text mode and
    I can still access the Internet but only if I use one of the Windows operating systems which is why I am keeping them for now. The reason is because when I
    use Oracle Enterprise Unbreakable Linux, when I select Firefox to access the internet I get these messages:
    "Server not found
    Firefox can't find server at www.hotmail.com
    -check address for typing errors
    -if unable to load pages check network connection
    -if computer or network protected by firewall make sure Firefox permitted to access
    web"
    None of those reasons are true for not gaining access to the internet. I want to use Oracle Enterprise Unbreakable Linux from now which is why I installed
    but I need to know:
    1) Why do I get the "Server not found" and the other error messages when I try to access the internet using Firefox and what do I have to do to make Firefox
    access the internet successfully?

    Hi,
    First you must confirm your laptop with Oracle Enterprise Unbreakable Linux can access internet.
    Please open a terminal, input the following command
    1.ifconfig
    2.cat /etc/resolv.conf
    Regards
    Jason

  • Accessing public variables from other classes

    Probably a simple questions, but how can I access a variable from another class. My exact situation is as follows.
    A class called WorldCalender has a variable which is defined: public int hour; (the value is given to it elsewhere).
    I want to access this variable and increase it by one in a subroutine in the class Hour. In this class I have put: WorldCalender.hour++; but it doesn't seem to work. How should I do it?

    don't expose the hour variable at all.
    have a method eg addToHourBy( int hrs )
    Probably a simple questions, but how can I access a
    variable from another class. My exact situation is as
    follows.
    A class called WorldCalender has a variable which is
    defined: public int hour; (the value is given to it
    elsewhere).
    I want to access this variable and increase it by one
    in a subroutine in the class Hour. In this class I
    have put: WorldCalender.hour++; but it doesn't seem to
    work. How should I do it?

  • I just installed Yosemite. iPhoto is gone, and Photos does not open.  Instead, I am prompted to update to the latest version. The App Store tells me that is not available in the US.  What do I do?  Cannot access any photos.

    I just installed Yosemite. iPhoto is gone, and Photos does not open.  Instead, I am prompted to update to the latest version. The App Store tells me that is not available in the US.  What do I do?  Cannot access any photos.

    Reinstalling OS X Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Reinstalling OS X Without Erasing the Drive
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility and press the Continue button. After Disk Utility loads select the Macintosh HD entry from the the left side list.  Click on the First Aid tab, then click on the Repair Disk button. If Disk Utility reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit Disk Utility and return to the main menu.
    Reinstall OS X: Select Reinstall OS X and click on the Continue button.
    Download and install the OS X Yosemite 10.10.3 Combo Update.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
    Alternatively, see:
    Reinstall OS X Without Erasing the Drive
    Choose the version you have installed now:
    OS X Yosemite- Reinstall OS X
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

Maybe you are looking for

  • MS office report

    Hi, I am trying to generate a report using the MS office express vi and after follow the instructions in the manuals and check the examples I cant fill a table predefined in my own template!! and I get an error Error -41110 occurred at NI_ReportGener

  • ME57 - Assign and Process PR

    Hi Guys, I need to setup below two fileds active, when go in to TCode ME57 1. Assigned Purchase Requiesitions 2. Released Requisitions only How to setup / config settings ? Thanks, Sankaran

  • Problem with OTN J2ME Extension and Viewlets sample

    The sample on the following OTN site http://otn.oracle.com/products/jdev/htdocs/partners/addins/exchange/j2me/index.html is not allowing me to run the Configure the Extension viewlet or any viewlet on this page. Does any sample that Oracle provides w

  • Docked resolution problem x220

    Hi All Sometimes after redocking resolution on external screen doesn't change to one set in  Intel graphics and media panel. My system Lenovo x220 docking station 3 OS Windows XP SP3. I have more the same systems and they don't have this problem. I u

  • Mirror folder hierarchy

    Hi, I want my CWS to mirror the source repository structure. I used the DB CWS example to start my development. When I created a crawler, I never see the option to "Mirror folder hierarchy" or "Import security...". Is there something that I should ch