Remove landing page of Jboss 7 - jboss

I have deployed my application in jboss 7. It is in the url www.myappurl.com/appname/.
But if I go to www.myappurl.com/index.html I see Jboss's landing page that says "Welcome to JBoss AS 7".
How Can I remove that page?

Basically you have to set to false the enable-welcome-root property of the Virtual Server that you are using and specify into the jboss-web.xml that the application is bound into the Root Web Context ("/").
See this tutorial.
Hope it helps. Francesco

you have to deploy an application that has Context Path set to /
UPDATE
Looking some resources on the internet such as this http://stephou.wordpress.com/2012/05/05/how-to-deploy-to-jboss-as7-default-root-context/ say that you have to modify first your standalone.xml else it will raise an exception.
From personal experience i just set the Context Path of my webapp to / (root) and it works just fine

you can remove these lines in the standalone.xml:
<location name="/" handler="welcome-content"/>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>

Related

Getting Error HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported after HTTP Error 500.35 - ANCM Multiple Hosting models not supported

I am getting error "Error HTTP Error 500.34 - ANCM Mixed Hosting Models Not Supported" after adding
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>
to my application.config.host, I was trying to resolve HTTP Error 500.35 - ANCM Multiple Hosting models not supported by adding above code snippet to application.config.host. Any help would be appreciated. Thanks
This issu occured because you may have different hosting model on you web apps under the same server where you have hosted your all web apps ,so you need to change hosting model for all ur web apps to be outofprocess by adding below line
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
I got the same error when I changed target SDK to .Net Core 3.1.
My solution was remove hostingModel="inprocess" from aspNetCore tag in file web.config.
Sure it can be made cleaner, but at least the app works.
Hope it may help someone.
<aspNetCore processPath="dotnet" arguments=".\XXXXXXX.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess"/>
I got it resolved.
I was loking for my applicationhost.config file in the .vs folder, to start i was unble to find .vs folder in my project folder. I manually typed C:\Users\v-wauddi\Desktop\Dutch Treat\DutchTreat.vs\DutchTreat\config\applicationhost.config and i was able to get applicationhost.config, I saw an unusual entry, I fixed it by commenting that unsual entry which can be seen in the below code.
<site name="DutchTreat" id="2">
<application path="/" applicationPool="DutchTreat AppPool">
<virtualDirectory path="/" physicalPath="C:\Users\v-
wauddi\Desktop\Dutch Treat\DutchTreat\DutchTreat" />
</application>
//commented out section
<!--<application path="/App" applicationPool="App AppPool">
<virtualDirectory path="/" physicalPath="C:\Users\v-
wauddi\Desktop\Dutch Treat\DutchTreat\DutchTreat" />
</application>-->
<bindings>
<binding protocol="http" bindingInformation="*:8888:localhost" />
</bindings>
</site>
I was going mad due to this issue from last 30-40 minutes. At last I deleted the .vs folder and reopened the project.
It works like charm.
Steps:
Open your solution folder.
exit project and close visual studio.
delete the vs folder, it might be hidden, so you need to enable
hidden items as shown below :
At last reopen project, it will take some extra seconds to reconstruct the files in .vs folder.

Hot redeployment not working on Wildfly 10.1.Final

I have a multi-maven war project that I'm trying to deploy in Wildfly. I'm using the JBoss Tools plugin in eclipse to do the deployment (incremental, full publish) and I can see the files being deployed, updated in wildfly's deployment directory. My problem is the xhtml file rendered in the browser is not updated. What I tried:
1.) clear the browser's cache - no effect
2.) open a private browser window - no effect
3.) added a no-cache filter in wildfly
<server name="default-server">
<host name="default-host" alias="localhost">
<filter-ref name="cache-control" predicate="path-suffix['.html'] or path-suffix['.jsf'] or path-suffix['.xhtml'] or path-suffix['.css'] or path-suffix['.js']"/>
</host>
</server>
<filters>
<response-header name="cache-control" header-name="Cache-Control" header-value="no-cache"/>
</filters>
Seems like Wildfly has some deep caching, because when you run incremental publish and then restart the server the changes are reflected.
Any idea?
For standalone:
When already connected to CLI:
deploy /path/to/application.war
Connecting and deploying in a single command:
jboss-cli.sh --connect command="deploy /path/to/application.war"
Connecting, deploying, and authenticating in a single command:
jboss-cli.sh --connect --user=admin --password=redhat command="deploy /path/to/application.war"
For domain:
Deploying to all groups:
deploy /path/to/application.war --all-server-groups
Deploying only to specified groups:
deploy /path/to/application.war --server-groups=server_group_1,server_group_2
These domain commands can also be used like above to connect and/or authenticate in a single command.
User can not deploy application to specific server/servers in domain mode.
The application.war should be an archived application (not an exploded war).
Problem was solved by adding param: javax.faces.FACELETS_REFRESH_PERIOD in web.xml.
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>2</param-value> <!-- Should be -1 for production. -->
</context-param>

Unexpected element '{urn:jboss:domain:keycloak:1.0}subsystem

