• Jun 27, 2017

Yesterday, in one of my various Slack chats, the topic of JShell - the Java 9 REPL - came up in the context of how useful it would be for XPages development. Being able to open up a "shell" into a running XPages application could be really useful in a lot of ways - and I think that the XPages Debug Toolbar has an SSJS-evaluate feature that would do something like this.

Still, it got me looking around a bit, and I ran across Groovysh Server, which is a project that combines Apache's SSH server with Groovy's REPL to make an interactive remote-login shell running in the context of a given JRE. It even comes with a Spring Framework binding, showing its utility for this sort of thing.

So I decided to see how easy it would be to adapt this into an XPages context, and the answer is "pretty easy". I created a new project called XPages Groovy Shell to do just this. It's an XSP Library that you can enable in an application to, when it's loaded (i.e. when someone visits it via the web), spawn an SSH server on the specified port to allow logins and evaluation of Groovy code using the app's ClassLoader.

Now, I don't expect this to be a real project necessarily - I have a lot of non-tinkering work on my plate - but it can serve as an interesting proof of concept. Still, as it is, it's not too far from being expanded to having some proper user authentication, and, with some mechanism to "break into" the Faces environment to work with existing bean instances, it could be really something. As it stands, take a look - it's not a lot of code, and the concepts could be useful elsewhere too.

Sep 5, 2018

Great work..!! This is a really very interesting post. I am glad to found it. I found lots of information from your site. keep doing a great work... 

Hostgator One Cent Hosting

Oct 31, 2018
Sophie Miller

Je vous remercie de l'information! Je cherchais et ne pouvait pas trouver. Vous me aidé! university of illinois urbana champaign sat scores

Dec 13, 2018
sand cars

Thanks for sharing the information. Keep the good work going. Mobilism
simcity buildit mod apk  dead trigger mod apk

Dec 19, 2018

This is a great inspiring article.I am pretty much pleased with your good work. You put really very helpful information. Looking to reading your next post. keep up posting. Techsmith Promo codes 

Post New Comment