Runnung a J2EE application (EAR)


General J2EE: Runnung a J2EE application (EAR)

  1. Runnung a J2EE application (EAR) (2 messages)

    I am new to J2EE. O have created a EnpDtls Servlet 0s imply to print greet a person by name - like sample application. But i am unable to see it in on web (localhost:8080). What should i give as url ? I am using J2EE 1,4 Application Server 8.2 from SUN. I can see my html file under Context Root i.e localhost:8080/EmpDtlsCx. But what should be the url to see the class file of my sevlet. Servlet is : EmpDtls.class ContextRoot : /EmpDtlsCx Web Display : EmpDtlsWebDsp EAR file : EmpDtlsEar I have used deploytool. I can also see the Application in Admin console (localhost:4848) -> Enterprise Application. But there also it does not given ay otion of launch as it gives for Web Application. In fact the verifier option in Admin consoile also passes of sucessfully. The deployment descriptors: application.xml, sun-application.xml are under /domains/domain1/applications/j2ee-apps/EmpDtlsEar/ - the name of the EAR file. Should i get ContextRoot as folder name ? Could anyone help in solving my problem ? thanks ins advance attand
  2. Re: Runnung a J2EE application (EAR)[ Go to top ]

    Suppose you have a servlet class, drop under classes directory in the web-inf od your directory(context) and use http://localhost:8080/context/HelloWorld if package then separate package names by / cheers,
  3. Re: Running a J2EE application (EAR)[ Go to top ]

    Thanks for your reply. What i understand from yr ans is that there should be a directory for contextRoot. In my case it should be /EmpDtlsCx - staring with a forward slash. Beneath this there would be a directory caledd WEB-INF. So if i am creating an application, where should the conextRoot (EmpDtlsCx) be created. I am getting a folder in the name of EAR file /domains/domain1/applications/j2ee-apps/EmpDtlsEar/ In my case my is /opt/SUNWappserver. Below that is the following structure EmpDtlsEar | |____ META-INF | | | |____ application.xml | |____ sun-spplication.xml | |____ sun-j2ee-ri.project | |____ MANIFEST.MF | |____ war-ic.war | |____ EmpDtls.html | |____ META-INF | | | |__ MANIFEST.MF | |____ WEB-INF | |__ web.xml | |__ sun-web.xml | |__ sun-jee-ri.project | |__ classes | |__ EmpDtls.class ======================================================== So you see that there is no directory in the name of contextRoot: EmpDtlsCx. Moreover, is the class file be given in url i.e if the class is names HelloWorld.class then can we enter HelloWorld (without extension) in url for its execution ? thanks in advance amit ======