Configuring JBoss SSL

本文详细介绍了如何为JBoss配置SSL证书的过程。首先创建自签名证书,并将其移动到JBoss目录下,最后编辑Tomcat配置文件启用SSL。适用于希望了解JBoss安全连接设置的开发者。

There are a few web pages that describe configuring Secure Socket Layer (SSL) for JBoss, but most gloss over some of the details.

Deep inside the guts of JBoss is an instance of another server called Tomcat, and when it comes to using SSL and HTTPS, JBoss delegates all the implementation stuff to that bundled Tomcat installation. As a result, some of the instructions for implementing SSL come directly from Tomcat documentation. For example, I used this document to start figuring out how to enable SSL.

Before starting, there are two things to ascertain:

  1. where JBoss is installed on your machine; and
  2. that there's a version of the Java Developer's Kit on the JBoss machine.

For the purposes of this write-up, we will describe setting up JBoss to use a temporary, self-signed SSL Certificate. Also, we'll assume that you're installing under Windows.

There are essentially three steps:

  1. create the self-signed certificate;
  2. move the self-signed certificate to a JBoss directory; and
  3. edit the Tomcat configuration file to turn on SSL.

Creating the Self-Signed Certificate

The Java Developer's Kit includes a utility to create certificates. Go to a command line and type the following:

 
This command tells Java to generate a key. Actually, it does two things:
  1. it creates a new key; and
  2. if necessary, it creates a collection of keys (called a "key store") to put the key in.

There are some prompts that look like this:

Notice that there are two prompts for the password. That's because there's one password for the keystore, and one password for the actual key.

Moving the Keystore

One of the things that the tool isn't very good about is telling you where it created that keystore. By default, the keygen tool puts information in the "Documents and Settings" directory for your userid. In the example, above, we'd find that they keystore has been created as a file called:

 
That location isn't very helpful. Try copying it to the conf directory of your JBoss installation. For example:
 
When I do this, I usually change the name to "chap8.keystore" because that's the default name used in the next step.

Update the Configuration File

First up, you should probably shut down the JBoss server as you do this step.

In the JBoss directory, there should be a file called server.xml:

 
This file includes information about what web features to turn on when the server starts up. Inside this file, there should be a part that looks like this:
 
Make the following changes:
  1. Uncomment the block
  2. Change the port to 443
  3. Change the keystore password to the password used, above ("changeit")

The end result should look something like this:

 
Now start up the server, and if all went according to plan, SSL should now be enabled.
源码来自:https://pan.quark.cn/s/41b9d28f0d6d 在信息技术领域中,jQuery作为一个广受欢迎的JavaScript框架,显著简化了诸多操作,包括对HTML文档的遍历、事件的管理、动画的设计以及Ajax通信等。 本篇文档将深入阐释如何运用jQuery达成一个图片自动播放的功能,这种效果常用于网站的轮播展示或幻灯片演示,有助于优化用户与页面的互动,使网页呈现更加动态的视觉体验。 为了有效实施这一功能,首先需掌握jQuery的核心操作。 通过$符号作为接口,jQuery能够迅速选取DOM组件,例如$("#id")用于选取具有特定ID的元素,而$(".class")则能选取所有应用了某类class的元素。 在选定元素之后,可以执行多种行为,诸如事件监听、样式的变更、内容的更新以及动画的制作等。 关于“一个基于jQuery的图片自动播放功能”,首要任务是准备一组图片素材,这些素材将被整合至一个容器元素之中。 例如,可以构建一个div元素,将其宽度设定为单张图片的尺寸,再借助CSS实现溢出内容的隐藏,从而构建出水平滚动的初始框架。 ```html<div id="slider"> <img src="image1.jpg" alt="Image 1"> <img src="image2.jpg" alt="Image 2"> <!-- 更多图片内容... --></div>```接着,需要编写jQuery脚本以实现图片的自动切换。 这通常涉及到定时器的运用,以设定周期性间隔自动更换当前显示的图片。 通过使用`.fadeOut()`和`.fadeIn()`方法,能够实现图片间的平滑过渡,增强视觉效果。 ```javascript$(document).re...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值