Frage

I am trying to migrate an application from OC4J to Weblogic, but I can not find the environment entry mapping screen in Weblogic 12c.

Is there one? If so, where is it? If not, how do I do it?

Our app has the following values in the web.xml:

<env-entry>
   <env-entry-name>SERVLET_PATH</env-entry-name>
   <env-entry-type>java.lang.String</env-entry-type>
</env-entry>
<env-entry>
   <env-entry-name>USER</env-entry-name>
   <env-entry-type>java.lang.String</env-entry-type>
</env-entry>
<env-entry>
   <env-entry-name>PASSWORD</env-entry-name>
   <env-entry-type>java.lang.String</env-entry-type>
</env-entry>

In OC4J these can been seen in the Environment Entry Mappings screen. (Also I can see them in Websphere under the Environment entries for Web modules screen)

Thanks

[Edit] Thanks to JoseK I was able to find the answer.

Once I had created the plan.xml, I found out that I need to add a and a to the plan.xml:

<variable-definition>
  <variable>
    <name>SERVLET_PATH</name>
    <value>http://203.15.228.111:7001/RailExchangeServlet/servlet/RailExchangeServlet</value>
  </variable>
</variable-definition>

...

<module-descriptor external="false">
  <root-element>web-app</root-element>
  <uri>WEB-INF/web.xml</uri>
  <variable-assignment>
    <name>SERVLET_PATH</name> <!-- this links to the variable-definition name -->
    <xpath>/web-app/env-entry[env-entry-name="SERVLET_PATH"]/env-entry-value</xpath>
  </variable-assignment>
</module-descriptor>
</module-override>
War es hilfreich?

Lösung

In earlier versions of Weblogic you could view and edit the web.xml values from the console.

In WL10 onwards you don't get to view this from the console, and instead there is a concept of a Deployment Plan (saved on filesystem as Plan.xml)

In that file you can specify over-riding values on the web.xml which will change from env to env.

An example is here

http://biemond.blogspot.in/2009/04/using-weblogic-deployment-plan-to.html

https://forums.oracle.com/forums/thread.jspa?threadID=1107834&tstart=0

and some reading

http://docs.oracle.com/cd/E11035_01/wls100/deployment/config.html#wp1057141

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top