All
All
Projects
Snippets
Go
Explore
Home
About
Get Involved
IP
Legal
Interact With Us
Blog
Webinars
Discord
Twitter
YouTube
Facebook
OpenNTF GitHub
OpenNTF Connections GitHub
IBM Connections Downloads
DominoHelp (external)
Explore
Home
About
Get Involved
IP
Legal
Interact With Us
Blog
Webinars
Resources
Discord
Twitter
YouTube
Facebook
OpenNTF GitHub
OpenNTF Connections GitHub
IBM Connections Downloads
DominoHelp (external)
Resources
Discord
Twitter
YouTube
Facebook
OpenNTF GitHub
OpenNTF Connections GitHub
IBM Connections Downloads
DominoHelp (external)
Projects
Snippets
Collaboration Today
Sign In
Username
Password
Forgotten your login credentials?
Login
Register
All
All
Projects
Snippets
Go
New Sample on OpenNTF: How to write Servlets and Video how to set up IDE
Posted by
Niklas Heidloff
on
June 30, 2011
I've created a new project
Servlet Sample
.
Sometimes it's necessary to return some data as result of an HTTP request which is not supposed to be rendered as HTML (e.g. your own WebDAV protocol implementation) or you want to generate HTML yourself to have maximal control.
There are various ways to do this. For example you can use 'XAgents' which are XPages with a property rendered=false set. See Stephan Wissel's blog for more details.
You can also write something similar to a servlet within a NSF where you receive an HTTPServletRequest and need to return an HTTPServletResponse. See in the Extension Library for a sample.
This project shows how you can write a real servlet in your Eclipse IDE that can then be deployed as OSGi bundle.
You can then call your servlet globally or in the context of a database:
http://nheidloff-1/myurl
http://nheidloff-1/mydb.nsf/myurl
The video also shows how to use the Eclipse IDE to debug your Java code without having to deploy/redeploy anything.
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus