Skip to content

Instantly share code, notes, and snippets.

Sandeep Chatterjee sndpchatterjee07

Block or report user

Report or block sndpchatterjee07

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sndpchatterjee07
sndpchatterjee07 / TestsGenericTaskInterpreter.java
Last active Aug 29, 2015
Test cases for methods of GenericTaskInterpreter class using Apache Log4J and TestWatcher.
View TestsGenericTaskInterpreter.java
package chatterjee.sandeep.miscellaneous;
import org.apache.log4j.*;
import org.junit.*;
import org.junit.rules.TestRule;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;
@sndpchatterjee07
sndpchatterjee07 / GenericTaskInterpreterTests.java
Created Aug 10, 2015
A method which will send a mail using JavaMail API and a JUnit test case to check that an exception of type javax.mail.MessagingException is not thrown.
View GenericTaskInterpreterTests.java
public void sendMail() throws MessagingException{
final String smtpServer = "smtp.gmail.com";
final String userAccount = ""; // Sender Account.
final String password = ""; // Password/Application Specific Password.
final String SOCKET_FACTORY = "javax.net.ssl.SSLSocketFactory";
final String smtpPort = "587";
final String PORT = "465";
final Properties props = new Properties();
props.put("mail.smpt.host", smtpServer);
@sndpchatterjee07
sndpchatterjee07 / tomcat-users.xml
Created Aug 6, 2015
Basic Application and Environment Setup for Spring web app using Ant - tomcat-users.xml
View tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@sndpchatterjee07
sndpchatterjee07 / BuildFailureMessage1.txt
Created Aug 6, 2015
Basic Application and Environment Setup for Spring web app using Ant - Build failure message 1
View BuildFailureMessage1.txt
Buildfile: /home/sandeep/MyDocs/workspace/springapp/build.xml
list:
BUILD FAILED
/home/sandeep/MyDocs/workspace/springapp/build.xml:138: java.io.FileNotFoundException: http://localhost:8080/manager/list
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1835)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:250)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:170)
@sndpchatterjee07
sndpchatterjee07 / build.properties
Created Aug 6, 2015
Basic Application and Environment Setup for Spring web app using Ant - build.properties
View build.properties
# Ant properties for building the springapp
appserver.home=/home/sandeep/Desktop/MyDocs/downloads/softwares/apache-tomcat/8.0.14/apache-tomcat-8.0.14
# for Tomcat 5 use $appserver.home}/server/lib
# for Tomcat 6 use $appserver.home}/lib
appserver.lib=${appserver.home}/lib
deploy.path=${appserver.home}/webapps
tomcat.manager.url=http://localhost:8080/manager
@sndpchatterjee07
sndpchatterjee07 / build.xml
Last active Aug 29, 2015
Basic Application and Environment Setup for Spring web app using Ant - build.xml
View build.xml
<?xml version="1.0"?>
<!-- ======================= LINKS TO OFFICIAL DOCUMENTATION ======== -->
<!-- Spring IO: http://docs.spring.io/docs/Spring-MVC-step-by-step/part1.html -->
<!-- https://ant.apache.org/manual/Tasks/property.html -->
<!-- http://ant.apache.org/manual/using.html#path -->
<!-- https://ant.apache.org/manual/Types/fileset.html -->
<!-- https://ant.apache.org/manual/Tasks/copy.html -->
<!-- https://ant.apache.org/manual/Tasks/taskdef.html -->
@sndpchatterjee07
sndpchatterjee07 / login.php
Last active Jul 31, 2019
Responsive Login Page (HTML5/PHP/Bootstrap3.3.4)
View login.php
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<link type="text/css" href="css/bootstrap/bootstrap.css" rel="stylesheet">
<style type="text/css">
html {
height: 100%;
}
* {
View Recommended Java Books
You can’t perform that action at this time.