Advertisement
Advertisement
| 01.29.2008 at 11:01PM PST, ID: 23121990 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 01.30.2008 at 08:43AM PST, ID: 20778523 |
1: 2: 3: 4: 5: 6: 7: 8: |
<%@ page import="java.net.*" %>
<%
URL url = new URL("http://www.google.com");
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setConnectTimeout(100);
conn.connect();
out.print("Response code is " + conn.getResponseCode());
%>
|
| 02.04.2008 at 10:11AM PST, ID: 20816588 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: |
package testing;
import java.net.*;
import java.io.*;
public class Functions {
public static String conTime(String urlString) {
try{
URL url = new URL(urlString);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setConnectTimeout(100);
conn.connect();
return "Response code is " + conn.getResponseCode();
}catch(Exception ioe){return ioe.toString();}
}
}
--------------------------------------------------------------
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">
<tlib-version>1.0</tlib-version>
<short-name>Functions</short-name>
<uri>http://tester.com</uri>
<function>
<name>conTime</name>
<function-class>testing.Functions</function-class>
<function-signature>
java.lang.String conTime(java.lang.String)
</function-signature>
</function>
</taglib>
-----------------------------------------------------------------
<%@ page import="java.net.*" %>
<%@taglib prefix="cto" uri="http://tester.com" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:out value="${cto:conTime('http://www.google.com')}"/>
|
| 02.11.2008 at 03:32AM PST, ID: 20865434 |