By default, .jsp extensions will be recognized as JSP files.
Netbeans will understand this, let you create them, and do syntax highlighting.
You can use all the JAXP examples I've given you inside these JSP files.
You'll have to put any supporting jar files for your code in the WEB-INF/lib directory.
If you write Java code, you can put the packages under "Source Packages" and they'll build appropriately inside Netbeans.