📄 __happyaxis.java
字号:
} //[ /happyaxis.jsp; Line: 206] //[ /happyaxis.jsp; Line: 207] //[ /happyaxis.jsp; Line: 208] /** //[ /happyaxis.jsp; Line: 209] * get servlet version string //[ /happyaxis.jsp; Line: 210] * //[ /happyaxis.jsp; Line: 211] */ //[ /happyaxis.jsp; Line: 212] //[ /happyaxis.jsp; Line: 213] public String getServletVersion() { //[ /happyaxis.jsp; Line: 214] ServletContext context=getServletConfig().getServletContext(); //[ /happyaxis.jsp; Line: 215] int major = context.getMajorVersion(); //[ /happyaxis.jsp; Line: 216] int minor = context.getMinorVersion(); //[ /happyaxis.jsp; Line: 217] return Integer.toString(major) + '.' + Integer.toString(minor); //[ /happyaxis.jsp; Line: 218] } //[ /happyaxis.jsp; Line: 219] //[ /happyaxis.jsp; Line: 220] /** //[ /happyaxis.jsp; Line: 221] * //[ /happyaxis.jsp; Line: 222] * @return the classname of the parser //[ /happyaxis.jsp; Line: 223] */ //[ /happyaxis.jsp; Line: 224] public String getParserName() throws Exception { //[ /happyaxis.jsp; Line: 225] // Create a JAXP SAXParser //[ /happyaxis.jsp; Line: 226] SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); //[ /happyaxis.jsp; Line: 227] if(saxParserFactory==null) { //[ /happyaxis.jsp; Line: 228] return "no XML parser factory found"; //[ /happyaxis.jsp; Line: 229] } //[ /happyaxis.jsp; Line: 230] SAXParser saxParser = saxParserFactory.newSAXParser(); //[ /happyaxis.jsp; Line: 231] if(saxParser==null) { //[ /happyaxis.jsp; Line: 232] return "Could not create an XML Parser"; //[ /happyaxis.jsp; Line: 233] } //[ /happyaxis.jsp; Line: 234] //[ /happyaxis.jsp; Line: 235] // check to what is in the classname //[ /happyaxis.jsp; Line: 236] String saxParserName = saxParser.getClass().getName(); //[ /happyaxis.jsp; Line: 237] return saxParserName; //[ /happyaxis.jsp; Line: 238] } //[ /happyaxis.jsp; Line: 239] //[ /happyaxis.jsp; Line: 240] //[ /happyaxis.jsp; Line: 241] // StaleIndicator interface public boolean _isStale() { weblogic.servlet.jsp.StaleChecker sci =(weblogic.servlet.jsp.StaleChecker)(getServletConfig().getServletContext()); java.io.File f = null; long lastModWhenBuilt = 0L; if (sci.isResourceStale("/happyaxis.jsp", 1037154019000L, "7.0.1.0")) return true; return false; } public static boolean _staticIsStale(weblogic.servlet.jsp.StaleChecker sci) { java.io.File f = null; long lastModWhenBuilt = 0L; if (sci.isResourceStale("/happyaxis.jsp", 1037154019000L, "7.0.1.0")) return true; return false; }
public void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
{
// declare and set well-known variables:
javax.servlet.ServletConfig config = getServletConfig();
javax.servlet.ServletContext application = config.getServletContext();
javax.servlet.jsp.tagext.Tag _activeTag = null;
// variables for Tag extension protocol
Object page = this;
javax.servlet.jsp.JspWriter out;
javax.servlet.jsp.PageContext pageContext = javax.servlet.jsp.JspFactory.getDefaultFactory().getPageContext(this, request, response, null, false, 8192, true);
out = pageContext.getOut(); JspWriter _originalOut = out;
// *NO* HttpSession: page has session="false" directive.
try { // error page try block out.print("<html>\n<head>\n<title>Axis Happiness Page</title>\n</head>\n<body bgcolor=\'#ffffff\'>\n"); out.print("\n"); out.print("\n<html><head><title>Axis Happiness Page</title></head>\n<body>\n\n<h2>Examining webapp configuration</h2>\n\n<p>\n<h3>Needed Components</h3>\n"); //[ /happyaxis.jsp; Line: 249] int needed=0,wanted=0; //[ /happyaxis.jsp; Line: 250] //[ /happyaxis.jsp; Line: 251] /** //[ /happyaxis.jsp; Line: 252] * the essentials, without these Axis is not going to work //[ /happyaxis.jsp; Line: 253] */ //[ /happyaxis.jsp; Line: 254] needed=needClass(out, "javax.xml.soap.SOAPMessage", //[ /happyaxis.jsp; Line: 255] "saaj.jar", //[ /happyaxis.jsp; Line: 256] "SAAJ API", //[ /happyaxis.jsp; Line: 257] "Axis will not work", //[ /happyaxis.jsp; Line: 258] "http://xml.apache.org/axis/"); //[ /happyaxis.jsp; Line: 259] //[ /happyaxis.jsp; Line: 260] needed+=needClass(out, "javax.xml.rpc.Service", //[ /happyaxis.jsp; Line: 261] "jaxrpc.jar", //[ /happyaxis.jsp; Line: 262] "JAX-RPC API", //[ /happyaxis.jsp; Line: 263] "Axis will not work", //[ /happyaxis.jsp; Line: 264] "http://xml.apache.org/axis/"); //[ /happyaxis.jsp; Line: 265] //[ /happyaxis.jsp; Line: 266] needed+=needClass(out, "org.apache.axis.transport.http.AxisServlet", //[ /happyaxis.jsp; Line: 267] "axis.jar", //[ /happyaxis.jsp; Line: 268] "Apache-Axis", //[ /happyaxis.jsp; Line: 269] "Axis will not work", //[ /happyaxis.jsp; Line: 270] "http://xml.apache.org/axis/"); //[ /happyaxis.jsp; Line: 271] //[ /happyaxis.jsp; Line: 272] needed+=needClass(out, "org.apache.commons.discovery.Resource", //[ /happyaxis.jsp; Line: 273] "commons-discovery.jar", //[ /happyaxis.jsp; Line: 274] "Jakarta-Commons Discovery", //[ /happyaxis.jsp; Line: 275] "Axis will not work", //[ /happyaxis.jsp; Line: 276] "http://jakarta.apache.org/commons/discovery.html"); //[ /happyaxis.jsp; Line: 277] //[ /happyaxis.jsp; Line: 278] needed+=needClass(out, "org.apache.commons.logging.Log", //[ /happyaxis.jsp; Line: 279] "commons-logging.jar", //[ /happyaxis.jsp; Line: 280] "Jakarta-Commons Logging", //[ /happyaxis.jsp; Line: 281] "Axis will not work", //[ /happyaxis.jsp; Line: 282] "http://jakarta.apache.org/commons/logging.html"); //[ /happyaxis.jsp; Line: 283] //[ /happyaxis.jsp; Line: 284] //should we search for a javax.wsdl file here, to hint that it needs //[ /happyaxis.jsp; Line: 285] //to go into an approved directory? because we dont seem to need to do that. //[ /happyaxis.jsp; Line: 286] needed+=needClass(out, "com.ibm.wsdl.factory.WSDLFactoryImpl", //[ /happyaxis.jsp; Line: 287] "wsdl4j.jar", //[ /happyaxis.jsp; Line: 288] "IBM's WSDL4Java", //[ /happyaxis.jsp; Line: 289] "Axis will not work", //[ /happyaxis.jsp; Line: 290] null); //[ /happyaxis.jsp; Line: 291] //[ /happyaxis.jsp; Line: 292] needed+=needClass(out, "javax.xml.parsers.SAXParserFactory", //[ /happyaxis.jsp; Line: 293] "xerces.jar", //[ /happyaxis.jsp; Line: 294] "JAXP implementation", //[ /happyaxis.jsp; Line: 295] "Axis will not work", //[ /happyaxis.jsp; Line: 296] "http://xml.apache.org/xerces-j/"); //[ /happyaxis.jsp; Line: 297] //[ /happyaxis.jsp; Line: 298] needed+=needClass(out,"javax.activation.DataHandler", //[ /happyaxis.jsp; Line: 299] "activation.jar", //[ /happyaxis.jsp; Line: 300] "Activation API", //[ /happyaxis.jsp; Line: 301] "Axis will not work", //[ /happyaxis.jsp; Line: 302] "http://java.sun.com/products/javabeans/glasgow/jaf.html"); //[ /happyaxis.jsp; Line: 303] out.print("\n<h3>Optional Components</h3>\n"); //[ /happyaxis.jsp; Line: 305] /* //[ /happyaxis.jsp; Line: 306] * now the stuff we can live without //[ /happyaxis.jsp; Line: 307] */ //[ /happyaxis.jsp; Line: 308] wanted+=wantClass(out,"javax.mail.internet.MimeMessage", //[ /happyaxis.jsp; Line: 309] "mail.jar", //[ /happyaxis.jsp; Line: 310] "Mail API", //[ /happyaxis.jsp; Line: 311] "Attachments will not work", //[ /happyaxis.jsp; Line: 312] "http://java.sun.com/products/javamail/"); //[ /happyaxis.jsp; Line: 313] //[ /happyaxis.jsp; Line: 314] wanted+=wantClass(out,"org.apache.xml.security.Init", //[ /happyaxis.jsp; Line: 315] "xmlsec.jar", //[ /happyaxis.jsp; Line: 316] "XML Security API", //[ /happyaxis.jsp; Line: 317] "XML Security is not supported", //[ /happyaxis.jsp; Line: 318] "http://xml.apache.org/security/"); //[ /happyaxis.jsp; Line: 319] //[ /happyaxis.jsp; Line: 320] /* //[ /happyaxis.jsp; Line: 321] * resources on the classpath path //[ /happyaxis.jsp; Line: 322] */ //[ /happyaxis.jsp; Line: 323] /* broken; this is a file, not a resource //[ /happyaxis.jsp; Line: 324] wantResource(out,"/server-config.wsdd", //[ /happyaxis.jsp; Line: 325] "There is no server configuration file;" //[ /happyaxis.jsp; Line: 326] +"run AdminClient to create one"); //[ /happyaxis.jsp; Line: 327] */ //[ /happyaxis.jsp; Line: 328] /* add more libraries here */ //[ /happyaxis.jsp; Line: 329] //[ /happyaxis.jsp; Line: 330] out.write("<h3>"); //[ /happyaxis.jsp; Line: 331] //is everythng we need here //[ /happyaxis.jsp; Line: 332] if(needed==0) { //[ /happyaxis.jsp; Line: 333] //yes, be happy //[ /happyaxis.jsp; Line: 334] out.write("<i>The core axis libraries are present. </i>"); //[ /happyaxis.jsp; Line: 335] } else { //[ /happyaxis.jsp; Line: 336] //no, be very unhappy //[ /happyaxis.jsp; Line: 337] response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); //[ /happyaxis.jsp; Line: 338] out.write("<i>" //[ /happyaxis.jsp; Line: 339] +needed //[ /happyaxis.jsp; Line: 340] +" core axis librar" //[ /happyaxis.jsp; Line: 341] +(needed==1?"y is":"ies are") //[ /happyaxis.jsp; Line: 342] +" missing</i>"); //[ /happyaxis.jsp; Line: 343] } //[ /happyaxis.jsp; Line: 344] //now look at wanted stuff //[ /happyaxis.jsp; Line: 345] if(wanted>0) { //[ /happyaxis.jsp; Line: 346] out.write("<i>" //[ /happyaxis.jsp; Line: 347] +wanted //[ /happyaxis.jsp; Line: 348] +" optional axis librar" //[ /happyaxis.jsp; Line: 349] +(wanted==1?"y is":"ies are") //[ /happyaxis.jsp; Line: 350] +" missing</i>"); //[ /happyaxis.jsp; Line: 351] } else { //[ /happyaxis.jsp; Line: 352] out.write("The optional components are present."); //[ /happyaxis.jsp; Line: 353] } //[ /happyaxis.jsp; Line: 354] out.write("</h3>"); //[ /happyaxis.jsp; Line: 355] //hint if anything is missing //[ /happyaxis.jsp; Line: 356] if(needed>0 || wanted>0 ) { //[ /happyaxis.jsp; Line: 357] out.write(getInstallHints(request)); //[ /happyaxis.jsp; Line: 358] } //[ /happyaxis.jsp; Line: 359] //[ /happyaxis.jsp; Line: 360] //[ /happyaxis.jsp; Line: 361] //[ /happyaxis.jsp; Line: 361] out.print("\n <p>\n <B><I>Note:</I></B> Even if everything this page probes for is present, there is no guarantee your\n web service will work, because there are many configuration options that we do\n not check for. These tests are <i>necessary</i> but not <i>sufficient</i>\n <hr>\n\n <h2>Examining Application Server</h2>\n "); //[ /happyaxis.jsp; Line: 368] String servletVersion=getServletVersion(); //[ /happyaxis.jsp; Line: 369] String xmlParser=getParserName(); //[ /happyaxis.jsp; Line: 370] //[ /happyaxis.jsp; Line: 371] //[ /happyaxis.jsp; Line: 372] //[ /happyaxis.jsp; Line: 372] out.print("\n <table>\n <tr><td>Servlet version</td><td>"); out.print(String.valueOf( servletVersion )); //[ /happyaxis.jsp; Line: 373] out.print("</td></tr>\n <tr><td>XML Parser</td><td>"); out.print(String.valueOf( xmlParser )); //[ /happyaxis.jsp; Line: 374] out.print("</td></tr>\n </table>\n\n <h2>Examining System Properties</h2>\n"); //[ /happyaxis.jsp; Line: 378] /** //[ /happyaxis.jsp; Line: 379] * Dump the system properties //[ /happyaxis.jsp; Line: 380] */ //[ /happyaxis.jsp; Line: 381] java.util.Enumeration e=null; //[ /happyaxis.jsp; Line: 382] try { //[ /happyaxis.jsp; Line: 383] e= System.getProperties().propertyNames(); //[ /happyaxis.jsp; Line: 384] } catch (SecurityException se) { //[ /happyaxis.jsp; Line: 385] } //[ /happyaxis.jsp; Line: 386] if(e!=null) { //[ /happyaxis.jsp; Line: 387] out.write("<pre>"); //[ /happyaxis.jsp; Line: 388] for (;e.hasMoreElements();) { //[ /happyaxis.jsp; Line: 389] String key = (String) e.nextElement(); //[ /happyaxis.jsp; Line: 390] out.write(key + "=" + System.getProperty(key)+"\n"); //[ /happyaxis.jsp; Line: 391] } //[ /happyaxis.jsp; Line: 392] out.write("</pre><p>"); //[ /happyaxis.jsp; Line: 393] } else { //[ /happyaxis.jsp; Line: 394] out.write("System properties are not accessible<p>"); //[ /happyaxis.jsp; Line: 395] } //[ /happyaxis.jsp; Line: 396] out.print("\n <hr>\n Platform: "); out.print(String.valueOf( getServletConfig().getServletContext().getServerInfo() )); //[ /happyaxis.jsp; Line: 398] out.print("\n</body>\n</html>\n\n\n"); } catch (Throwable __ee) { while (out != null && out != _originalOut) out = pageContext.popBody(); ((weblogic.servlet.jsp.PageContextImpl)pageContext).handlePageException((Throwable)__ee); }
//before final close brace...
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -