• 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 29, 2017
Emily Jack

yes I am totally agree that your post that you have sharing us. I have for a considerable length of time brought up for Fresh-Essays-UK agents, that you have to modernize and open up lastly, when you do, we by and by abandon clear course without direction. 

Jan 19, 2018
Ember Moon

I agree with the most of it.

Apr 9, 2018
Stroke of Genius

I liked your article and I hope you will have many entries or more   Stroke of Genius

Apr 10, 2018
Chili Pepper

Thumbs up guys your doing a really good job.     Chili Pepper

Apr 10, 2018
Black Pepper

Wonderful blog post. This is absolute magic from you! I have never seen a more wonderful post than this one. You've really made my day today with this. I hope you keep this up!   Black Pepper

Apr 10, 2018

Always so interesting to visit your site.What a great info, thank you for sharing. this will help me so much in my learning     Kiwano

Apr 10, 2018

I am impressed by the information that you have on this blog. It shows how well you understand this subject.     Walnuts

Apr 11, 2018

I am a new user of this site so here i saw multiple articles and posts posted by this site,I curious more interest in some of them hope you will give more information on this topics in your next articles.  Flaxseed

Post New Comment