When doing Testing to cover PCI Requirement 6, i face with issue exposed session id in url, so i write this guie to help other one sort down their time to fix this issue. To fix this issue we have some solutions depend on environment.
In tomcat 6 we can disable by using
disableURLRewriting. We create context.xml file and put following lines and make sure
cookie is enable
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="PATH_TO_WEBAPP" path="/CONTEXT" disableURLRewriting="true">
2 . Tomcat 7 or above
With Tomcat 7 or above we can add follow lines into web.xml
Or we can using programatic
Maven project build well but get failure when running in eclipse with the issue
This issue happen cause jars files is missing at run-time. It do not deploy properly in eclipse when running.
You can right click to project and choose Properties->Deployment Assembly and make sure Maven Dependencies in list
To check rsyslog configuration you can using following command
sudo rsyslogd -N1
It will show all problem on your configuration file. This command will help on debug configuration issue.
To delete all lines of file using
vi we use following command
This command will be apply
d command to lines from 1 to end of file.
Hope this will help you get quicker on work
Follow the post about Spring Security, in this post I will guide how to implement Spring Security remember me to your spring web application. Remember me is a convenient feature that allow user automatically logged to application without need to enter username and password.
Spring security provide two difference implement of remember me service Token-based remember me and Persistent remember me service Continue reading Spring security remember me
Today i will guide how to install and configure apache 2 with tomcat on Centos server using mod_proxy plugin
Scenario of this configuration:
- Server A install web server apache and have domain app.devjav.com(this domain already point to server A)
- Server B install tomcat server listen on port 8080
- We need allow user access application run on tomcat server in server B through domain app.devjav.com
Continue reading How to configure Apache 2 with Tomcat
As request from subscriber, today i write a spring mvc quickstart application, that can help every body has a starting point for spring mvc project.
Below list out technologies that you need for this tutorial
- Eclipse Lunar
- Spring Framework
- Tomcat 8 server
1. Create maven web project
Continue reading Spring mvc quickstart
When working with spring scheduler, you will see we can use cron expression to configure when scheduled task will run. In this post i will help you to know how cron expression work.
Cron expression is six fields that separate by single space. Below is ordinary of field from left to right with possible values.
||, / * -
||, / * -
||Day of month
||, / * – ?
||1-12 or JAN-DEC
||, / * -
||1-7 or MON-SUN
||, / * – ?
- ,: list possible values
- / sequence
- *: every possible values
- -: rage from two numbers
- ?: unspecific value
- 0/5 * * * * *: for every five second
- * 0-59/2 * * * *: for every two minutes: 0,2,4,8…58
- * * 2,14 * * MON-FRI: run on 2am and 2 pm from Monday to Friday
Today I will guide you how to using spring scheduler to do schedule tasks on your application. In this sample scheduler application I will create a simple job to print out current date time after each minute.
Tools and technique that you need in this sample:
- Eclipse Luna
- JDK 7
- Spring Framework 4
Continue reading Spring scheduler quickstart
When you develop maven java project sometime you will get issue is some jars library that you need but not yet or not exist on maven center repository, so how you can make your project build work with these issues. In this post i will guide you how to install local jars into maven local repository. Continue reading How to install local jars into maven local repository