我正在尝试为503添加自定义错误页面.我所做的是.在nginx.conf文件中将以下行添加到服务器conf.
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /home/username/sites/myProject/current/errorPages;
internal;
Run Code Online (Sandbox Code Playgroud)
}
它在uwsgi关闭时显示自定义页面,但这不是任何图像的方式.我试图做很多我能想到的配置,但没有运气.有谁知道如何显示图像文件并为自定义错误页面启用css?
我将自定义错误页面放入/ home/username/sites/myProject/current/errorPages并且文件结构是..
errorPages/50x.html
errorPages/50x_files/50x.css
errorPages/50x_files/50x.js
errorPages/50x_files/image.png
Run Code Online (Sandbox Code Playgroud) 我正在尝试JOptionPane使用超链接调整长句的对话框()的高度.
我的代码是......
public class DialogTest {
public static void main(String[] args) throws Exception {
JTextPane jtp = new JTextPane();
Document doc = jtp.getDocument();
for (int i = 0; i < 50; i++) {
doc.insertString(doc.getLength(), " Hello Java World ", new SimpleAttributeSet());
if ((3 == i) || (7 == i) || (15 == i)) {
doc.insertString(doc.getLength(), " Hello Java World ", new SimpleAttributeSet());
SimpleAttributeSet attrs = new SimpleAttributeSet();
StyleConstants.setUnderline(attrs, true);
StyleConstants.setForeground(attrs, Color.BLUE);
String text = "www.google.com";
URL url = …Run Code Online (Sandbox Code Playgroud)