quinta-feira, 1 de agosto de 2013

SCJP mock exam FREE!!

Olá,

Estou estutando para SCJP e procurando na net por simulados. Encontrei um site com simulados WEB e FREE. Você consegue selecionar o assunto dos testes, tempo de duração e mais algumas configurações.. e melhor ainda.. você consegue pausar e continuar a prova depois!


http://scjptest.com

terça-feira, 30 de julho de 2013

Configuration HTTPs JBoss 7x

Hi,

This post is about how to set https over JBoss 7x. The new Jboss architecture is most simply than old versions. Basically the all configuration is location in "${JBOSS_HOME}\standalone\configuration\standalone.xml"

Add these lines below in ${JBOSS_HOME}\standalone\configuration\standalone.xml:

    

If you need change https port for default https port (443), change the line below in the same file ${JBOSS_HOME}\standalone\configuration\standalone.xml"


So, the next post I will talk about how to generate a self-signed digital certificate.

quinta-feira, 25 de julho de 2013

Alterando Locale default JBoss

Olá.

Dica rápida, para alterar o Locale do JBoss basta adicionar os seguintes argumentos ao seu JBoss

-Duser.country=BR -Duser.language=pt  
Abraço e até a próxima

quarta-feira, 23 de maio de 2012

Tutorial - Configuração JAAS JBoss 6.1

Fala pessoal,

Vou descrever um pequeno tutorial de como configurar o JAAS no JBoss 6.1 Final e capturar o usuário em sua aplicação após a autenticação. Como é meu primeiro tutorial, dúvidas e sugestões são bem vindas!

1º Passo: Alterar o arquivo "jboss-6.1.0.Final/server/default/conf/login-config.xml" adicionando a política de autenticação utilizada na apliacação

    
        
            java:/lugarcerto
            SELECT U.SENHA FROM USUARIO U WHERE U.EMAIL=?
            SELECT P.DS_PERFIL, 'Roles' FROM USUARIO U
       INNER JOIN PERFIL P ON U.PERFIL_ID_PERFIL = P.ID_PERFIL WHERE U.EMAIL=?
     MD5
     hex
        
    
Pontos importantes:
Linha 1: nome da configuração
Linha 3: Nome da classe que implementará o processo de login, neste caso utilizaremos uma classe do próprio jboss, "DatabaseServerLoginModule". Informarei no final do tutorial um link para outro tutorial, no qual a classe login module é implementada.
Linha 4: Nome do JNDI Name
Linha 5: SQL para buscar a senha forme um identificador, no caso foi utilizado o email como identificador do usuário.
Linha 6: SQL para buscar as roles(papéis) necessários para autenticar no sistema. Caso o usuário no banco não tenha o papel configurado, o acesso não é liberado. Estas roles serão configuradas mais a frente, no arquivo web.xml
Linha 8 e 9: Definição do algoritmo e enoding referente a senha. Isto é muito importante, caso o encoding do Hash utilizado para gerar a senha não seja o mesmo configurado neste arquivo, a autenticação não será liberada!


terça-feira, 10 de janeiro de 2012

HTTP Status Codes

Informational
  • 100 - Continue
    A status code of 100 indicates that (usually the first) part of a request has been received without any problems, and that the rest of the request should now be sent.
  • 101 - Switching Protocols
    HTTP 1.1 is just one type of protocol for transferring data on the web, and a status code of 101 indicates that the server is changing to the protocol it defines in the "Upgrade" header it returns to the client. For example, when requesting a page, a browser might receive a statis code of 101, followed by an "Upgrade" header showing that the server is changing to a different version of HTTP.

Successful

  • 200 - OK
    The 200 status code is by far the most common returned. It means, simply, that the request was received and understood and is being processed.
  • 201 - Created
    A 201 status code indicates that a request was successful and as a result, a resource has been created (for example a new page).
  • 202 - Accepted
    The status code 202 indicates that server has received and understood the request, and that it has been accepted for processing, although it may not be processed immediately.
  • 203 - Non-Authoritative Information
    A 203 status code means that the request was received and understood, and that information sent back about the response is from a third party, rather than the original server. This is virtually identical in meaning to a 200 status code.
  • 204 - No Content
    The 204 status code means that the request was received and understood, but that there is no need to send any data back.
  • 205 - Reset Content
    The 205 status code is a request from the server to the client to reset the document from which the original request was sent. For example, if a user fills out a form, and submits it, a status code of 205 means the server is asking the browser to clear the form.
  • 206 - Partial Content
    A status code of 206 is a response to a request for part of a document. This is used by advanced caching tools, when a user agent requests only a small part of a page, and just that section is returned.

quinta-feira, 5 de janeiro de 2012

Update Mozilla Firefox from repository

Hi,

this tip is to update your mozilla firefox from repository:

$ sudo -i
# add-apt-repository ppa:mozillateam/firefox-stable
# apt-get update && apt-get dist-upgrade -y
 
Source: http://www.tiagohillebrandt.eti.br/blog/2011/03/
instalando-o-firefox-4-no-ubuntu-via-repositorio/ 

terça-feira, 3 de janeiro de 2012

Received fatal alert: unexpected_message / SoapUI

Hi,

do you get this exception in your Soap UI when you request one WebService with SSL autentication?

javax.net.ssl.SSLException: Received fatal alert: unexpected_message


Add this param for your JVM in your init script (installdir/bin/soapui.sh or installdir\bin\ soapUI-3.6.1.vmoptions)

-Dsun.security.ssl.allowUnsafeRenegotiation=true