Happy New Year to all.
I have a keycloak/wildfly question.
I am attempting to secure my war for WildFly 9.0.2.Final deployment. I follow the directions in section 7.2.1 of http://docs.jboss.org/keycloak/docs/1.0.4.Final/userguide/pdf/keycloak-reference-guide-en-US.pdf
I get the error Unexpected element '{urn:jboss:domain:keycloak:1.0}subsystem
I have carefully followed each step as listed below.
cd $WILDFLY_HOME
unzip keycloak-wildfly-adapter-dist.zip
edit the standalone.xml and add the following:
<server xmlns="urn:jboss:domain:1.4">
<extensions>
<extension module="org.keycloak.keycloak-wildfly-subsystem"/>
...
</extensions>
<profile>
<subsystem xmlns="urn:jboss:domain:keycloak:1.0"/>
...
</profile>
It is the line subsystem xmlns="urn:jboss:domain:keycloak:1.0 that is flagged in the error.
What am I missing? Thank you in advance.
May be it's a little bit too late. I think the problem could be that you forget to merge modules, bins folder from key-cloak into Jboss, so that the container itself doesn't recognize the keycloak.

How to set WildFly 9.0.1.Final httpUri encoding

For the reason that I want to use JavaEE7 and JPA2.1, I turned to WildFly9.0.1 Final which meets my requirement.
WildFly9.0.1 Final is using undertow as the Web Server.
Chinese Characters(in UTF-8 encoding) from web browser transferred to the jboss Server turned TO Garbled words,below is the log:
2015-08-02 18:58:38,893 INFO com.gcable.action.people.people_type.PeopleTypeAction.printHttpRequest:76
- peopleTypes[0].pt_name=[Ljava.lang.String;#3e31e9ad[{│フテ¥ᄒᄋ│ミᄄ}]
I am going mad! God save me!
I have tried this in standalone.xml:
<servlet-container name="default" default-encoding="UTF-8">
But it doesn't work.
Also I have tried to add jboss-web.xml in WEB-INF in my deployed war:
<jboss-web version="9.0" xmlns="http://www.jboss.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.org/j2ee/schema/jboss-web_9_0.xsd">
<default-encoding>UTF-8</default-encoding>
It doesn't work too.
I solved the problem by setting the encoding in the http-listener of the standalone.xml (i use the standalone-full.xml but i guess it makes no difference)
<http-listener name="default" socket-binding="http" url-charset="ISO-8859-1"/>
Sorry for the late answer but i got the same problem today. Hope it will be helpful.
I finally tried to down-grade my JPA2.1 to 2.0.
Jboss EAP 6.2 perfectly encodes the none-english characters.
By the way,
I found sth here to make JBOSS EAP6 which in fact is a JavaEE6 Container to USE JPA2.1 instead of using 2.0

AjaxControlToolkit 7.0123 breaks VS2012 Web Application Project

I have an existing VS2012 web application that has been running fine until I added in the latest AjaxControlToolkit (7.0123). Initially, I found that the installation broke the behaviour of the UpdatePanel - whereas before I could refresh a page after an asynchronous post-back without repeating the operation I found that after installation the refresh would repeat the previous operation (I guess the post-back was no longer asynchronous).
I then noticed that, at some time in the past, I had commented out a number of the default JavaScript files that are added to a new ASP.NET Web Forms Application so I tried adding them back in. This resulted in an exception:
'MsAjaxBundle' is not a valid script name. The name must end in
'.js'.
I then tried replacing the default <asp:ScriptManager .../> with <ajaxControlToolkit:ToolkitScriptManager .../> this resulted in a new exception
Could not load file or assembly 'System.Web' or one of its
dependencies. The system cannot find the file specified.
For sanity, I then created a fresh ASP.NET Web Forms Application (VS2012, Update 2) and ran it. No errors. Using "nuget", I then added the AjaxControlToolkit v7.0123 (the latest release). Ran the application again and I get the original exception again:
'MsAjaxBundle' is not a valid script name. The name must end in
'.js'.
Once again, I replaced <asp:ScriptManager .../> with <ajaxControlToolkit:ToolkitScriptManager .../> and once again this results in
Could not load file or assembly 'System.Web' or one of its
dependencies. The system cannot find the file specified.
Can anybody shed any light on what else I need to do to resolve this? I can find no documentation to say anything needs to be changed manually when adding the toolkit.
Thanks,
Answer found at http://stephenwalther.com/archive/2012/09/20/september-2012-release-of-the-ajax-control-toolkit.aspx (always just after posting the question huh)
Replacing <asp:ScriptManager .../> with <ajaxControlToolkit:ToolkitScriptManager .../> is correct
Need to remove reference to MsAjaxBundle
Need to remove Assembly="System.Web" from script references
This fixes the exceptions (both in the new project and the original).
It does not however resolve the problem with the UpdatePanel no longer posting back asynchronously. I will raise this as a new question.
If you are using the April 2013 Release of the Ajax Control Toolkit see Stephen Walther's latest blog post:
http://stephenwalther.com/archive/2013/04/30/april-2013-release-of-the-ajax-control-toolkit.aspx
I was missing the new web.config settings that allow the AjaxFileUpload control to work in the new release
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" maxRequestLength="42949672" />
<httpHandlers>
<add verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd" type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit"/>
</handlers>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="4294967295"/>
</requestFiltering>
</security>
</system.webServer>
</configuration>
When you see this "'MsAjaxBundle' is not a valid script name. The name must end in '.js'."
The Best thing you can do is:
Go to the site Master (Double click on it )
Search for "MsAjaxBundle" or " "
Comment this line eg. <%----%>
Save or compile your program and then run it
Thank God is working by now