Question: I am starting to work on a Fairly standard Jsp application. (Jsp,Oracle backend).

The security of the application is important. So what are the common(also uncommon ) Pitfalls that I should avoid as a novice.

Basically, Its just a few forms to get user input and some session management to display data according to user roles.

This discussion could serve as reference to future users also.

regards

Answer: 
In **java 8**, you can leverage the new `java.time.Instant`. In `java.sql.TimeStamp`, two new method are added from *java 1.8*: `public static Timestamp from(Instant instant)` and `public Instant toInstant()`. 

So to add sec, we can convert the `TimeStamp` to Instant and then call `plusSeconds` and then back to TimeStamp:

```
Timestamp ts_from_ws = new Timestamp(retry_date);
Instant next600Sec = ts_from_ws.toInstant().plusSeconds(600);
Timestamp ts_new_date_ws = TimeStamp.from(next600Sec);

```

Or one line:

```
Timestamp ts_new_date_ws = TimeStamp.from(new Timestamp(retry_date).toInstant().plusSeconds(600))

```
```
Timestamp.from(dto.getTimeModified().toInstant().plusSeconds(600))

```