//retorna o usuário logado no sistema
public class ContextObject {
public static Usuario getUsuario() {
ContextObject contextObject = ContextFactory.getContextObject();
return contextObject.usuario;
}
}
//mostra em uma função alert() o usuário logado
<script> alert(ContextObject.getUsuario()); </script>
Given that these two codes are in different files.
I'm doing this but it's not right, how should I do it? I need to get the return of the java code and show what's coming up in the alert
function of javascript.