NetBeans: How to simplify copy/paste Java code from online tutorials

Some months ago I created a small useful NetBeans plugin, which allows to you to save time when pasting code samples from online tutorials. Today I used it again and I still find it very useful in this specific context. And it saves you time. That is why I want to report about it.

What is the feature? You can copy the Java source code of whole classes from a tutorial and paste it via Menu|Edit|Paste to new file. Either the package declaration of the Java class is taken in account or the Java class is placed in the correct package. This depends on the selected node and it is documented included screencasts at

That sounds familiar? Yes, this feature already exists natively in Eclipse JDT and Intellij IDEA.

Give it a try, when using NetBeans! Happy coding.

BTW: I am still looking for maintainers for my plugins! Because of time issues, I will not bugfix nor implement features anymore. Support your favorite IDE and by contribution to your favorite plugin!


How to see HTTP session content using PSI Probe?

You could use PSI Probe.

Drop probe.war into the webapps folder of your Tomcat, open the probe context in the browser (f.e. localhost:8080/probe) and at “Applications|/MYCONTEXT|Sessions|/SESSIONIDXYZ” you can see the session content of session SESSIONIDXYZ of the context MYCONTEXT.