ServletContext is a configuration Object which is created when web application is started. It contains different initialization parameter that can be configured in web.xml. Difference from ServletConfig ServletConfig is one per servlet whi…
The basic idea of Servlet container is using Java to dynamically generate the web page on the server side. So servlet container is essentially a part of a web server that interacts with the servlets. quoted from Servlet Container
A servlet is simply a class which responds to a particular type of network request - most commonly an HTTP request. reference from stackoverflow.com
拠点報告( hubReport.showReport ) を 「東京拠点 → 大阪拠点」と順に出力する 内部処理 処理ロジックを 東京拠点の報告処理 → 大阪拠点の報告処理 としてみる src | +-- jp.ymatsukawa +-- Main.java | +-- report | + -- HubReportStrategy.java (interfac…
stuff → staff 素晴らしい 今後この手法を参考にする クライアント側がプロダクション内部のことを気にしなくて良い プロダクション側が固定値でインスタンス生成の分岐可能 引数違いのコンストラクタ生成も可能 src | +-- jp.ymatsukawa +-- Main.java | +-…
stuff → staff 続き: インスタンス生成の分岐: factory method パターン - Red > Green > Refactor > Red ダメ 私に響かない クライアント側で冗長な情報が必要 パッケージ名、サブクラス名は公開せねばならぬし (jdbc の悪夢) プロダクション側でインスタン…
stuff → staff 元: インスタンス生成の分岐(Java) - Red > Green > Refactor > Red 自分に一番響く設計を手当たり次第 デザインパターンの Factory method より (記事中では Factory > Creator) src | +-- jp.ymatsukawa +-- Main.java | +-- stuff | + -- C…
stuff → staff 思い出し用に書き残し Stfuff のコンストラクタは最適化できるか? まず設計の目的から src | +-- jp.ymatsukawa +-- Main.java | +-- stuff | | | + -- Stuff.java +-- stuffType | + -- StuffType.java + -- Manager.java + -- Engineer.java…
IE11 th と td は 2 つで 1 つ workspace | |--- index.html |--- main.css index.html <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </meta></head></html>
alternative to visibility:collapse not working on IE and Chromestackoverflow.com
表題通り mac-safari 8.0.7 アウトプットイメージは下 workspace | |--- index.html |--- main.css index.html <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </meta></head></html>
mac-safari workspace | |-- index.html |-- main.css index.html <html lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </meta></head></html>
表題通りそのままです OK @Rule public final ExpectedException exception = ExpectedException.none(); NG @Rule protected final ExpectedException exception = ExpectedException.none(); @Rule private final ExpectedException exception = ExpectedE…
pom.xml でうまくいかんかったんで source value 1.5 is obsolete 問題(?) なんてのがあるらしく build > plugins > plugin > configuration の source, target を 明示的に利用 JDK の ver (${java.version} ではなく固定値) にしないと 「JDK 1.5 使ってま…
こういうの欲しかったので...書き残し 記事 java.util.Collections.unmodifiableMap() Method Examplewww.tutorialspoint.com 引用ソースコードと実行結果 import java.util.*; public class CollectionsDemo { public static void main(String[] s) { //obj…
$SOME_DIR/src/Main.java 1 import myutil.ExternalClass; 2 3 public class Main { 4 public static void main(String... args) { 5 ExternalClass externalClass = new ExternalClass(); 6 ExternalClass.SubClass subClass = externalClass.new SubClass(…
ループ変数、ループされる変数 のクラスに食い違いがないか確かめる ———————— 自戒用に書き残し import java.util.List; import org.apache.commons.beanutils.DynaBean; public class Test { public void testMethod(List<DynaBean> resource) { for(List<DynaBean> list : reso</dynabean></dynabean>…
Throwable は JVM レベルでの Serious Error を catch する時に使う Exception より高階層な API Exception はアプリケーションレベルでの例外を catch する時に使う Throwable より低階層な API app 構築に当たるならこちらを使うべき Throwable Throwable …
quoted literal and source code from: IBM Best Practice: Catching and re-throwing Java Exceptions - United States re-throw is ok notice the way to re-throw Correct The correct way to catch and re-throw an exception is to pass the caught exc…
何をどのように追加すればよいか分からなかったので Maven Repository: Search/Browse/Explore に遷移 ヘッダー(?) の検索フォームにライブラリ名を入れる(ここでは postgresql とする) 結果一覧が表示されるので適当なライブラリを選択する(PostgreSQL JDBC…
Statement 単純な実行計画を行いたい時(select * from ... を 1 回だけ など) PreparedStatement 複数回に渡る実行計画を行いたい時, ? のパラメーター解析を使いたい時(2 番目記事参照) JDBC - Statements, PreparedStatement and CallableStatementwww.tut…
基本的に、connection は開いたら閉じる 門外不出のOracle現場ワザ 第5章
Java に関わった話ではないと思い One rule-of-thumb: ask yourself "does it make sense to call this method, even if no Obj has been constructed yet?" If so, it should definitely be static. Java: when to use static methodsstackoverflow.com
参考記事 1. に直面したので、書き残し You have an outright naming conflict between java.awt.Event and com.mycompany.calendar.Event, and so you can't even compile. Why is using a wild card with a Java import statement bad?stackoverflow.com
環境 MacOSX 10.10.4 JDK 1.8.0_45 Play Framwork 2.4.2(Damiya) 前提 PlayFramework 初期状態から画面構築 に基づいて app 構築している PostgreSQL 構築 (brew だと、createuser 上手くいかんかったんでこっちで... brew はまた別途...) Postgres.app 公式…
ほとんど公式の Usage 通りです... 環境 MacOSX(Yosemite) 10.10.4 Java 1.8.0_45 sqlite3 3.8.5 sqlite DB を準備する $ mkdir ~/Develop $ touch ~/Develop/development.sqlite3 sqlite-jdbc を準備する ダウンロードページから適当な jar を取ってくる(最…
大前提 MacOSX(Yosemite) 10.10.4 Java 1.8.0_45 Play Framework 2.4.2 "Damiya" activator-1.3.5-minimal 公式サイトの [Download "Damiya"]を直接押下 initialize $ cd activator-1.3.5-minimal/ $ ./activator new Browse the list of templates: http://…
メモリ利用量 パフォーマンス が気になる時に切り分け 延々mallocとかもう... http://stackoverflow.com/a/4645155
Postfix error > 550 5.1.1 Recipient address rejected にて...気になった記事を留め書き Server refuses mail with 550 5.1.1 : Recipient address rejected: User unknown ...www.linuxquestions.org