Wildfly 10 war Deployment - wildfly

i deployed war on wild fly 10 but its url is not working properly due to some configuration. Exposed war is deployed .As URL appending problem. see below images
main Page
main page
i clicked on link
second image

Related

TomEE - Netbeans - folder outside project

I'm using Netbeans 8.2. for JavaEE Webapp with a TomEE 1.7.xx Server.
I need a folder with images, that is changed by the users.
Therefore I can't have the folder within in my project, because with war deployment it would be overwritten all the time with my development files.
Does anyone know how I can handle this?
You could deploy another another empty web application next to your application.
If a user upload an image in your application you would write it into e.g.:
tomee/webapps/imagecontainer/images/
and reference it from inside your application
<img src="myDomain.com/imagecontainer/images/xyz.jpg"/>
Like this you can deploy anytime any new version of your application. Of course
you are not allowed to undeploy the imagecontainer application.

gwt images external to WAR file

I am working with GWT and I have some issues with the images. I need images outside my WAR file and, In order to make them visible in the application, I must put them inside the "target" folder ( I am using maven as well). The problem is that the target folder by definition is deleted every time recompile the project. This issue happens only in hosted mode, because when I deploy the application on Tomcat I can just change the server.xml adding the following statement
and it should read correctly images outside my WAR file(not tried yet due to another problem I have)
Can anybody give me some suggestions?
What is the directory structure of your maven project? Why is there a requirement for you to put the images in the target folder? Typically in a Maven project the items you put in the src/main/resources/static such as images end up in the built artifact.

Hawtio simple plugin example - tab is not visible

I am trying to develop a custom hawtio plugin. I have custom WAR deployed in Tomcat based on hawtio-default 1.4.37. It works correctly
I built simple-plugin.war following https://github.com/hawtio/hawtio/tree/master/hawtio-plugin-examples/simple-plugin instruction (no changes are done) and deployed it in the same Tomcat.
There are no errors, all logs are clean, I can see simple-plugin as plugin of hawtio in JMX bean, however no new tab is visible (although as I guess from .js code "Simple" tab should appear)
Any idea? Is it something to do with perspectives?
Edit:
Just checked the browser console and seen 404 error
GET http://localhost:8080/myhawtio/plugin/ 404 (Not Found)
It seems that my custom WAR is not correctly reconfigured
Edit 2:
Downloaded and deployed clean hawtio-default-1.4.37.war - simple-plugin works, "Simple" tab is visible
Downloaded and deployed clean sample-1.4.37.war - simple-plugin does not work, tab is not visible and get 404 error
GET http://localhost:8080/sample-1.4.37/plugin 404 (Not Found)
You must make sure to install the simple plugin using the same name as its configured in the web.xml file.
In the web.xml the context path gets set when you build the example from:
https://github.com/hawtio/hawtio/blob/master/hawtio-plugin-examples/simple-plugin/src/main/resources/WEB-INF/web.xml#L14
By default that is generated as
<context-param>
<description>Plugin's path on the server</description>
<param-name>plugin-context</param-name>
<param-value>/simple-plugin</param-value>
</context-param>
So that means you should install the war as simple-plugin in Apache Tomcat, eg rename the .war file to simple-plugin.war
If you're getting a 404 for /hawtio/plugin then you're missing the PluginServlet from your war, or at least it isn't running -> https://github.com/hawtio/hawtio/blob/master/hawtio-system/src/main/java/io/hawt/web/PluginServlet.java
This servlet is how the frontend discovers any additional plugins to load. I'd suggest comparing your web.xml with the one from hawtio-web and make sure this class is getting loaded.

The generated war after the deploy, does not see the servlets

I generated two war files, one using export-> war file in Eclips second using maven-war-plugin. When I deploy this war in localhost tomcat7 or on an external server, the Tomcat application can not find the servlet. Links that point to servlets returns a 404 error
War is correctly deployowany because the home page is displayed correctly.
Eclipse does not show any errors in servlets so I say that's not the problem.
Deploy war directory structure looks like this:
css, fonts, img, js, loess, META-INF, pages, WEB-INF (with epmpty controller folder and the folder lib with my jar eg. Mysql_connector). But nowhere I can not see the folders with my model
Does anyone have any idea why this is happening?

JBoss 7 as deploys automatically

I put my jboss on the linux server, exported the war file and placed it on the deployments folder and it automatically deployed. I didn't even had to do it via command line. How is this working?
My jboss has ssl to it.
From the Application Deployment documentation:
The standalone/deployments directory in the JBoss Application Server 7 distribution is the location end users can place their deployment content (e.g. war, ear, jar, sar files) to have it automically deployed into the server runtime.
So, if you put a war file in standalone/deployments, JBoss will detect it and act as if you had manually deployed it. The documentation page has a lot more info about configuration if you want to change the defaults.