from web page, how to get the server/managed server details which are weblogic cluster environment? - oracle-adf

In weblogic, we have cluster environment having 6 managed servers(all are up and running).
whenever i'm accessing application url i wanted to know request is going to which manged server(by using inspect element or any other way),
To know the server details is their any configuration we have to do in weblogic,application/ any other to archive this.
basically i have to check the managed server logs based on that user logged.
Thanks in advance.

To display the server name in a jsf OutputText you can build the following property in your Java bean :
private String currentWeblogicServerName;
public String getCurrentWeblogicServerName(){
String managed = System.getProperty("weblogic.Name");
return managed;
}
public String setCurrentWeblogicServerName(String CurrentWeblogicServerName){
this.currentWeblogicServerName= CurrentWeblogicServerName;
}
and in your jsf page something like :
<af:outputText value="#{YOUR_BEAN_SCOPE.YOUR_BEAN_NAME.currentWeblogicServerName}" id="ot1"/>
If you only want to see it in "inspect element" add the property visible="false" to your outputText. (and search for the ot1 id in the inspect element console)

Related

Creating a Message-Hub Bridge for IBM Cloud Object Storage

I'm trying to create a "Bridge" from Message Hub to S3 Object Storage, copying information from the credentials that I created but I always get an error that says "Please trying refreshing the page, or logging back into Bluemix."
I have already created an access policy for these credentials and the Bucket I want to use as destination.
Also tried with private and public end-points.
I wasn't able to found documentation that explains how to accomplish this. Nothing seems to work.
Thanks!
Apologies, this is an internal error caused by the S3 Object Storage bridges capability being made available in the UI but not in the backend.
An update to the Message Hub service will be made this week to correct this.

Sonar Api - Access to database

I am writting a widget for Sonar. It has to upload a string and put it in the sonar database. (Table "properties", "prop_key" = "views.def", It change the structure of views for the plugin porfolio manager).
I coded a little form where the user can copy/paste the string. It appears on my sonar web UI. But I don't know what to do now...
I need to put that string into the sonar DB. How can I communicate with the DB from a widget (with API tools) ?
I searched in Sonar API documentation, but I am a bit overflowed by the informations, and it is not everytime clearly explained.
Thanks for the time you will spend on my question.
EDIT : I found how to access to the database table "properties", by the org.sonar.api.config.Settings class. (method setProperty to write, getString to read (a String :p)).
But this methods havn't access to the DB for writting, so the modifications made by setters are not saved :/

Sharepoint 2013 - 404 Not Found while accessing site collection from outside

This question may be a dublicate, but no recent post leads to a working answer for my case.
I have a Sharepoint 2013 running on a Windows Server 2012. Following issue appeared:
I made a new Site-Collection as wiki. Everything (links,...) works fine on the server but when I want to access the wiki from outside (not localhost) the server runs in a 404 Not found error.
http://localhost/sites/wiki/Pages/Home.aspx - works fine(localhost)
http://10.38.0.15/sites/wiki/Pages/Home.aspx - doesn't work.
I checked the IIS settings, all servers are up and running. The log file has no errors in it.
Does anyone know, how to solve this problem?
thx
Jürgen
The most common cause for this is that you don't have the IIS host header configured correctly. The 404 will appear because you are hitting a different IIS web site and not the one you intended to.
If you go into IIS Manager and click on "Sites" in the right hand pane there will be a column called bindings and a column called ID.
IIS will check in the order of ID for the first site that matches. Make sure the default site is stopped. If you see bindings that look like the following:
ID 1: Bindings: *:80
ID 2: Bindings: www.yoursite.com:80
www.othersite.com will match ID 1. Any other site that doesn't specify a port or https: will be directed to ID 2. You need to ensure that the site you are trying to access matches your bindings. The "www.yoursite.com" is added to the site via "New Web Application" in SharePoint. There is a field called Host: in Central Administration. This should match what you are typing from inside and outside the server. If you need the site to respond to multiple names, you need to extend the web application.
Assuming you used the default of claims authentication, here are the instructions for that:
http://technet.microsoft.com/en-us/library/gg276325.aspx
I am not sure if this is still required in Server 2012, but disabling the loopback check might also help, although this usually results in a 401, and repeated attempts to log in. Here are the instructions for that.
http://support.microsoft.com/kb/896861
Сheck the alternate access mapping in SharePoint administrator.
It should be something like this:
http://yourservername default
http://10.10.1.30:80 internet
http:// so on ..

Connect MS access database in JSP pages

I would like to ask you how can I connect a MS access database in JSP pages?Do you know any ready class which I can use?I am using Netbeans to create JSP pages!
Ancient question, but I shall answer anyway. Had to Google around a bit when the same question flummoxed me. Here goes (concise version of stuff found here):
Administratively Register Database
Use MS Access to create a blank database in some directory. (eg. Database1.mdb.) Make sure to close the data base after it is created.
Go to: Control panel -> Admin tool -> ODBC
Under the System DSN tab (for Tomcat version 5 or later – User DSN for earlier
versions), un-highlight any previously selected name and then click on the Add
button.
On the window that then opens up, highlight MS Access Driver & click Finish.
On the ODBC Setup window that then opens, fill in the data source name. This
is the name that you will use to refer to the data base in your Java program – like
arc. This name does not have to match the file name.
.
Then click Select and navigate to the already created database in directory.
Suppose the file name is Database1.mdb. After highlighting the named file,
click OKs all the way back to the original window.
Connect a JSP page to an Access Database
<%# page import="java.sql.*" %>
<%
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=null;
conn = DriverManager.getConnection("jdbc:odbc:arc", "", "");
out.println ("Database Connected.");
%>
Now that the JDBC-ODBC Bridge has been removed from Java 8, the UCanAccess JDBC driver may be a more relevant option for future users. For details, see the related Stack Overflow question
Manipulating an Access database from Java without ODBC

ActiveDirectoryMembershipProvider not accepting FQDN

We are trying to set up the ActiveDirectoryMemebershipProvider for an ASP.NET intranet application that is supposed to automatically sign the users into the application when it is accessed in the browser.
However the browser is sending the FQDN (MYDOMAIN\some.user) to the server and the ActiveDirectoryMemebershipProvider seems not to be able to be able to find the user based on the FQDN. However when we test the provider manually from code we found that if we try just the user name (some.user) the provider seems to be able to find the user.
Is there any setting or anything we can use to make the provider skip the domain part sent from the browser ?
Try setting atttributeMapUsername if you haven't and let me know if that works for you. When I didn't set this I had to specify my users in some.user#my.ldap.domain format.
My Web.config
<add name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnectionString"
attributeMapUsername="sAMAccountName"
enablePasswordReset="false" maxInvalidPasswordAttempts="1" passwordAttemptWindow="15"
passwordAnswerAttemptLockoutDuration="1" minRequiredNonalphanumericCharacters="0" attributeMapEmail="mail"
/>
In IIS, go to the properties of the website and set the default domain to "\". Not sure which version of IIS you are using so if IIS resets this on you, the other way to accomplish this is to simply prepend the domain part so that it is added automatically?
Is this a custom app you are using or a product? Trying to understand why it is working from code but not from app. If you wrote the app, I assume you can change it to mimic your code. If you did not write the app, what is it? The app (such as OWA or SharePoint) may have a custom way it wants this done.

Resources