the client wants to change the url pattern to access the webproject , when i add a <warname>newname</warname> in maven-war-plugin , my newname.war is generated but i lose the jboss hotdeploy capabilities .
eventhough i'm not quitte sure , but i think jboss uses the default project name to generate a war en explode it for hotdeploy .
can you advice me a solution to change the url of the project to newname/page.xhtml istead of oldName/page.xhtml .
If it is just a matter of changing the WAR context, just add a jboss-web.xml file inside your WAR /WEB-INF/ directory, with such contents:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>newname</context-root>
</jboss-web>
Doing this for other app servers would require the use of other files of course.
Related
I am getting a simlar issue as below:
Load jboss-ejb3.xml file instead ejb-jar.xml in wildfly
https://issues.jboss.org/browse/WFLY-3189
schema location error jboss-ejb3.xml
My issue is that my xsd definition on top of my jboss-ejb3.xml is like this:
<jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:s="urn:security:1.1"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
version="3.1"
impl-version="2.0">
when clicking on http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd it opens jboss_5_0.xsd inside a maven jar: Maven: org.jboss.metadata:jboss-metadata:1.0.0.CR162 in my intelliJ. Seems like this is an old one as it does not have this XSD. now i was under the impression that if it did not find the XSD it will download it, which is why the http link is there in my opinion. but it is not. for ejb-jar_3_1.xsd, however it is getting from intellyJ embedded javaee api lib.
how can I add the right XSD from the net in this case. is it an intelliJ issue
As far as I've ever been able to determine, you must manually add a reference to a local resource for each XSD that is unknown to Intellij Idea.
This can be configured under Preferences/Languages & Frameworks/Schemas and DTDs.
You will not need to download anything from the internet if you have a local copy of WildFly, as it provides copies of all schema in $WILDFLY_HOME/docs/schema/.
I created a helloworld eclipse RAP project and run it eclipse itself.It is working fine.
After that I exported the RAP project to war file by using the eclipse war product configuration.
It created the war file.I deployed the war file in tomcat. After that when I try to access
the war deployed helloworld application, I am getting status 404 error.
http://127.0.0.1:8080/helloworld
I searched in internet and checked for troubleshooting and they mentioned to check in web.xml
all the entries are available or not. I confirmed it is available. Also I checked application structure.
It is fine as it is suggested. Could any one help me how to access the deployed application in tomcat?
Or is there any other server I can use in order to make it work quickly?
I suppose that the war file is named helloworld.war and http://127.0.0.1:8080/helloworld is the URL of your application.
If your entrypoint is not registered at the root path, you have to add the entrypoint name to the URL, e.g. http://127.0.0.1:8080/helloworld/entrypoint.
Alternatively, you can register the application at the root path in your ApplicationConfiguration:
application.addEntryPoint("/", YourEntryPoint.class, properties);
Then you should be able to access it at http://127.0.0.1:8080/helloworld.
Update:
If you use extension points, configure the path in your entrypoint extension, for example:
<extension
point="org.eclipse.rap.ui.entrypoint">
<entrypoint
class="example.MyEntrypoint"
path="/" />
</extension>
We have a weblogic ear which has dependency with a third party jar. We don't want to keep this jar inside of the ear. Is there any other better way or better place to keep this jar and load it only at the ear class loader.
I personally would package the third party jar into the ear. You have a couple of other options...
Add the jar file into your weblogic domain lib directory, this will put it on the classpath for every server:
<domain folder> -> lib
A better way would be to edit your server classpath to also include the third party jar. Login to your admin console and edit:
Servers -> server_name -> Server Start tab -> Classpath
Keep in mind this will put the jar on the classpath for all apps running on that particular server. If that is not desirable you can look into preferring the jar(s) in your ear file over those on the classpath like:
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.xml.sax.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
My setup includes a weblogic 12c server which hosts several applications. The application which i am writing has log4j configuration property with appenders that are specific to this application. I have packaged the property in app EAR and deployed it to weblogic.
I want the log4j setup in weblogic to pull configuration from this property file. Will i still need a global configuration file put in inside the domain root folder? . The thing that confuses me is, why do i need to have log4j configuration in domain root if i already have it inside the application ( while i load using PropertyConfigurator) .
I did copy the log4j and wllog jars to domain/lib but i am not happy with copying anything to server directories since i want this to be driven by the deployed EAR.
I am new to Weblogic so might be something obvious. Tried several links on the web but none of them answers my question. I have been referring to this thread for the setup. https://community.oracle.com/thread/1063248
Make sure log4j jar is in APP-INF/lib
Make sure your log4j config file is in the root classpath for the ear (APP-INF/classes)
If you don't have one already, add a weblogic-application.xml (see http://docs.oracle.com/cd/E24329_01/web.1211/e24368/app_xml.htm#WLPRG389) to your META-INF directory at the EAR level, and in there include a prefer-application-packages element with package-name of org.apache.log4j
I have a Spring application that is being deployed to JBoss 4.2. I can manually edit the generated WAR file and alter the jboss-web.xml file to set the context-root value and that works perfectly well. I would like to be able to do the samething via netbeans (6.9.1), but I have been unable to locate where to make the adjustment. I've tried tweaking the project's properties and setting the Context Path value. When I Run the application that value is reset to the Project's name. I've located the jboss-web.xml file in the project and changed it there, also reset upon run. So it appears that Netbeans is deciding that the value need to be set but I can't locate where. If it's of any use, the project also uses Maven2, but all the controls I can find for impacting context-root are geared towards EAR files instead of WAR.
Has anyone been able to do this or am I just in a world of making the change post build?
I had a similar problem once where netbeans was sometimes removing the context-root element from the glassfish-web.xml configuration. I have not been able to track it down exactly but you could try to remove the file nb-configuration.xml in the project root folder and see if that helps.