facebook

Deploy and run simple JSP page in OC4J 9.0.4

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #202023 Reply

    nlb
    Member

    Hi
    I am using
    eclipse 2.1.2
    myeclipse 2.6.200
    with OC4J 9.0.4

    For starters I have configured OC4J in preferences | Myeclipse | Application servers.

    As mentioned in some of the old threads I have edited server.xml in OC4J wit h the following lines

    <application-server application-directory=”../applications”
    application-auto-deploy-directory=”../application-autodeploy”
    deployment-directory=”../application-deployments”
    connector-directory=”../connectors”
    >

    according to OC4J 9.0.4 documentation
    ——-
    application-auto-deploy-directory=”…/applications/auto”
    —Specifies the directory from which EAR files are automatically detected and
    deployed by the running OC4J server. In addition, it performs the Web
    application binding for the default Web site.

    ——–

    auto-deploy directory works for EAR files.

    I created a simple JSP page. deployed in pacaged format, it created a WAR file in the above directory

    I couldn’t run the jsp page, my guess it is because the webapp isn’t in EAR file.

    My questions

    (1) Can myeclipseide package webapp as EAR instead of just war, for OC4J

    (2) the default web.xml doesn’t even have context root, I specified the context during the web module creation

    (3) what manual steps I need to take, to get my simple JSP page working

    (4) There is no way to configure the deployment directory in myeclipse, (i.e change application-autodeploy) , otherwise for simple jsp page i could just point default web app in OC4J which takes exploded format also.

    thanks
    nlb

    #202100

    nlb
    Member

    repost , any ideas !

    #202102

    Riyad Kalla
    Member

    I’ve asked Scott to take a look here as I’m not albe to help.

    #202111

    Scott Anderson
    Participant

    nlb,

    (1) Can myeclipseide package webapp as EAR instead of just war, for OC4J

    Yes, it can. Simply create a new EAR project and in the wizard specify that you want to associate an existing web project with it rather than creating a new one. Then, deploy the new EAR project to OC4J instead of the original war project.

    (2) the default web.xml doesn’t even have context root, I specified the context during the web module creation

    That’s because web.xml files don’t have anywhere TO specify a context root. That can only be done in an application.xml file in an EAR. You can specify what you want that to be in the ‘MyEclipse > Add Remove Modules…’ wizard when you assocate the web project with the ear project .

    (3) what manual steps I need to take, to get my simple JSP page working

    Since OC4J doesn’t recognize anything but packaged ear deployment, just adjusting your model as I suggested in 1) should do it.

    (4) There is no way to configure the deployment directory in myeclipse, (i.e change application-autodeploy) , otherwise for simple jsp page i could just point default web app in OC4J which takes exploded format also.

    Sorry, reconfiguration of the deployment directory isn’t currently supported.

    #202254

    nlb
    Member

    Scott, thanks for the tips.
    I was able to create an EAR and deploy it to OC4J instance.

    I went to next step, where in the above scenario, I am trying to
    debug a JSP page.

    (Created an EAR , with web module and deployed)

    In the appserver preferences, I set debug mode for Oracle9iAS launch.
    set some breakpoints in jsp page.
    start oc4j.
    Debug prespective shows the threads.
    Ran the JSP page from browser, but it didn’t hit the breakpoints.

    Any pointers ?

    (1) Does debugging work with JSP pages in packaged archive ?

    thanks
    nlb

    #202255

    Scott Anderson
    Participant

    nlb,

    (1) Does debugging work with JSP pages in packaged archive ?

    Yes, debugging works in a packaged archive, but only for servers that have JSR-045 support. Oracle’s oc4j isn’t such a server so JSP debugging will not function with it. Tomcat 5 works very nicely, however. 😉

    #262872

    paslor
    Member

    oracle’s oc4j101310 anounced to support JSR-45,however jsp debugging not work for me.
    version I use:
    eclipse 3.2.0
    myeclipse 5.0.1GA
    oc4j server: 101310

    #262879

    Riyad Kalla
    Member
Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Deploy and run simple JSP page in OC4J 9.0.4

You must be logged in to post in the forum log in