-
Outbound TLS/SSL Connections in WebSphere / Open Liberty
Notes on configuring Liberty to use specific SSL/TLS configurations for outbound connections.
-
Mounting Java classpath overrides in Liberty containers (with Kubernetes/OpenShift)
We have a use case to want to add environment-specific resource files (Java properties files, in our case) to the Java classpath of Liberty images deployed to our OpenShift clusters.
-
Check HTTP(S) Connectivity in Java
Trivial Java code to try an HTTP connection to a URL. In particular, this can be useful to see whether your Java environment and its SSL/TLS configuration will successfully connect to an https URL.
-
HTTP Basic Authentication with WebSphere/Open Liberty
Collecting the steps to add HTTP Basic Authentication to a Liberty web application.
-
Parsing JSON with jq
jq
is such a useful, powerful tool for parsing the JSON data that many APIs produce. -
CORS with WebSphere/Open Liberty
Follow-up to CORS and WebSphere, for WebSphere Liberty or OpenLiberty.
-
WebSphere Liberty JAX-RS File Upload
Documenting the steps to accept
multipart/form-data
submission of a file over JAX-RS, in current versions of WebSphere Liberty. -
Improved PuTTY Proxying
PuTTY 0.77 introduced some new proxy capabilities (2022-05-07) that simplify setting up a “jump” host.
-
Testing DB2 JDBC connectivity
Useful ability to test DB2 JDBC connectivity, given only a JRE and the JCC jar file.
-
SSH Jump Hosts
Small addition to prior SSH tips, using SSH Jump hosts.
-
Download/Backup Podcast Audio Files
Simple Python script to download a podcast’s audio files
-
Controlling log4j Log Level at Runtime, 2.0
Follow-up to earlier post, adjusted for log4j version 2, this time in XML configuration:
-
Introduction to OpenShift Service Mesh
Overview
OpenShift Service Mesh (OSSM) is the Red Hat version of the opensource Istio project, which provides seamless networking capabilities like dynamic endpoint routing, security, and health monitoring.
-
Running RedHat UBI (minimal) on WSL
Documenting my exercise in getting RedHat UBI Minimal (as an alternative to Alpine) installed and running under Windows Subsystem for Linux (WSL). I was disappointed to not find this available on the Microsoft Store or anything official from RedHat, but following this clear example with RHEL, it’s been easy to accomplish.
-
CORS and WebSphere
Cross-origin Resource Sharing
I won’t try to explain CORS, but in summary, browsers, by default, don’t allow JavaScript to make HTTP requests to domains other than the one the JavaScript was loaded from, and CORS is a way for servers to say that some domains are expected to make such “cross-origin” requests to them.
-
Some OpenShift Container Platform Learnings
-
How this Blog is Built
Quick list of what I’m using to produce and serve this blog.
-
Adding Comments to this Blog
Adding comments to a GitHub Pages Jekyll Blog.
-
Customizing SpringMVC Jackson Behaviors
These days it seems almost all examples of doing anything with Spring assume Spring Boot, which we’re not using. So here’s my foray into modifying the Jackson
ObjectMapper
that SpringMVC configures and customizes by default. -
Additional Handling of Jackson Parsing and Mapping Errors
Brief follow-up to Spring MVC and JSR 303 Validation error customization.
-
SSH Tunneling with a manual first hop
Follow-up to:
-
Migration/Backup of DeveloperWorks Blog: Part 2
Looks like the sunset of this platform is back “on” again. To be shut down December 31, 2019. This was my notification:
-
JSR 303 Validation with Spring Web Flow
A bit of additional information about using JSR-303 validation with Spring Web Flow. (See Spring MVC, JSR 303 Validation, and WebSphere.)
-
Git Bash with SSH agent
Quick tip for not having to keep typing your SSH key passphrase (which should be a good, difficult passphrase) when executing git commands that access the GitHub remote server.
-
Downloading jar files from Maven, without Maven
Maven Central jars can be downloaded from:
-
Adding Contrast Security to Docker Liberty image
Follow-up to, and making use of Retrieving the Contrast Security agent jar from a script.
-
Retrieving the Contrast Security agent jar from a script
(In preparation for pulling into a Docker image of a web application.)
-
Editing files in Liberty Docker containers (e.g. Trace logging)
I discovered that the default Liberty Docker images - currently based on Ubuntu - don’t include vi or edit for editing files. Nor sudo to be able to install those programs.
-
Enabling HTTP request/response logging in Liberty
The following Liberty configuration, potentially added into the
configDropins
directory as a separate file, can be used to enable HTTP request logging: -
SSH tunnels to Docker image registry, on Windows
I’ve been working with Docker lately (for WebSphere Liberty).
-
vi edit mode in Windows (10)
Small tip if you’re on Windows and are used to UNIX vi style shell command history (set -o vi). And aren’t using cygwin, Linux Subsystem for Windows, Git bash, etc.
-
Migration/Backup of DeveloperWorks Blog
I was informed a few months ago that IBM DeveloperWorks intends to sunset this instance of IBM Connections, replacing it with an “IBM Communities” site at https://www.ibm.com/community/
-
Spring Web Flow progress logging
Small technique we use for getting useful “step” logging from Spring Web Flow applications, where the URL itself doesn’t tell you what path a user is taking through your application. Which is often useful for investigating issues.
-
C# .NET timestamps and java.time parsing
Follow up to previous post, New Java 8 date/time classes: parsing to older classes, with Time Zone
-
New Java 8 date/time classes: parsing to older classes, with Time Zone
Quick info about my foray into new
java.time
classes, because they offer the ability to have “optional” components in their format strings. -
Liberty for a Traditionalist
WebSphere Liberty vs. “Traditional”
-
XML JAXB Response List of Errors
Minor addition to Spring MVC and JSR 303 Validation error customization and Error pattern for REST/HTTP APIs.
-
Error pattern for REST/HTTP API
Discussing with a customer about how to return errors from our “RESTish” API. (Which has existed for a long time, well predating at least our current awareness of good HTTP API practices). Thought I’d document a few things while they’re fresh in my memory…
-
Spring MVC, JSR 303 Validation, and WebSphere
(On Traditional WebSphere (tWAS) 8.5.5, Java 8, or on WebSphere Liberty 18, currently with Feature webProfile-6.0, in order to match the tWAS spec levels as closely as possible.)
-
Spring MVC and JSR 303 Validation error customization
Brief follow-up to Spring MVC, JSR 303 Validation, and WebSphere.
-
Spring MVC Controller, WebSphere Traditional, JSON
Just a quick note on doing JSON with Spring MVC, under WebSphere 8.5.5 Traditional.
-
JAXB @XmlRootElement and JAXBElement<class>
Little tip when generating JAXB classes from XML Schema:
-
Running RAD on a Mac
I’ve recently been trying to get my secondary machine, a Mac, running Rational Application Developer at least close to how I have it running on my primary Windows machine. (While awaiting hardware fixes and system reload.)
-
RAD on Mac: WebSphere and JAXB
After getting RAD running on my MacBook, I hit a couple of issues trying to generate JAXB classes from an XML Schema.
-
SSH tips
I’m normally a PuTTY user, but I’m temporarily on a *IX (MacOS) system, and learning a few simple techniques for doing some of what I’ve done with PuTTY, plink, and pageant. So I thought I’d jot down a few of those.
-
iOS Xcodebuild Script
Quite a departure from my normal topics, I’ve had the opportunity to work on an iOS (Swift) app recently (with IBM MobileFirst Platform Foundation handling the server-side logic). Working through various articles and StackOverflow questions to try to find a “happy medium” for the level of build process we needed, I thought what I’d written up for our team could prove useful to others working through something similar.
-
RAD and "Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory"
Missing IBM Websphere SSL class
-
SoapUI: scripting today's date
See Working with Properties and the subsequent articles under that same “Scripting & Properties” section.
-
MobileFirst Java SQL Adapter with Java EE DataSource
Minor addition to the MobileFirst Foundation Java SQL Adapter tutorial.
-
Testing MobileFirst Adapters with SoapUI
Testing and Debugging Adapters describes ways to test MobileFirst Foundation adapters via direct REST access to them. This is a great way to isolate testing your server-side capabilities from your mobile client application(s).
-
Jackson JSON, "map" properties in WebSphere 8.5.5
Minor follow-up to A JSON REST client in WebSphere 8.5
-
SoapUI dynamic date parameter
Quick/brief post on putting a dynamic date into a (REST) parameter in a SoapUI request.
-
A JSON REST client in WebSphere 8.5 (Full Profile)
-
Tracing JAX-RS client messages in WebSphere
Through just a little trial-and-error, these trace strings get me the basic URL and request/response message contents when running JAX-RS client code from within WebSphere Application Server 8.5 (which uses Apache Wink as its JAX-RS implementation):
-
JAX-RS in WebSphere to accept uploaded files
We’ve recently had a need to accept files submitted by a partner and perform some processing on them, with the partner returning later to retrieve the results. Rather than the “old”, standard approach of using something like sftp and regularly kicking off a cron job to look for input files, this seemed like a good case for a Web Service.
-
JAXB with Java 7 and xs:boolean
JAXB and Boolean
-
Firefox Tip - Using Multiple Profiles
-
Basic CDI (in WebSphere 8.5, for JAX-WS)
Dependency Injection (DI) is a really, really useful pattern, IMO. I imagine most folks get that already. The Spring framework was my introduction to DI, and I still use and like Spring for many projects, in many ways.
-
Disable Compile Warnings in RAD
(I’m assuming this is the same in stock Eclipse, I don’t have it installed right now to confirm.)
-
Injecting System Properties into Spring beans
This is an ‘oldie’, but I just needed it again, so I thought it worth describing.
-
Making the WebSphere Console look distinct
The problem
-
Find long-running IHS (web) requests
Quick way to locate or watch for long-running IHS requests:
-
Simple Script to Update Enterprise Application
I got tired of updating a dozen applications at once, across development, test, and production systems, from the WebSphere admin GUI.
-
Capturing Web Service (JAX-WS) messages in WebSphere
We wanted to capture some representative SOAP messages from our JAX-WS client Web Application (so that we could mock up a test service using SoapUI), and as it happens this is very easy to do with WebSphere trace settings.
-
Testing Remote TCP/IP Connectivity
We frequently need to confirm connectivity between systems on particular ports.
-
Command-line mail test through remote SMTP Server
Because I investigated this for a project, Linux (at least RHEL) mailx can use a remote SMTP server, thus enabling us to test whether that server allows email sending from our application.
-
Simple Script to create URL Resources
This script will iterate through a list of name/URL pairs and create new Cell-level URL Resources for them.
-
Spring Beans on Web Application Scope
There are times when we’d like to place injected Spring beans onto a scope where they can be accessed directly by JSTL EL expressions (
${variable}
). Perhaps URLs from JEE Resource References to be used in hrefs. -
Finding the WebSphere Admin Console Port
Maybe there’s a better reference, but this page in the WebSphere Commerce Infocenter has it:
-
JAX-WS Code for WebSphere 8.5, Part 2
As a follow-up to Part 1, here are some additional considerations for generating JAX-WS code.
-
JAX-WS Code for WebSphere 8.5
JAX-WS version
-
mod_mpmstats to analyze thread usage in IBM HTTP Server
(Related to my earlier post on mod_status.)
-
WebSphere - Making changes to web.xml without redeploying the WAR/EAR
Sometimes you want to test quick changes to single files deployed on WebSphere without having to upload a whole new EAR, WAR, or even individual file. (I wish the individual file upload process was simpler and safer.)
-
Quick Form Filling for Testing Web Pages
Form Filler Bookmarklet from Benjamin Keen
-
Controlling log4j Log Level at Runtime
To Log or not to Log
-
User Libraries in Eclipse (RAD)
I imagine most folks who use Eclipse or its variants already know about this, but just in case…
-
Using IBM HTTP Server 6.1 diagnostic capabilities with WebSphere
Using IBM HTTP Server 6.1 and later diagnostic capabilities with WebSphere
-
Using a Template Engine from your Java code
Several times we’ve needed to retain output files which are a mix of static HTML and dynamic data.
-
Miscellaneous wsadmin
While attempting to answer a question on StackOverflow, I experimented a little with some wsadmin commands, so I thought I’d record what I discovered. (I work with the Jython, rather than JACL, versions of the commands mostly because I like the idea of picking up a little of a new programming language which has other uses.)
-
Perl, Modules, and AIX
I’m sure this information is in hundreds or thousands of other places, but as I had written it up for an internal team Wiki, I thought I’d repost here as well.
-
Sender Policy Framework (SPF) for email SPAM Reduction
Since I can tell that I don’t fully understand this myself, I’ll start by pointing to these articles which more fully & authoritatively describe SPF’s purpose, behavior, and effects:
-
wsadmin Script to check the JVM heap size of a WebSphere Server
In response to this StackOverflow question, here’s a simple Jython wsadmin script which will display the JVM min and max heap sizes for the specified Application Server.
-
Basic JEE tip - JSP Comments
HTML comments are not displayed by a user’s browser, but they’re available in the source view. JSP comments are removed before the source HTML is returned to the browser.
-
Monitoring https SOAP requests
The Scenario
-
JNDI Lookup Tester
Simple JSP to perform JNDI lookups to see if the name you’re querying returns the object you’re expecting.
-
UNIX tip - Use 'find' for recursive directory permissions
When you want to make all directories executable, but not all files.
-
Temporarily Disabling WebSphere Cluster Members
Background
-
wsadmin Script to set WebSphere JVM Properties
I sometimes need to set a custom JVM Property for one or more Application Servers and dislike the tedium of setting them one-at-a-time through the console.
-
SSH key authentication with PuTTY, Part 2, Tunneling with Plink
Following up on Part 1, here’s an additional tip which I use frequently. That is, when I need to tunnel SSH through one machine to reach others, using a background proxy with SSH key authentication for the initial connection simplifies this 2-hop process.
-
SSH key authentication with PuTTY
This post is intended to document procedures which can be used to simplify and increase security of remote login procedures to UNIX systems through use of SSH private and public keys.
-
Social Bookmarking and Search in Firefox
Do you use Delicious or the Bookmarks service here on DeveloperWorks? Although Social Bookmarking is clearly useful for finding what others have found and sharing what you’ve found with others, my primary usage is to enable me to find again what I’ve found in the past.
-
Overview of Implementing a JAX-RS Service with WebSphere Web 2.0 Feature Pack
WebSphere Configuration
-
Disabling a WebSphere Application
If you just stop an application to make it unavailable, it will still be automatically started whenever the server where it resides is restarted. To disable an application entirely, but leave it installed, you can change the “autostart” settings under the application’s “Target specific application status” (WebSphere 6.1).
-
.tar.gz
Uncompress and un-tar in one step (leaving original file compressed):
-
AIX Encrypted File Systems (EFS)
Overview
-
Recovering deployed EAR files
Have you ever discovered that you no longer have the EAR file for the specific version of an Enterprise Application which is deployed on one of your systems?
-
WebSphere Web Server Plugin
After attending a webcast on the WebSphere Application Server 6.1 Plug-in, I thought I’d summarize the content I found helpful.
-
Tip - Finding exact version and applied patches of IBM HTTP Server
apachectl -V
-
WebSphere-World - RESTful services in Java - Platform choices
REST implementation options in WebSphere
Here is the URL for this bookmark: http://www.websphere-world.com/modules.php?name=News&file=article&sid=2069 -
WebSphere Session IDs
During investigation of some intermittent problems in one of our web applications, we observed some JSESSIONID cookie behavior that we couldn’t explain, so I performed some investigation into the cookie’s mechanics. I’ll attempt to summarize in this article what I learned.
-
View HTTP Request Headers
If you’ve ever wanted to know what kind of HTTP Request headers might be coming from a client or some intermediate proxy, here’s a simple JSP you can manually deploy to your JEE Web Application to see a list.
-
Finding a Java Class in your Servlet Container
An oldie, but still useful from time to time.