How do I change the context-root of a web app with a deployment plan?
I've been trying to figure this out for several hours.
I'm deploying a .ear file which sets the context root for the single web application it deploys in its application.xml deployment descriptor:
<application>
<display-name>MyApp</display-name>
<module>
<web>
<web-uri>MyAppViewControler.war</web-uri>
<context-root>MyApp</context-root>
</web>
</module>
</application>
I want to change the context-root from /MyApp to something else when deploying the ear file. It seemed to me that using a deployment plan was the way to do this. But when I use this plan:
<deployment-plan>
<application-name>MyApp<application-name>
<variable-definition>
<variable>
<name>NEWCONTEXTROOT</name>
<value>foobar</value>
</variable>
</variable-definition>
<module-override>
<module-name>MyApp</module-name>
<module-type>ear</module-type>
<module-descriptor external="false">
<root-element>application</root-element>
<uri>META-INF/application.xml</uri>
<variable-assignment>
<name>NEWCONTEXTROOT</name>
<xpath>/application/module/web/context-root</xpath>
</variable-assignment>
</module-descriptor>
</module-override>
</deployment-plan>
I get an error:
weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
/bea/user_projects/domains/devod1/nullplan.xml:0: problem: cvc-complex-type.2.4a: Expected element 'web-uri@http://java.sun.com/xml/ns/javaee' instead of 'context-root@http://java.sun.com/xml/ns/javaee' here in element web@http://java.sun.com/xml/ns/javaee:<nullplan.xml>
I looked at http://e-docs.bea.com/wls/docs103/pdf/deployment.pdf which says:
"You cannot use a deployment plan to change the context-root in an application.xml
file. However, if an application is deployed as a library, you can either change the
context-root through an weblogic-application.xml file or use the deployment plan
to change the context-root in an weblogic-application.xml file."
I don't understand what this means. I'm not deploying my application as a library.
Does anyone know how to change the context-root for an application?
Any help would be greatly appreciated!
Hi James,
I am quite new to Welogic if i am wrong please correct me.I have re-deployed my application (.war) with this Plan.xml
<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan xmlns="http://www.bea.com/ns/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/deployment-plan http://www.bea.com/ns/weblogic/deployment-plan/1.0/deployment-plan.xsd" global-variables="false">
<application-name>BrowserR08.003</application-name>
*<variable-definition>*
* <variable>*
* <name>CONTEXTROOT</name>*
* <value>BrowserWeb/servlet/BrowserServlet</value>*
* </variable>*
* </variable-definition>*
<module-override>
<module-name>BrowserWeb.war</module-name>
<module-type>war</module-type>
<module-descriptor external="true">
<root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
<hash-code>1231953167814</hash-code>
*<variable-assignment>*
* <name>CONTEXTROOT</name>*
* <xpath>/weblogic-web-app/context-root</xpath>*
* <operation>add</operation>*
* </variable-assignment>*
</module-descriptor>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>wldf-resource</root-element>
<uri>META-INF/weblogic-diagnostics.xml</uri>
</module-descriptor>
</module-override>
<config-root>/export/home1/tecapp/BrowserR08.003/plan</config-root>
</deployment-plan>
I do not know wether i will require the other module descriptor definition in this Plzn.xml. Now when I go to following link.
Deployments --> MyApp --> Testing
It gives me following url as a test page:
http://localhost:7001/BrowserWeb/servlet/BrowserServlet
as soon as i click on to the above link it redirects me to following.
http://localhost:7001/BrowserWeb/servlet/BrowserServlet/servlet/BrowserServlet
Same if i remove these context-root part my normal Testing menu shows me following link as my webapp access path
http://localhost:7001/BrowserWeb <-- My war file name is BrowserWeb.war so it is default name of my deployed application if i am not wrong
and as soon as i click on above link it redirects me to the following one.
http://localhost:7001/BrowserWeb/servlet/BrowserServlet
It means application server know that my full web access page is with '*servlet/BrowserServlet*' because its adding it in both the cases.
What I want is a constant URL whcih does not change?
Hope this helps :)
Similar Messages
-
How can I change the install location when installing an App (i.e. Lightroom) from Creative Cloud?
Rolfjuelg I am sorry but Lightroom does not support custom installation locations through the Creative Cloud. You can find more details at Lightroom and Creative Cloud FAQ.
-
How do I change the Apple ID in an installed APP? I have changed the apple ID in all the other apps due to security reasons. All changes were effective except the APPS ID.Where do I go to change the Apple ID for the APPS store? Thanks in advance.
You do not. Apps and any content purchased from the iTunes store are eternally tied to the Apple ID they were purchased with.
-
How can u change the email address on ur iTunes app?
How can u change the email address on ur iTunes app?
Settings>iTunes and App Store. Tap the ID and sign out. Then sign in with the new one.
-
HT4972 How do you change the computer that you sync apple devices with
How do you change the computer that you sync apple devices with?
Sync with new computer
https://discussions.apple.com/docs/DOC-3141 -
How do I change the apple ID my iPad is associated with
I'm trying to figure out how to change the Apple ID our iPad is associated with. My husband bought the iPad and set up a new Apple ID instead of using mine. Now we cannot use iCloud to sync all of our devices. Any help out there?
Hi there
Try this...
1. Settings
2. Store
3. Click on 'Apple ID'
4. Click on 'Sign Out
5. Click on 'Sign In'
6. Click on 'Use Existing Apple ID'
7. Type in your Apple ID
Hope that helps.
Cheers -
I use an iPad 2 at work that has a different apple id for iCloud than my own personal new iPad. How can I change the company's id for iCloud to synchronize with my own personal iPad?
Go to Settings>iTunes and App Stores and tap the Apple ID listed and sign out and sign in with other ID
You also may want to go to other places like:
- Settings>iCloud
- Settinge>FaceTime
- Settings>Messages>Send and Receive and change the ID
It may be best to go to Settings>General>Reset>Erase all Content and Settings and start over again and set up the iPod again with his account/ID -
How do I change the document root and servlets root in WL 6.0
Please reply fast.
Suresh WilsonIn 5.1, you specify the "name" via the property:
weblogic.httpd.webApp.NAME=<path_to_war>
... where NAME is the path in the URL where you want your webapp to be
access from
Say:
weblogic.httpd.webApp.sampleapp=/home/weblogic/product/wls/5.1/sample.war
... the application's root is http://hostname/sampleapp
In 6.0, it seems to be the name of the war file itself. I deployed the
war twice, one using sampleapp.war and the other using sampleapp2.war,
and the webapps' root are http://hostname/sampleapp and
http://hostname/sampleapp2, respectively.
Is this rigth? Well, that is at least what I observed. The admin docs
regarding deploying was not clear on what is defined as "name" or where
it gets it from ... until I tried the above.
For a while, I thought that the application's root are defined by the
servlet spec.
John
Gene Chuang wrote:
>
Servlets in 6.0 must be deployed in .war; "document root" setting is irrelevant in 6.0.
Gene
"suresh wilson" <[email protected]> wrote in message news:[email protected]..
Please reply fast.
Suresh Wilson
Homepage: http://homepages.tig.com.au/~jmsalvo/ -
How can I change the color of chart in webi report
Hi :
I create one Webi report including one table and chart In BO 4.0.
The chart display the relationship between sales-amount and profit amount . I do not want to use the default color but want to specify the red color for sales-amount and yellow color for profit amount . How can I do it ??
Thanks Very Much
Emily MAHi,
You can change the color very easily. It's simple & straight forward which I found it couple of days back. (Sometimes simple things are hard to find :-p )
Select the area in the Chart that you want to change color, then go to Format > Style > Background color. Now select the color that you want. In the attached picture, I have selected Yellow color for a piece of pie chart. -
How do I change the apple Id used for updating apps and downloading them
I bought an iPad from someone and I changed the apple ID but for some reason when I try to update the apps the old apple ID comes up from the previous owner ...........I just need to know how I possibly can change it
You cannot. Purchases are permanently tied to the AppleID and its account used when making the purchase. You cannot transfer purchases.
The reality is you do not own the apps on that iPad - the previous owner does. If you want them for yourself and want to be able to update them as needed, or re-download them as needed, you will have to delete the copies on the iPad, then purchase them with your own AppleID. -
How do I change the Apple Id on my iPad app updates?
When updating apps on my ipad2, the wrong Apple Id shows up (an id from another family member's iPhone). We use the same pc with itunes. How can I change this so only my app updates are shown? This is the only place that this Id shows up incorrectly. My correct id shows up in Settings.
Apps are always associated with the Apple ID that was used to purchase them. AFAIK - as long as you are using apps on your iPad that were purchased with another Apple ID - those app updates will always popup when they are available. The only way to remove the updates is to delete the apps.
-
How do I change the default certificate in Java Web Console?
I have a 3rd party issued server keystore & truststore ready to go in both jks and p12 file formats. I wish to use this in the Sun Java Web Console instead of the self signed certificate. I cannot find any documentation as to changing the certificate. I did find commands to change the keystore and truststore passwords, but I want to change the entire certificate.
I tried manually messing with the /var/webconsole/domains/console/conf/server.xml configuration file but realized it was more complex than that. Is there a documented procedure for changing the default certifcate?
ThanksSiri will use the default calendar specified in the Mail, Contacts, Calendars setting.
Go to Settings/Mail,Contacts,Calendars, then scroll down, and change the default in the Calendars section to your the one you prefer.
hope this helps. -
How can I get the context-parm from a web.xml file using struts?
Hello:
I need get the context-param from the web.xml file of my web project using struts. I want configurate the jdbc datasource connection pooling here. For example:
<context-param>
<param-name>datasource</param-name>
<param-value>jdbc/formacion</param-value>
<description>Jdbc datasource</description>
</context-param>
and then from any Action class get this parameter.
Similar using a simple server can be:
/** Initiates new XServlet */
public void init(ServletConfig config) throws ServletException {
for (Enumeration e = config.getInitParameterNames(); e.hasMoreElements();) {
System.out.println(e.nextElement());
super.init(config);
String str = config.getInitParameter("datasource");
System.out.println(str);
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
// res.setContentType( );
System.out.println("Got post request in XServlet");
PrintWriter out = res.getWriter();
out.println("nada");
out.flush();
out.close();
but only this works for init-params, if I use
<servlet>
<servlet-name>MyServlet</servlet-name>
<display-name>MyServlet</display-name>
<servlet-class>myExamples.servlet.MyServlet</servlet-class>
<init-param>
<param-name>datasource</param-name>
<param-value>jdbc/formacion</param-value>
</init-param>
</servlet>
inside my web.xml. I need something similar, but using struts inside the action class for that I can get the context-params and call my database.
Thank youTo get context parameters from your web.xml file you can simply get the ActionServlet object from an implementing action object class. In the perform (or execute) method make the following call.
ServletContext context = getServlet().getServletContext();
String tempContextVar =
context.getInitParameter("<your context param >"); -
I am new to th imac, having used a PC all of my life. I would like to set the text size for all applications, is this possible?
You can only do that globally by changing the screen resolution. In OS X it is on an application by application basis, if you can change it at all. For instance, for finder windows choose View menu > Show view options. In Text Edit in Preferences > New Document. Mail > Format > Show Fonts but this is only for messages text.
In short, Apple wants you to live with what you've got and dosen't make it easy to change any fonts except the ones you use to compose. -
How can I change the time zone for a calendar entry with iOS 7?
I want to make a new entry in my calendar (iOS 7) using a different time zone as the one I'm located in. There isn't any option to choose the time zone like there is in OS X.
I know I can switch off the option to automatically change the time zone in the preference pane of Mail, Contacts and Calendar to get the option in calendar but I want to use this automatic switch.
Is there any option to change the time zone of a calendar entry without loosing this automatic switch?Got it!
In your backing file you'll need the following in your handlePostbackData method:
BookBackingContext bookCtx = BookBackingContext.getBookBackingContext(arg0);
bookCtx.setupPageChangeEvent("PageLabel");
Maybe you are looking for
-
BI publisher report is not showing all the data
Hi All, I have created a report using BI Publisher in R12. The report is not showing all the records. I have checked the result XML it is also not having all the data. My query returns 846 rows but my report only has 662 rows. what might be the issue
-
Please please please help me I have all my data from my previous PC laptop from when it died and its on an external hard drive. I looked at the online tutorial and the macbook is not recognising the hard drive. I have been on hold to mac online suppo
-
"Adobe Media Core CS5.5 has stopped working"
Whenever I try to encode using the Quicktime-H.264 codec in Adobe Media Encoder, I get a crash that states "Adobe Media Core CS5.5 has stopped working". Also I have tried to encode using this codec directly within Premiere Pro with the "Export" butto
-
Does the Free iMovie HD download on the Apple Support site still work
Hi Forrest and Karsten, et. al: Well guys, I just called to Apple store salesman to get my fix before someone commits me to rehab. I was going to buy the new iMac that came out today, with all the bells and whistles. i had to terminated the sale. The
-
I need abap oops web site?
i need abap oops help web site?