Exploded directory
Is it possible for me to deploy an exploded directory in WAS 6.40?
I need to test my JSPs quickly and the process of building WAR -> EAR -> Deploy is really taking a toll on productivity.
Hi,
Yes it is possible to test your JSPs quickly without building WAR->EAR files each time. The condition is that you should have deployed the EAR application once for the first time. For your subsequent changes, you can just keep changing the JSPs in the deployed location of the application on the J2EE engine.
After you have deployed the EAR for the first time, got to this location on the J2EE engine installation:
\usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\<EAR_APP_NAME>\servlet_jsp\<CONTEXT_ROOT_NAME>\root
Change your instance names accordingly.
This is the location where you will have your JSPs. Make your changes here and save and it works!
Hope this helps.
Regards,
Manish
Similar Messages
-
Re: Exploded directory format in an EAR
I am now trying to deploy the ear file in v6.1 sp2. Has anyone managed to deploy
an ear where util / third party classes are stored in a lib directory of the ear
and referenced in EJB-jar manifest.mf files using the classpath header?
ie as documented in bea weblogic server bible on page 614/615
EntApp/
accountEJB.jar
accountManager.war
/lib/
xerces.jar
xalan.jar
log4j.jar
/META-INF/
application.xml
"erik" <[email protected]> wrote:
>
>This is hearsay but I was recommended to use v 6.1 SP 2.
>/erik
>
>"Ivan" <[email protected]> wrote:
>>
>>I have a problem wrapping up an exploded directory format application
>>into an ear
>>file running weblogic 6.0sp2 on winnt 4. One of the things I would like
>>to do
>>is load a config file from a helper class without specifying a path.
>>
>>
>>EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar
>>statementwebapp.war
>>META-INF/application.xml lib/log4j.jar (and other third party jar files
>>crimson.jar,
>>jaxp.jar etc.)
>>
>>The third party jar files have been manually unjar'ed and re-jar'ed
>without
>>compression
>>(after reading that a suggestion to someone else).
>>
>>WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
>>- servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds
>>- tag library
>>descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
>
>>
>>Some of the helper classes make use of configuration files (for example
>>I have
>>a Logger class that uses Log4j). Here is how I would like to access
>the
>>config
>>file
>>
>>... private static final String config = "config.properties" ; PropertyConfigurator.configure(
>>config ) ; ...
>>
>>I have tried putting the config.properties file in the WEB-INF/classes
>>directory
>>and in the WEB-INF directory, however they don't seem to be found by
>>the class
>>loader.
>>
>>EJB statement.jar contains an ejb with the following: uk...business.statement...
>>- Statement ejb classes with ejbc generated stub and skeleton classes
>>uk...util
>>- Several Helper classes
>>
>>One such helper is Logger for which the Log4j jar file is needed. I
>deploy
>>the
>>statement.jar file in the ear (as listed above). Weblogic throws an
>error
>>message
>>saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
>>org/apache/log4j/Category ie it cannot find the log4j package which
>is
>>referenced
>>in the Class-Path header of the manifest.mf file and located in the
>ear
>>file under
>>the lib directory.
>>
>>The manifest.mf file contains a line with the following: Class-Path:
>>lib/log4j.jar
>>lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise
>>classloader
>>to pick up the log4j.jar and xml parsing classes (ref. weblogic server
>>bible chap
>>18) without needing to be referenced in the weblogic start up class
>path.
>>
>>
>>Can manifest class-path references be used like this in weblogic 6.0?
>>Where should
>>I put the application properties files in the war and jar files?
>>
>>Clarification much appreciated. Ivan.
>>
>>PS: I had this application working in exploded directory format with
>>the jar files
>>in the system classpath and the properties file locations hardcoded
>in
>>the class
>>files. (not ideal for a clustered production environment!)
>>
>
This is hearsay again.
These people did as you did no compression etc. they were able to put the application's
utility classes in a lib but not the third party jars. They suspected that the
ear where to big to deploy so they put all thirdparty jars in the system classpath
and then the internal utility classes were loaded by using CLASSPATH in the manifest
file.
I gave up because I could deploy everything except servlets and I went back to
exploded deployment. That bloody EAR thing took to much time.
If you succeed in everything including warfiles with JSPs and servlets (those
I was talking about only had EJBs)
let me know.
I also had a peculiar problem with EARs that a cascading stylesheet was not found
in the ear but it worked in an exploded it worked fine
Otherwise I must recommend Orion, which I had up and running in a matter of days
when ported from WLS 5.1.
Good luck.
"Ivan" <[email protected]> wrote:
>
>I am now trying to deploy the ear file in v6.1 sp2. Has anyone managed
>to deploy
>an ear where util / third party classes are stored in a lib directory
>of the ear
>and referenced in EJB-jar manifest.mf files using the classpath header?
>
>ie as documented in bea weblogic server bible on page 614/615
>EntApp/
> accountEJB.jar
> accountManager.war
> /lib/
> xerces.jar
> xalan.jar
> log4j.jar
> /META-INF/
> application.xml
>
>"erik" <[email protected]> wrote:
>>
>>This is hearsay but I was recommended to use v 6.1 SP 2.
>>/erik
>>
>>"Ivan" <[email protected]> wrote:
>>>
>>>I have a problem wrapping up an exploded directory format application
>>>into an ear
>>>file running weblogic 6.0sp2 on winnt 4. One of the things I would
>like
>>>to do
>>>is load a config file from a helper class without specifying a path.
>>>
>>>
>>>EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar
>>>statementwebapp.war
>>>META-INF/application.xml lib/log4j.jar (and other third party jar files
>>>crimson.jar,
>>>jaxp.jar etc.)
>>>
>>>The third party jar files have been manually unjar'ed and re-jar'ed
>>without
>>>compression
>>>(after reading that a suggestion to someone else).
>>>
>>>WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
>>>- servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds
>>>- tag library
>>>descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
>>
>>>
>>>Some of the helper classes make use of configuration files (for example
>>>I have
>>>a Logger class that uses Log4j). Here is how I would like to access
>>the
>>>config
>>>file
>>>
>>>... private static final String config = "config.properties" ; PropertyConfigurator.configure(
>>>config ) ; ...
>>>
>>>I have tried putting the config.properties file in the WEB-INF/classes
>>>directory
>>>and in the WEB-INF directory, however they don't seem to be found by
>>>the class
>>>loader.
>>>
>>>EJB statement.jar contains an ejb with the following: uk...business.statement...
>>>- Statement ejb classes with ejbc generated stub and skeleton classes
>>>uk...util
>>>- Several Helper classes
>>>
>>>One such helper is Logger for which the Log4j jar file is needed. I
>>deploy
>>>the
>>>statement.jar file in the ear (as listed above). Weblogic throws an
>>error
>>>message
>>>saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
>>>org/apache/log4j/Category ie it cannot find the log4j package which
>>is
>>>referenced
>>>in the Class-Path header of the manifest.mf file and located in the
>>ear
>>>file under
>>>the lib directory.
>>>
>>>The manifest.mf file contains a line with the following: Class-Path:
>>>lib/log4j.jar
>>>lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise
>>>classloader
>>>to pick up the log4j.jar and xml parsing classes (ref. weblogic server
>>>bible chap
>>>18) without needing to be referenced in the weblogic start up class
>>path.
>>>
>>>
>>>Can manifest class-path references be used like this in weblogic 6.0?
>>>Where should
>>>I put the application properties files in the war and jar files?
>>>
>>>Clarification much appreciated. Ivan.
>>>
>>>PS: I had this application working in exploded directory format with
>>>the jar files
>>>in the system classpath and the properties file locations hardcoded
>>in
>>>the class
>>>files. (not ideal for a clustered production environment!)
>>>
>>
>
-
Exploded directory format in an EAR
I have a problem wrapping up an exploded directory format application into an ear
file running weblogic 6.0sp2 on winnt 4. One of the things I would like to do
is load a config file from a helper class without specifying a path.
EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar statementwebapp.war
META-INF/application.xml lib/log4j.jar (and other third party jar files crimson.jar,
jaxp.jar etc.)
The third party jar files have been manually unjar'ed and re-jar'ed without compression
(after reading that a suggestion to someone else).
WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
- servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds - tag library
descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
Some of the helper classes make use of configuration files (for example I have
a Logger class that uses Log4j). Here is how I would like to access the config
file
.. private static final String config = "config.properties" ; PropertyConfigurator.configure(
config ) ; ...
I have tried putting the config.properties file in the WEB-INF/classes directory
and in the WEB-INF directory, however they don't seem to be found by the class
loader.
EJB statement.jar contains an ejb with the following: uk...business.statement...
- Statement ejb classes with ejbc generated stub and skeleton classes uk...util
- Several Helper classes
One such helper is Logger for which the Log4j jar file is needed. I deploy the
statement.jar file in the ear (as listed above). Weblogic throws an error message
saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
org/apache/log4j/Category ie it cannot find the log4j package which is referenced
in the Class-Path header of the manifest.mf file and located in the ear file under
the lib directory.
The manifest.mf file contains a line with the following: Class-Path: lib/log4j.jar
lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise classloader
to pick up the log4j.jar and xml parsing classes (ref. weblogic server bible chap
18) without needing to be referenced in the weblogic start up class path.
Can manifest class-path references be used like this in weblogic 6.0? Where should
I put the application properties files in the war and jar files?
Clarification much appreciated. Ivan.
PS: I had this application working in exploded directory format with the jar files
in the system classpath and the properties file locations hardcoded in the class
files. (not ideal for a clustered production environment!)
This is hearsay but I was recommended to use v 6.1 SP 2.
/erik
"Ivan" <[email protected]> wrote:
>
>I have a problem wrapping up an exploded directory format application
>into an ear
>file running weblogic 6.0sp2 on winnt 4. One of the things I would like
>to do
>is load a config file from a helper class without specifying a path.
>
>
>EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar
>statementwebapp.war
>META-INF/application.xml lib/log4j.jar (and other third party jar files
>crimson.jar,
>jaxp.jar etc.)
>
>The third party jar files have been manually unjar'ed and re-jar'ed without
>compression
>(after reading that a suggestion to someone else).
>
>WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
>- servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds
>- tag library
>descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
>
>Some of the helper classes make use of configuration files (for example
>I have
>a Logger class that uses Log4j). Here is how I would like to access the
>config
>file
>
>... private static final String config = "config.properties" ; PropertyConfigurator.configure(
>config ) ; ...
>
>I have tried putting the config.properties file in the WEB-INF/classes
>directory
>and in the WEB-INF directory, however they don't seem to be found by
>the class
>loader.
>
>EJB statement.jar contains an ejb with the following: uk...business.statement...
>- Statement ejb classes with ejbc generated stub and skeleton classes
>uk...util
>- Several Helper classes
>
>One such helper is Logger for which the Log4j jar file is needed. I deploy
>the
>statement.jar file in the ear (as listed above). Weblogic throws an error
>message
>saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
>org/apache/log4j/Category ie it cannot find the log4j package which is
>referenced
>in the Class-Path header of the manifest.mf file and located in the ear
>file under
>the lib directory.
>
>The manifest.mf file contains a line with the following: Class-Path:
>lib/log4j.jar
>lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise
>classloader
>to pick up the log4j.jar and xml parsing classes (ref. weblogic server
>bible chap
>18) without needing to be referenced in the weblogic start up class path.
>
>
>Can manifest class-path references be used like this in weblogic 6.0?
>Where should
>I put the application properties files in the war and jar files?
>
>Clarification much appreciated. Ivan.
>
>PS: I had this application working in exploded directory format with
>the jar files
>in the system classpath and the properties file locations hardcoded in
>the class
>files. (not ideal for a clustered production environment!)
>
-
Deploy web application with exploded directory format
I am quite new with Oracle9iAS Containers for J2EE. Currently, my project is not using EJB, only JSP and Servlets. I want to deploy the war file with exploded directory format. I don't want to use the default web application directory j2ee/home/default-web-app. The "Using Oracle9iAS Containers for J2EE" get start documentation only explained how to deploy J2ee application. What about the web application without EJB jar file? Anybody knows how to do that. Please let me know.
Thanks in advance.Though you don't have ejbs, you can still use the ear file format. This would be most convenient way of deploying.
Use of a tool like Ant is recommended if you are not using JDeveloper.
Also, you can findinfo on deploying using a exploded directory
http://otn.oracle.com/docs/tech/java/oc4j/htdocs/getstart.htm#1027810
But recommed having ear file as it is convenient. If you want to see an example of use of Ant and deploying using ear file
check out one of the recently posted how-tos E.g. http://otn.oracle.com/tech/java/oc4j/htdocs/how-to-servlet-events.html -
Exploded directory: wl6.0 sp2: how to define in config.xml?
hi,
how do i define a web server with exploded directory format. i dont want to
use webcomponent because it creates a war and the jsp changes are not
reflected. war is fine for production, but during development i dont want to
restart the server to see the jsp changes.
is there a way to create a web server component with an exploded directory
format in config.xml. i want to map the current jsp directory to the web
server.
in short: i want to see the jsp changes immediately without restarting the
server everytime.
thanks.
"Muthu Ram" <[email protected]> wrote:
>hi,
>
>how do i define a web server with exploded directory format. i dont want
>to
>use webcomponent because it creates a war and the jsp changes are not
>reflected. war is fine for production, but during development i dont
>want to
>restart the server to see the jsp changes.
>
>is there a way to create a web server component with an exploded directory
>format in config.xml. i want to map the current jsp directory to the
>web
>server.
>
>in short: i want to see the jsp changes immediately without restarting
>the
>server everytime.
>
>thanks.
>
>
apparently if you create an empty file called REDEPLOY (no exstension) in your
meta-inf directory then either touch it if on unix or change it and save it (i
add then delete a spce in it) in win32. apparently wls looks at this file and
if its been changed it reloads the rest off the webapp and hey presto dynamic
deployment. the alternative is to goto the console goto your app uncheck the deployed
box click apply then check the deployed box and click apply (this should redeploy
it). Note jsps don't seem to redeploy well if you have keepgenerate set to true
in the weblogic.xml.
-
Any tool to help deploy with Exploded Directory Format
I read through the "Oracle9iAS Containers for J2EE" Getting Started document and saw the section on "Deploying with Exploded Directory Format". I would like to take the Petstore1.1.2 code and put it in exploded directory format so that OC4J can easily pick up changes to servlets and EJBs. But the codebase for Petstore is complicated enough that I would like to have a tool (possibly ant) that can automate the process of going from either the source directory or even ear file to the "exploded directory format".
Are there any tools available to help automate this process??Never mind. This stuff is a lot simpler than I initially thought. There is no need for a tool because it is easy enough to do by hand.
Sorry for bothering everyone -
Exploded Directory path for BPM Worklist Applications
Hi All,
If anybody could tell me the location of Exploded Directory where all the existing worklist apps related jsfs are available it would be a great help for me to do some sort of Customization to the out of box Oracle 11g BPM worklist app.
Durga.Hi Durga
1. Assuming you have a standard SOA/BPM Domain with one AdminServer and one SOA_SERVER1, here is the location where most of the modules are exploded and stored: /yourWeblogicSOAHome/user_projects/domains/yourSOABPMDomain1/servers/soa_server1/tmp. Under this tmp folder, you will see bunch of sub-folders and they have some more sub-folders. It is really tedious if you really want to cusotmize and modify files located at this location. I would strongly NOT recommend this. The files in tmp folders are not gauranteed. Afterall they are temporary file. And most of the times, when I restart my SOA SERVER, I always delete cache, tmp and logs folders. So you will loose all changes and you had to take back up of your changes and restore them.
2. If you really want customizations like increase timeout say for example, you should use weblogic console, deployments, that war/ear and modify and store the changes in custom plan.xml file.
3. If you really want to customize some jsff stuff, figure out which EAR/WAR is having that file. You can use general perception. Then directly go to the actual EAR and extract and get JAR/WAR. Then extract contenst of WAR and then modify jsff etc. Put jsff with same path back in war and put war back in EAR. Most of the soa modules are located at /yourWeblogicHome/Oracle_SOA1/soa/modules. The most important modules that has core files are like bpm-services which are at: /yourWeblogicHome/Oracle_SOA1/soa/modules/oracle.soa.workflow_11.1.1 and actual data controls/ui stuff in bpm-workflow-datacontrol.jar file in the same above module. ALWAYS take back up of original EAR/WAR/JAR before you extract and make changes.
4. Last option is you create your own Custom Worklist app which is not very simple (I would say), unless you want very basic minimum stuff.
Thanks
Ravi Jegga -
Deploying the exploded directory
I am trying to find out if there are any known bugs for deploying the
exploded directory.Yes. See my recent post in the ejb section called "Classpath Help?"
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
Tangosol: How Weblogic applications are customized
"Mukesh Kumar" <[email protected]> wrote in message
news:3b4e0e25$[email protected]..
I am trying to find out if there are any known bugs for deploying the
exploded directory. -
Add a exploded directory to EAR's classpath
i created a enterprise application using workshop, rather than import some *.jar
files to the application's lib, i wanna add a exploded directory to this application's
classpath. can anybody tell me how?
i copy the directory to {myapp}/APP-INF/lib, but didnt work! any body can help
me? thx in advance!
RogerAPP-INF/classes and APP-INF/lib/*.jar will be in the EAR's classpath
-- Rob
Roger Tang wrote:
i created a enterprise application using workshop, rather than import some *.jar
files to the application's lib, i wanna add a exploded directory to this application's
classpath. can anybody tell me how?
i copy the directory to {myapp}/APP-INF/lib, but didnt work! any body can help
me? thx in advance!
Roger -
Behaviour differences between war file and exploded directory
Hi,
I'm baffled by differences in how my web app behaves when deploy in a war file and when deployed in exploded directory.
Firstly when I deploy in exploded directory format (using wldeploy in ant) - the jsps do not precompile. However, when I deploy the war file - again using ant and wldeploy - precompile works just fine - and general performance seems better.
Secondly - the webapp has a pdf file - which is used as a template to dynamically produce a document. When deployed
in exploded format - the webapp works fine and is able to read the pdf. However, when I deploy in war file, the pdf cannot be read.
Surely the behaviour should be the same whether we deploy as a war or exploded.
Someone please help
TariqSome behaviors will be different between a WAR file deployment and an exploded WAR deployment.
With respect to JSP precompile, you just say "they do not precompile", so I can't tell anything about that.
When you read files from an exploded WAR, you can reference them in two ways: as a resource, or as an absolute file path. When you read files from a WAR file, you can only read files as a resource, and not as an absolute file path. You're not giving any information about how you're reading the file, so I can't tell about that either.
You'd have to provide more detail to get better answers. -
Deploy Petstore in Exploded Directory(Weblogic 7.0)
I can deploy and run the Petstore in .ear format under Weblogic 7.0. How do I
run it in the Exploded format? Do I need to remove all the .ear, .jar, .war entries/tags
in my config.xml and application.xml files.
I did un-jar all the petstor.ear file and all the .jar files inside the petstore.ear(except
the jar files in the WEB-INF/lib/ directory). I did delete all the .ear, .jar
& .war files(except the jar files in the WEB-INF/lib/ directory), before I put
the exploded petstore/ directory under the ...server/config/examples/applications
directory.
Do I need to put an empty REDEPLOY file in the WEB-INF directory? Anything else
that I'm missing?
Please help! I'm stucked here.
I've attached a jar file, which includes my xml files and log files:
1. ...samples/server/config/examples/config.xml
2. ...samples/server/config/examples/applications/petstore/META-INF/application.xml
3. ...samples/server/config/examples/applications/petstore/WEB-INF/web.xml
4. ...samples/server/config/examples/applications/petstore/WEB-INF/weblogic.xml
5. 3 log files: wl-domain.log, wxamplesServer.log & access.log
[petstore_xml_log_files.jar]I can deploy and run the Petstore in .ear format under Weblogic 7.0. How do I
run it in the Exploded format? Do I need to remove all the .ear, .jar, .war entries/tags
in my config.xml and application.xml files.
I did un-jar all the petstor.ear file and all the .jar files inside the petstore.ear(except
the jar files in the WEB-INF/lib/ directory). I did delete all the .ear, .jar
& .war files(except the jar files in the WEB-INF/lib/ directory), before I put
the exploded petstore/ directory under the ...server/config/examples/applications
directory.
Do I need to put an empty REDEPLOY file in the WEB-INF directory? Anything else
that I'm missing?
Please help! I'm stucked here.
I've attached a jar file, which includes my xml files and log files:
1. ...samples/server/config/examples/config.xml
2. ...samples/server/config/examples/applications/petstore/META-INF/application.xml
3. ...samples/server/config/examples/applications/petstore/WEB-INF/web.xml
4. ...samples/server/config/examples/applications/petstore/WEB-INF/weblogic.xml
5. 3 log files: wl-domain.log, wxamplesServer.log & access.log
[petstore_xml_log_files.jar] -
How do specify Class-Path in exploded directory deployment?
Currently I have an app.ear(ejb.jar,lib.jar,web.war). In the MANIFEST file of
ejb.jar I do Class-Path: lib.jar. Now I exploded the app.ear and the components
into app(ejb,lib,web) directory structure, how do I write Class-Path? ../lib did
not seem to work for me. Any suggestions?I got the answer at the EJb newsgroup. Instead of ../lib, use just lib.
"Eric Ma" <[email protected]> wrote:
>
Currently I have an app.ear(ejb.jar,lib.jar,web.war). In the MANIFEST
file of
ejb.jar I do Class-Path: lib.jar. Now I exploded the app.ear and the
components
into app(ejb,lib,web) directory structure, how do I write Class-Path?
../lib did
not seem to work for me. Any suggestions? -
Web app failing to deploy in exploded directory format in weblogic6.1
Hi,
My web applications are failing to deploy in exploded format ,i.e when copied
to the the applications directory of the domain mydomain/applications. The logs
doesn't show any error, the server is just failing to read the applications other
than the default ones in myserver/applications directory
The deployment works if I create a .war file of the same directory structure and
deploy it via console
waiting for an early replymake sure your config.xml is configured correctly to the exploded format
(i.e. URI doesn't say webapp.war).
war:
<Application Deployed="true" Name="webapp"
Path=".\config\mydomain\applications">
<WebAppComponent Name="webapp" Targets="myserver" URI="webapp"/>
</Application>
exploded:
<Application Deployed="true" Name="webapp"
Path=".\config\mydomain\applications">
<WebAppComponent Name="webapp" Targets="myserver" URI="webapp.war"/>
</Application>
- Jamie
"Srinivas" <[email protected]> wrote in message
news:3b6a7f51$[email protected]..
>
Hi,
My web applications are failing to deploy in exploded format ,i.e whencopied
to the the applications directory of the domain mydomain/applications. Thelogs
doesn't show any error, the server is just failing to read theapplications other
than the default ones in myserver/applications directory
The deployment works if I create a .war file of the same directorystructure and
deploy it via console
waiting for an early reply -
Directory Structure ?s for an Exploded Web Application
We have an application that consists only of JSPs and Servlets, no
EJBs. I am researching whether or not it's worthwhile to start using
EJBs. We're also migrating from Weblogic 5 to 6.1. I've managed to
migrate our application fine and have it up and running on WLS 6.1.
I'm confused about the exploded directory structure, the
application.xml file, where to put the EJBs and whether or not I have
to jar them. Here's our current directory structure:
DefaultWebApp/ JSPs here
DefaultWebApp/WEB-INF web.xml and weblogic.xml here
DefaultWebApp/WEB-INF/classes Servlets and other classes here
DefaultWebApp/WEB-INF/lib do my un-jar-ed EJBs go here?
I've been reading a lot of BEA's documentation, particularly
‘Deploying an Exploded J2EE Application' and a ‘Web Application PDF',
and looking for relevant threads on the weblogic.developer.interest
groups. It looks like the application.xml should go in a new
DefaultWebApp/META-INF directory. But where do the EJBs go?
I also see some directory structures with another /web directory
that's confusing me.
Oh, I've also managed to compile and jar up a trial Stateless Session
EJB. Then I think I ‘auto-deployed' it into the /applications
directory, and Weblogic seems to recognize it. But when I tried to
reference it in a JSP, I got an error message ‘class x is public,
should be declared in a file named x.java'. I'm assuming this is
related to the application.xml, where I need to define the ejb
directory.
Thanks.To deploy your web app together with your EJBs, you need to create
an "EAR" structure. Both your webapp and your EJB jars will be within
this new structure, at the same level. You may jar up your EJBs, or you
may explode their structure, it's up to you.
The resulting structure should look something like below:
EnterpriseApp/ <-- new top level
EnterpriseApp/META-INF/
EnterpriseApp/META-INF/application.xml
EnterpriseApp/lib/ <-- shared libraries (if any)
EnterpriseApp/EJB/ <-- ejbs go here
EnterpriseApp/EJB/META-INF/ejb-jar.xml
EnterpriseApp/EJB/META-INF/weblogic-ejb-jar.xml
EnterpriseApp/EJB/com/your/ejb/classes/here
EnterpriseApp/WebApp/ <-- move your current app here
EnterpriseApp/WebApp/index.jsp <-- JSPs goes here
EnterpriseApp/WebApp/other.jsp
EnterpriseApp/WebApp/WEB-INF/web.xml
EnterpriseApp/WebApp/WEB-INF/weblogic.xml
EnterpriseApp/WebApp/WEB-INF/lib <-- ui libraries go here
EnterpriseApp/WebApp/WEB-INF/classes <-- servlets go here
The above structure is identical to the structure to an EAR file, only "exploded"
as actual files and directories instead of being "jarred" into a single EAR file.
Your application.xml in this case would specify something like:
<application>
<display-name>EnterpriseApp</display-name>
<description>My Enterprise Application</display-name>
<module>
<ejb>EJB</ejb>
</module>
<module>
<web>
<web-uri>WebApp</web-uri>
<context-root>/yourAppRoot</context-root>
</web>
</module>
</application>
And in config.xml you would have an entry similar to:
<Application Deployed="true" Name="EnterpriseApp"
Path=".\config\mydomain\applications\EnterpriseApp">
<WebAppComponent Name="ui" Targets="myserver" URI="WebApp"/>
<EJBComponent Name="ejb" Targets="myserver" URI="EJB"/>
</Application>
regards,
-Ade -
Refreshing JSP file for an exploded WAR without undeploying the WAR - 7210
The weblogic.Deployer utility with -activate option does redeploy my application. How do I prevent redeployment while refreshing. I'm using Weblogic 7.0.0.0.
Thanks
Senthil Kumar.S
Thanks mbg for your response.
Our production environment does not support the option a. We use the
option b approach.
My config.xml looks like this for the webapplication
<Application Deployed="true" Name="oas"
Path="/tmp/senthil/oas3.7.1.5"
StagedTargets="DOAS_MT_021_20501" TwoPhase="true">
<WebAppComponent Name="oas" Targets="DOAS_MT_CLUSTER_1"
URI="oas"/>
</Application>
I performed the following steps..
1) Modified the following jsp file on the admin.
/tmp/senthil/oas3.7.1.5/oas/customercare/contactus.jsp
2) Ran the following command on the admin
java weblogic.Deployer -adminurl t3://n.n.n.n:20501 -user system
-password weblogic -name oas -activate customercare/contactus.jsp
after running the command,
I was able to identify the corresponding jsp file immediately updated
on the managed instance under the stage folder. But the class file on
the stage folder was not updated and neither the class file on the
.wlnotdelete folder. I was using the pagecheckseconds on the
weblogic.xml as -1.
I stopped both the admin and manage, modified the pagecheckseconds to
1 Hour and when I performed same steps as before, I was able to see
the jsp file updated and also getting compiled (when accessed) and
serving the updated content. Also the user session was kept intact.
i.e. no interruption to the session. This was what I was expecting
for. The strange thing is, it didn't wait for one hour to compile. It
was compiling immediately when I accessed the modified jsp file. I'm
not sure whether it would behave the same way if I put that value as 1
day or some very big +ve value.
I'm not sure whether I'm doing the right way. i.e. changing the
pagecheckseconds to ve value. Also I'm not sure whether the ve value
for the pagecheckseconds would create impact on performance.
Thanks for your time.
Senthil Kumar.S
"Mark Griffith" <[email protected]> wrote in message news:<[email protected]>...
> Ahh clarity. :D
>
> You can:
>
> a) deploy your exploded web app with -nostage option. Meaning nocopy, or in
> otherwords "WLS when you deploy this Application to each server in the
> cluster, don't copy the bits to each server, just deploy from this src".
> What that means is that the path that maps to the directory of your webapp
> must be accessible, or resolvable on each server that it is deployed to.
>
> java weblogic.Deploy .... -nostage -activate -source /myapps/mywebapp
>
> so that /myapps/mywebapp must be resolvable on each server that it is
> deployed to. You can accomplish this via a shared network directory for
> /myapps or you can copy and create /myapps your self on each of the
> machines.
>
> b) deploy your exploded web app with -stage option. Meaning copy, or in
> otherwords "WLS when you deploy this Application to each server in the
> cluster, do copy the bits from my "source" to each server" In this case,
> you will have to use refresh
>
> What command did you execute on with weblogic.Deployer
>
> Cheers
> mbg
>
>
>
> "Senthil Kumar S" <[email protected]> wrote in
> message news:[email protected]...
> > Let me rephrase my requirement..
> > My production environment is Weblogic 7.0.1 with a clustered environment
> with exploded WAR.
> > How do I refresh my jsp files with out undeploying my web application?
> >
> > When I tried by modifying the jsp file on the exploded directory on the
> admin and ran the weblogic.Deployer utility, it successfully updated the
> copy on the managed instance (I verified by checking the stage directory).
> But the jsp was never recompiled on the managed instance and it was serving
> old content.
> >
> > Thanks
> > Senthil Kumar.S
Maybe you are looking for
-
How can I set mirror margins (or "facing pages") in 5.0?
I recently updated by Mac System to Maverick just so I could update to the new version of Pages. In so doing, I gave up my old MS word program (because it was outdated for this system). But Pages did most of those things I needed. HOWEVER Now, I am t
-
Sent items on yahoo Imap not synchronising with sent items on yahoo mail outlook 2011
I had a problem where the my yahoo imap which I set up with Outlook 2011 was not synchronizing with Yahoo from the web. I found the solution today by switching from Sent items( Server) to Sent( Server). 1. Go to tools 2. Accounts 3.Advance options 4
-
S/w from 33MHz to PowerPC 120MHz?
Hi, I have a PowerBook 540 c modified to a PowerPC 120MHz processor. I have a wonderful computer game (called Capitalist Pig) originally purchased for my 33 MHz PowerBook 120. Unfortunately, the game won't run on my PowerBook 150. Is there any way I
-
How to attach a java bean in forms6i
Hi, I am new to oracle forms6i. i just want to ask on how to attach a java bean to forms6i.i did putting the full directory path to the implementation class but it has an error, bean not found. what should i do? Your help is highly appreciated.
-
How to store data from textfile to vector and delete a selected row.
Can someone teach me how to store data from textfile to vector and delete a selected row. And after deleting, i want to write the changes in my textfile. Do someone has an idea? :)