Android R Update:
From Android R, this method always returns false. Google says that this is done "to protect goat privacy":
/**
* Used to determine whether the user making this call is subject to
* teleportations.
*
* <p>As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can
* now automatically identify goats using advanced goat recognition technology.</p>
*
* <p>As of {@link android.os.Build.VERSION_CODES#R}, this method always returns
* {@code false} in order to protect goat privacy.</p>
*
* @return Returns whether the user making this call is a goat.
*/
public boolean isUserAGoat() {
if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R) {
return false;
}
return mContext.getPackageManager()
.isPackageAvailable("com.coffeestainstudios.goatsimulator");
}
Previous answer:
From their source, the method used to return false
until it was changed in API 21.
/**
* Used to determine whether the user making this call is subject to
* teleportations.
* @return whether the user making this call is a goat
*/
public boolean isUserAGoat() {
return false;
}
It looks like the method has no real use for us as developers. Someone has previously stated that it might be an Easter egg.
In API 21 the implementation was changed to check if there is an installed app with the package com.coffeestainstudios.goatsimulator
/**
* Used to determine whether the user making this call is subject to
* teleportations.
*
* <p>As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can
* now automatically identify goats using advanced goat recognition technology.</p>
*
* @return Returns true if the user making this call is a goat.
*/
public boolean isUserAGoat() {
return mContext.getPackageManager()
.isPackageAvailable("com.coffeestainstudios.goatsimulator");
}
Here is the source and the change.
With ASP.Net 1.1, first you have to set the runat
attribute on the title markup :
<title id="PageTitle" runat="server">WebForm1</title>
Then from the code behind :
C#
// We need this name space to use HtmlGenericControl
using System.Web.UI.HtmlControls;
namespace TestWebApp
{
public class WebForm1 : System.Web.UI.Page
{
// Variable declaration and instantiation
protected HtmlGenericControl PageTitle = new HtmlGenericControl();
private void Page_Load(object sender, System.EventArgs e)
{
// Set new page title
PageTitle.InnerText = "New Page Title";
}
}
}
VB
Imports System.Web.UI.HtmlControls
Namespace TestWebApp
Public Class WebForm1
Inherits System.Web.UI.Page
Protected PageTitle As HtmlGenericControl = New HtmlGenericControl()
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
PageTitle.InnerText = "New Page Title"
End Sub
...
End Class
End Namespace
Best Answer
First of all the correct way to serve files in Spring Boot is described in cannot find html pages with spring boot
After adding the directories required, I tried /services/login.html where "services" is the mapping for my Dispatcher servlet. So what happens here is that Spring Boot will only answer to requests sent to /services/* even if these requests are pointing to something other than a controller. I guess that this makes sense in the world of Spring Boot but when I tried in the same in a Spring MVC project (no Spring Boot) I was able to access simple html files that I had simply added into my WEB-INF directory