Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/handler/DefaultHandler.java @ 991:688c39c50ee3
simplify ContextHandler
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 18 Oct 2016 00:22:46 -0600 |
parents | 8e9db0bbf4f9 |
children | 32d4b569567c |
comparison
equal
deleted
inserted
replaced
990:83cc6e05a58f | 991:688c39c50ee3 |
---|---|
96 { | 96 { |
97 ContextHandler context = (ContextHandler)handlers[i]; | 97 ContextHandler context = (ContextHandler)handlers[i]; |
98 if (context.isRunning()) | 98 if (context.isRunning()) |
99 { | 99 { |
100 writer.write("<li><a href=\""); | 100 writer.write("<li><a href=\""); |
101 if (context.getVirtualHosts()!=null && context.getVirtualHosts().length>0) | |
102 writer.write("http://"+context.getVirtualHosts()[0]+":"+request.getLocalPort()); | |
103 writer.write(context.getContextPath()); | 101 writer.write(context.getContextPath()); |
104 if (context.getContextPath().length()>1 && context.getContextPath().endsWith("/")) | 102 if (context.getContextPath().length()>1 && context.getContextPath().endsWith("/")) |
105 writer.write("/"); | 103 writer.write("/"); |
106 writer.write("\">"); | 104 writer.write("\">"); |
107 writer.write(context.getContextPath()); | 105 writer.write(context.getContextPath()); |
108 if (context.getVirtualHosts()!=null && context.getVirtualHosts().length>0) | |
109 writer.write(" @ "+context.getVirtualHosts()[0]+":"+request.getLocalPort()); | |
110 writer.write(" ---> "); | 106 writer.write(" ---> "); |
111 writer.write(context.toString()); | 107 writer.write(context.toString()); |
112 writer.write("</a></li>\n"); | 108 writer.write("</a></li>\n"); |
113 } | 109 } |
114 else | 110 else |
115 { | 111 { |
116 writer.write("<li>"); | 112 writer.write("<li>"); |
117 writer.write(context.getContextPath()); | 113 writer.write(context.getContextPath()); |
118 if (context.getVirtualHosts()!=null && context.getVirtualHosts().length>0) | |
119 writer.write(" @ "+context.getVirtualHosts()[0]+":"+request.getLocalPort()); | |
120 writer.write(" ---> "); | 114 writer.write(" ---> "); |
121 writer.write(context.toString()); | 115 writer.write(context.toString()); |
122 if (context.isFailed()) | 116 if (context.isFailed()) |
123 writer.write(" [failed]"); | 117 writer.write(" [failed]"); |
124 if (context.isStopped()) | 118 if (context.isStopped()) |