How to load objects in web application context during oc4j startup?

Hi
How I can put some objects in application context during oc4j application startup?
I'm using oracle as10g j2ee and web cache edition.
Thanks

An idea would be to write your own OC4JStartup implementing class and have this thing create the objects you want and bind them to JNDI.

Similar Messages

  • How to view logs of web application deployed in oc4j

    Hi,
    I have my oc4j server running, I have deployed a web application under instance DCG.
    Please let us know, where can I find the logs of my application.
    Thanks,
    Nagesh.

    Usually while deploying a application through "Oracle Enterprise Manager 10g Application Server Control" we specify the log and configuration path needed for developed application provided developer has developed the application to store the logs. by default all logs will be there in opmn logs.
    you can have a look on following locations
    +$ORACLE_HOME/opmn/logs/DCG~OC4J* <OC4J name>+
    or
    +$ORACLE_HOME/j2ee/<OC4J>/log/<OC4J>/oc4j/log.xml+
    Hv a good day!
    Edited by: KuldeepSingh on 16-Jan-2012 19:40

  • How to define JAXP Parsers and Transformer in a Web Application Context

    Hi
    I need to define JAXP Parsers and Transformer in a Web Application Context where I can deploy this application in any J2EE Application Server without modifying the server. That means that I can't set System properties or set the jaxp.properties file. I tried to use the META-INF/services/javax.xml.transform.TransformerFactory file but it didn't work.
    Any ideas?

    Hi
    I need to define JAXP Parsers and Transformer in a Web Application Context where I can deploy this application in any J2EE Application Server without modifying the server. That means that I can't set System properties or set the jaxp.properties file. I tried to use the META-INF/services/javax.xml.transform.TransformerFactory file but it didn't work.
    Any ideas?

  • Character encoding across Web application contexts

              If I submit an HTTP request encoded in SHIFT-JIS across Web application contexts,
              the characters seem to get mangled. Do I need to do anything special to pass request
              objects that are encoded in SHIFT-JIS to another context.
              

    a. EUC-JP
    EUC is Extended Unix Code.
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=x-euc-jp">x-euc-jp should be EUC-JP. You use x- for non-registered
    encoding names with IANA.
    b. JIS
    Japanese Industrial Standard
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=iso-2022-jp">To be precise, JIS means nothing. JIS has many standards.
    It is an ISO-2022 encoding applied to JIS code sets.
    c. Shift_JIS
    Microsoft's Japanese encoding method loosly based on
    JIS.
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=x-sjis">Use "charset=Shift_JIS" in most cases.
    >
    d. UTF-8You use charset=UTF-8.
    - Which one of the above 4 I should use? Either one is fine as long as you include the meta tag
    in HTML. If you want to support older generation of
    browsers, then skip UTF-8. If you target i-mode
    phone browser, use Shift_JIS.
    - Do I have to worry about the encoding of the
    Japanese data being entered by user in the input
    fields in the HTML form?Yes. Use the same encoding as the encoding of the form.
    Make sure to call response.setEncoding to set the
    enxoding for the parameter processing.
    - What should be encoding of the content of html
    output generated by the JSP?Use contentType tag in page directive.

  • How to create different log files for each of web applications deployed in OC4J

    Hi All,
    I am using OC4J(from Oracle) v1.0.2.2 and Windows2000. Now I want to know
    1. how to create different log files for each of my deployed web applications ?
    2. what are the advantages in running multiple instances of oc4j and in what case we should run
    multiple instances of OC4J ?
    3. how to run OC4J as Windows2000 Service rather than Windows2000 Application ?
    Thanks and Regards,
    Kumar.

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • How to redeploy Calculation Manager Web Application Server

    Hi All,
    I am installing a patch(13925741) for Calculation Manager, i stuck at the following point:
    6. Perform the standard Calculation Manager Web application server deployment task using Hyperion Enterprise Performance Management System Configurator (EPM System Configurator). See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions.
    I don't know how to redeploy Calculation Manager Web Application Server, plz help me in deploying this.
    The readme for the patch can be found at:
    https://updates.oracle.com/Orion/Services/download?type=readme&aru=15356919#_Toc330987031

    909062 wrote:
    Hi All,
    I am installing a patch(13925741) for Calculation Manager, i stuck at the following point:
    6. Perform the standard Calculation Manager Web application server deployment task using Hyperion Enterprise Performance Management System Configurator (EPM System Configurator). See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions.
    I don't know how to redeploy Calculation Manager Web Application Server, plz help me in deploying this.
    The readme for the patch can be found at:
    https://updates.oracle.com/Orion/Services/download?type=readme&aru=15356919#_Toc330987031
    Hi,
    Did you actually try to look at the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide for instructions as suggested ?
    To redeploy a component, run the configurator that can be found in the start menu under Foundation Services. Then select "modify an existing instance". Then for Calculation manager, check the box "Deploy to application server".
    Thanks,
    JM

  • How can I get the web application's context root?

    I have a web application, which is defined in Tomcat's server.xml:
    <Context path="/cbes" docBase="e:\work\GM\code\CBESCurrency" debug="0"
    reloadable="true" crossContext="false"/>
    And I hava a servlet in this web application.
    How can I get the context root of the web application?
    in this example: reture should be "cbes" or "/cbes"
    how?
    thanks alot.

    getContextPath() in javax.servlet.http.HttpServletRequest

  • How to load some setting in application bean on web application start up?

    Hi
    Thank you for reading my post
    Is it possible to load some setting in applicationBean when the web application starts?
    And also
    I need to store some of my application configuration in a .properties file
    can some one please help me with the following items ?
    -How i can access the .properties file
    -where should i put it.

    Hi
    Thank you
    How i can load the .properties files ?
    how should i find the path ? some servers does not allows an application to find the real path to load a file.
    Thanks

  • How do I define my web application path in Tomcat6

    Hi friends,
    Can anybody tell me how to define and where to define my web-application path in tomcat 6 server?
    I absolutely don't want to change any files inside tomcat6\conf\ folder (like its server.xml or context.xml)
    My problem comes in the following scenario:
    i) My Webapplication path is c:\tomcat6\webapps\test-servletii) I have one html form file registration.html in c:\tomcat6\webapps\test-servlet\registration.htmliii) I have a form processing servlet in path c:\tomcat6\webapps\test-servlet\WEB-INF\classes\pkg_register\Process_Registration.classiv) web.xml file inside WEB-INF\ has contents
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <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>Process_Registration</servlet-name>
         <servlet-class>pkg_register.Process_Registration</servlet-class>     
    </servlet>
    <servlet-mapping>
         <servlet-name>Process_Registration</servlet-name>
         <url-pattern>/Process_Registration</url-pattern>
    </servlet-mapping>
    </web-app>PROBLEM : In html <form action="/test-servlet/Process_Registration"> works fine.
    But every time I don't want to give my web application folder name in URLs( not in web.xml or in form action, it should be default relative path).
    I want to give just, <form action="/Process_Registration"> in registration.html file's form action.
    Any help is appreciated.
    Thanks.
    ---Sujoy

    Thanks...
    It solved the problem by putting <form action="Process_Registration"> instead of <form action="/Process_Registration">When I was using <form action="/Process_Registration"> it was directly taking me to
    http://localhost:8888/Process_Registration .
    But, now when i use <form action="Process_Registration"> it takes me to
    http://localhost:8888/test-servlet/Process_Registration which IS CORRECT.
    But, still i don't know why the <form action="/Process_Registration"> was taking me out of my current webapplication path. It should have given me ERROR.
    --Sujoy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can I develop a web application using EJB design pattern?

    I have searched over the web and found quite a lot of tutorials on how to use the EJB design pattern.
    I know that there will be a home interface, EJB object interface and a SessionBean.
    But the tutorials often only cover a single class, this made me unable to get a complete picture of how EJB design pattern can be implemented into a whole system.
    I am now required to devleop an online shopping web application using EJB and JSP page.
    I think I will need to create a lot of classes: Member, ShoppingCart, Product...etc.
    What I want to ask is that, do I need to create a home interface, EJB object interface and a SessionBean for each of these classes?
    I really need some ideas on how to develop this system using EJB + JSP pages.
    Many thanks to you all.

    For every EJB that you want to create, you will need to code a home and remote interface and a bean class.
    You could start getting your ideas here
    http://www.theserverside.com/books/wiley/masteringEJB/
    http://www.coreservlets.com

  • Order of class loading in a Web Application

    Hi,
    I have been trying to find out if there is a defined order in which classes contained in WEB-INF/classes
    and/or WEB-INF/lib should be loaded.
    There doesn't appear to be any mention of class loading order in either the J2EE 1.3 or J2EE 1.4
    specifications. That does not mean that there isn't a defined class load order, it just means I haven't found one.
    Typical behaviour from servers such as Tomcat (reference implementation of the Servlet Engine) show
    that classes in WEB-INF/classes are loaded before classes contained in jars under WEB-INF/lib.
    Because there doesn't appear to be a mandated class load order I cannot assume that the same
    behaviour holds for all servers, unless someone here knows better of course.
    The reason for the question is that relying on the exhibited class load order means we can patch web applications by simply putting the patch under the WEB-INF/classes directory.
    If this should not be relied upon then patches will have to be applied directly to the affected jar files,
    this is not a problem in itself however it is nice to be able to keep the patches out of the jars for
    ease of rolling back patches without having to copy jar files all over the place.
    Any insights would be welcome.
    Thanks

    If you say that it is server specific i don't find
    that to be the correct answer b'cozI didn't give an answer, I am looking for one. I gave an example of the behaviour that Tomcat 4.1.x
    exhibits, one that we currently make use of for patching web applications. My question was about
    whether or not this behaviour can be relied upon.
    the class files are depended on the jar files which
    need to checked in first before getting loaded b'coz
    it should check for dependent files before only while
    getting deployed.This is why the class load order is important.
    Is the Web Application Classloader going to look in WEB-INF/classes first every time followed
    by WEB-INF/lib everytime, is the order undefined, or is it reversed?
    More over if you just think of class loading mechanism
    of classes folder only then it is loaded in the order
    specified in the web.xml file.
    in this we specify the order of loading.As far as I know web.xml does not allow you to specify where classes should be loaded from and in
    which classpath order, you define which classes should be used for application components.
    The only load order you can specify is the load order of servlets on startup.
    If you know different I would love to know how you would configure web.xml to specify the classpath order
    in which classes are loaded.

  • How change information between two Web Applications?

    Hi,
    Has anyone any code sample or article how to build
    a "bridge" that would change data stored into session and servletcontext
    between two separete web application in same servlet engine?
    What I have understood is that they can not normally share same
    session or servletcontext data...
    Thanks,

    Hmm...
    Text in this Sun's tutorial says:
    "This lesson, however, shows you what to do if your servlet requires a resource available from its own server"
    The actual problem is following:
    - In Web Application 1 servlets/jsps stores data into session object and servletcontext
    - then user can request a page in Web Application 1 which should "activate/launch" Web Appilication 2 and
    pass some session objects or objects stored into servletcontext from Web Application 1 to Web Application 2.
    How to do this, it's the problem.

  • How to access deployed J2EE Web application ?

    Hi,
    I am new to J2EE Web Application. I have created a Web Module project and in that I have created a servlet. I did a build for WAR file. I have created an Enterprise Application Project and included this WAR file. I built  the EAP and deployed it to J2EE engine. I am successful till here.
    I am not sure how to access this deployed application and thus this servlet.
    I tried to access the following way :
    http://<hostname>:<portnumber>/<EAPName>/<ServletName>
    However, I receive the error no such location.
    In the web.xml file, in the servlet-mapping section, I have mentioned the servletname and urlpattern.
    I have mentioned the urlpattern as MyServlet and not /MyServlet. Notice the 'backslash'.
    Could this be an issue ?
    Regards,
    Subramanian V.

    Hi
    See this Thread
    Re: servlet ----->url association ?
    Re: Servlet not getting loaded when put in a jar file
    Re: I just want to run a simple servlet. No EJBs, no Web DynPro...
    /message/610344#610344 [original link is broken]
    Kind Regards
    Mukesh

  • How to create our own web application on apache tomcat

    I am using Tomcat's default location to place my servlets.
    "E:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT"
    But day by day my classes are increasing. Now i am feeling to have my own location to place my servlets.
    Ex. "E:\myservlets"
    How to create and activate our own web application on apache tomcat except from tomcat's directory structure? Please guide me in this regard.
    Thanks in advance.

    hi,
    you can place your own application in any where
    then you to open under tomcat/conf/server.xml file
    add
    <Context path="/examples" docBase="e:/examples" debug="0"
             reloadable="true" ......./>

  • How do you get the web application path from the servlet?

    I have created a web application which is installed in
    /webapps/myApplication
    /webapps/myApplication/data/users.xml
    /webapps/myApplication/WEB-INF/classes/myServlet
    How can you get the path to the "users.xml" file from the "myServlet" file?
    The code below doen's seem to return the xml file. anybody knows why?
    public class myServlet extends HttpServlet {
    public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException
    File myXmlFile = new File("/data/users.xml");

    Try this..
    String FileName = getServletContext().getRealPath("\\data\\users.xml");
    File myXmlFile = new File(FileName);
    hope this helps..

Maybe you are looking for

  • Mail unable to connect with outgoing server...

    Hi everyone!! I've been having a problem with mail for the past week and i can receive but cannot send any mail. Checking the connection doctor there's a message saying it "couldn't connect to the SMTP server" although i have the passwords set correc

  • Subasignment and Movement types in Data colletcion

    Hi How to upload reported data first only with all subasignment (Trading Partner, Segment, other Customs) but without Movement Types (MT) and after this load again but only with MT? If we do in that order we have double value for item. BDC reguired v

  • Toshiba Tecra R840-00L: Recovery Media & 2010 MS Full Office ??

    Hello; 1. I've just bought another Toshiba Notebook: Tecra R840-00L. I'm going through the 20-page abbreviated User Information Guide supplied with the unit. I haven't started the computer yet. There're a couple of concerns, and I'd very much appreci

  • Incomplete payload in application at request timeout

    Dear All we have implemented a scenario for webservice, and its working fine. we have managed all configuration with respect to timeouts at adapter and server level and they are working fine as well... now the problem i am facing is at request timeou

  • Preferences Pane Problem.. The pane opens as a small tab. (screenshots inc)

    Hi I'm having a problem with Safari preferences on my Samsung R519 laptop. I find the Apple Homepage a little slow and so wanted to change it to a lighter and quicker page but I can't seem to get to the preferences to change it.. The prefs pane opens