Linkchecker is a easy and visual way to check broken links in a web page using Firefox. It modifies locally the page using colors to point those who are working in green and not working in red. Simple and effective. Try it.
Linkchecker is a easy and visual way to check broken links in a web page using Firefox. It modifies locally the page using colors to point those who are working in green and not working in red. Simple and effective. Try it.
A simple Java servlet that looks for some well known databases drivers.
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class TestDB extends HttpServlet {
public void tryDataBase(String name, String url, PrintWriter out){
String fail = "fail";
String sucess = "Ok";
out.println("Looking for the "+ name +" driver...");
try {
Class.forName(url);
out.println(sucess);
} catch (ClassNotFoundException ex) {
out.println(fail);
}
out.println("
");
}
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
try {
out.println("Looking for databases");
out.println("
Looking for databases
");
tryDataBase("MySQL", "com.mysql.jdbc.Driver", out);
tryDataBase("Derby", "org.apache.derby.jdbc.EmbeddedDriver", out);
tryDataBase("PostgreSQL", "org.postgresql.Driver", out);
tryDataBase("Oracle", "oracle. jdbc.driver.OracleDriver", out);
tryDataBase("SQLite", "org.sqlite.JDBC", out);
out.println("");
} finally {
out.close();
}
}
}
When compiling and running this make sure you put your drivers in your classpath.
A example of output: