Java

How to convert HTML to PDF in Java ?

There is so common requirement to generate PDF for some online content or reporting data. Also there is number of ways doing it. For example you could deliver it by leveraging headless browser (like Chrome or an older, already not supported but verified by time – PhantomJs) or use some dedicated back-end library. Differences between the latter are most likely…

Continue Reading

Linux

Common usages of grep and find in Linux

It is so common need to dig some info in Linux remote machines where you have just a terminal access. Effectiveness of searching might be crucial in finding necessary files and content. Here are couple of commands come to help as: grep – search in file contents find – search by file name It happens that sometimes quite difficult to…

Continue Reading

Linux

How to run Linux command in background? How to keep it running after leaving terminal session?

When working with remote server through terminal it is common to run some processes in background. For example to start zipping something, put it into background and keep working on something else. Or even start a process and leave it running when you quit a terminal session. A quite common example could be – start application server. You just need…

Continue Reading

Java

What is a functional interface in Java8? Quick explanation and sample.

Any interface with a single abstract method is a functional interface and its implementation may be treated as lambda expression. It can have only a single functionality. However a functional interface can have unlimited default methods. Note, that default methods have implementation and abstract methods – not. The latter can be only one in functional interface. When defining your own…

Continue Reading

Weblogic

Could not find saved view state for token j0ej17tvl… What can be the cause?

Problem When observing Weblogic server log files, there are occasional occurancies of Error message: Could not find saved view state for token XXXXXXXXX… Where XXXXXXXXX is randomly generated string for each page post request. This error always comes along with: ADF_FACES-30107:The view state of the page has expired. Reload the page. Some background info Each web page, which posts a request…

Continue Reading

General

A quick Regular expressions (Regex) manual / cheat sheet. Samples.

Obviously regular expressions is a little, but powerful helper to implement various complex requirements. As it is a text search oriented functionality, it is extremely useful in DB based tasks related to data ETL layers, searching and other open text related logic. But it is used entirely everywhere. Almost every text editor support regex search file contents. Its very beneficial…

Continue Reading