Check: http://www.coreservlets.com/Apache-Struts-Tutorial/Installing-Struts.html Spring: Struts to spring migration with Hibernate and Unit testing support: Start with equinox application from http://sourcebeat.com/downloads/ From: http://sitestree.com/?p=4912 Categories:47Tags: Post Data:2013-06-13 10:32:35 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a href=’http://SitesTree.com’ target=’new’ rel=”noopener”>http://SitesTree.com</a> 8112223 Canada …
Category: Java/J2EE/J2ME
Permanent link to this article: http://bangla.sitestree.com/your-first-struts-application-47/
A good resource for learning Struts #47
http://courses.coreservlets.com/Course-Materials/struts.html#Struts-Intro Download Jakarta struts from: http://apache.mirror.rafal.ca/struts/binaries/ Related downloads: http://apache.mirror.rafal.ca/ From: http://sitestree.com/?p=4960 Categories:47Tags: Post Data:2006-08-04 21:50:24 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a href=’http://SitesTree.com’ target=’new’ rel=”noopener”>http://SitesTree.com</a> 8112223 Canada Inc./JustEtc: <a href=’http://JustEtc.net’ target=’new’ rel=”noopener”>http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a> Shop Online: …
Permanent link to this article: http://bangla.sitestree.com/a-good-resource-for-learning-struts-47/
Struts: Radio Button : Form Bean:JSP #47
Once, I was having some issues with Struts: Radio Button : Form Bean:JSP. The following information helped me. You usually specify the name of the form/form-bean when you declare a form bean in your struts-config.xml file like: You can use a variable to point to this form using: extract specific properties: print them: From: http://sitestree.com/?p=4842 …
Permanent link to this article: http://bangla.sitestree.com/struts-radio-button-form-beanjsp-47/
Struts: Application Development Approaches #47
Struts: Application Development Approaches Use Application Modules: Use multiple configuration files to facilitate parallel development in a team Secure JSP pages Use Dynamic Forms From: http://sitestree.com/?p=4825 Categories:47Tags: Post Data:2008-06-16 17:55:16 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a …
Permanent link to this article: http://bangla.sitestree.com/struts-application-development-approaches-47/
struts lesson 7 advanced struts actions #By Sayed Ahmed
From: http://sitestree.com/?p=2734 Categories:By Sayed AhmedTags: Post Data:2015-11-01 00:27:44 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a href=’http://SitesTree.com’ target=’new’ rel=”noopener”>http://SitesTree.com</a> 8112223 Canada Inc./JustEtc: <a href=’http://JustEtc.net’ target=’new’ rel=”noopener”>http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a> Shop Online: <a href=’https://www.ShopForSoul.com’> https://www.ShopForSoul.com/</a> Medium: <a href=’https://medium.com/@SayedAhmedCanada’ target=’new’ …
Permanent link to this article: http://bangla.sitestree.com/struts-lesson-7-advanced-struts-actions-by-sayed-ahmed/
struts lesson 8 how to use properties file for internationalization and flexible message display #By Sayed Ahmed
From: http://sitestree.com/?p=2738 Categories:By Sayed AhmedTags: Post Data:2015-11-01 06:12:11 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a href=’http://SitesTree.com’ target=’new’ rel=”noopener”>http://SitesTree.com</a> 8112223 Canada Inc./JustEtc: <a href=’http://JustEtc.net’ target=’new’ rel=”noopener”>http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a> Shop Online: <a href=’https://www.ShopForSoul.com’> https://www.ShopForSoul.com/</a> Medium: <a href=’https://medium.com/@SayedAhmedCanada’ target=’new’ …
Permanent link to this article: http://bangla.sitestree.com/struts-lesson-8-how-to-use-properties-file-for-internationalization-and-flexible-message-display-by-sayed-ahmed/
struts2 struts1 eclipse ant #By Sayed Ahmed
From: http://sitestree.com/?p=2740 Categories:By Sayed AhmedTags: Post Data:2015-11-01 12:13:30 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a href=’http://SitesTree.com’ target=’new’ rel=”noopener”>http://SitesTree.com</a> 8112223 Canada Inc./JustEtc: <a href=’http://JustEtc.net’ target=’new’ rel=”noopener”>http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a> Shop Online: <a href=’https://www.ShopForSoul.com’> https://www.ShopForSoul.com/</a> Medium: <a href=’https://medium.com/@SayedAhmedCanada’ target=’new’ …
Permanent link to this article: http://bangla.sitestree.com/struts2-struts1-eclipse-ant-by-sayed-ahmed/
struts2 struts1 eclipse ant 2 #By Sayed Ahmed
From: http://sitestree.com/?p=2742 Categories:By Sayed AhmedTags: Post Data:2015-11-01 18:15:10 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a href=’http://SitesTree.com’ target=’new’ rel=”noopener”>http://SitesTree.com</a> 8112223 Canada Inc./JustEtc: <a href=’http://JustEtc.net’ target=’new’ rel=”noopener”>http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a> Shop Online: <a href=’https://www.ShopForSoul.com’> https://www.ShopForSoul.com/</a> Medium: <a href=’https://medium.com/@SayedAhmedCanada’ target=’new’ …
Permanent link to this article: http://bangla.sitestree.com/struts2-struts1-eclipse-ant-2-by-sayed-ahmed/
Java spring application demo #By Sayed Ahmed
From: http://sitestree.com/?p=2414 Categories:By Sayed AhmedTags:application, Java, spring, demo Post Data:2015-10-09 08:30:54 Shop Online: <a href=’https://www.ShopForSoul.com/’ target=’new’ rel=”noopener”>https://www.ShopForSoul.com/</a> (Big Data, Cloud, Security, Machine Learning): Courses: <a href=’http://Training.SitesTree.com’ target=’new’ rel=”noopener”> http://Training.SitesTree.com</a> In Bengali: <a href=’http://Bangla.SaLearningSchool.com’ target=’new’ rel=”noopener”>http://Bangla.SaLearningSchool.com</a> <a href=’http://SitesTree.com’ target=’new’ rel=”noopener”>http://SitesTree.com</a> 8112223 Canada Inc./JustEtc: <a href=’http://JustEtc.net’ target=’new’ rel=”noopener”>http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a> Shop Online: <a href=’https://www.ShopForSoul.com’> https://www.ShopForSoul.com/</a> Medium: …
Permanent link to this article: http://bangla.sitestree.com/java-spring-application-demo-by-sayed-ahmed/
Spring and iBatis: Some Notes [Will be updated later] #Java Short Notes
Implementing the data access layer of a Spring application using iBATIS. Spring Framework and IBATIS You can use JDBC with Spring for sure. Spring also simplifies the use of JDBC. iBATIS can provide one more step in simplification. Using iBATIS, you can mapdata and Java objects, also make use of simplified database operations. Using iBatis …
Permanent link to this article: http://bangla.sitestree.com/spring-and-ibatis-some-notes-will-be-updated-later-java-short-notes/
Topics to Learn in Java Spring framework #Java Short Notes
Why Spring Framework? What’s wrong with Java EE (EJB) Light-weight vs. heavy-weight containers Motivation for Spring Spring Background Spring Framework Overview Spring features Spring light-weight container architecture Spring application context Inversion of Control (IoC) design pattern Dependency Injection (DI) Advantages of IoC/DI Design for testability Low coupling Code re-use Consistent architecture and configuration Easy-to-follow design …
Permanent link to this article: http://bangla.sitestree.com/topics-to-learn-in-java-spring-framework-java-short-notes/
Java/J2EE:Important Resources: Struts, Spring, Hibernate, JPA #Java Short Notes
Java/J2EE:Important Resources: Struts, Spring, Hibernate, JPA …… …. ….. …. … … … … … … .. ..Struts Struts Developer and User Guides Struts API Struts Tutorials Spring, Hibernate, JPA Spring 2.5 API Spring 2.5 Reference Manual JPA API JSF JSF 1.2 Java API JSF 1.2 Tag Library API JSF 1.1 Java API JSF 1.1 …
Permanent link to this article: http://bangla.sitestree.com/java-j2eeimportant-resources-struts-spring-hibernate-jpa-java-short-notes/
Java Spring: Web-application Development: Video Training: Step by Step #Java Short Notes
Java Spring Step by Step Java Spring: Lesson 0: Pre-requisite for spring based web application development Java Spring: Lesson 1: Basic Application and Environment Setup Java Spring: Lesson 2: Developing and Configuring the Views and the Controller Java Spring: Lesson 3: Developing the Business Logic Java Spring Lesson 4: Part 1 : Developing the Web …
Permanent link to this article: http://bangla.sitestree.com/java-spring-web-application-development-video-training-step-by-step-java-short-notes/
Lesson 7: Advanced Action Handling in Struts #Java Short Notes
Video Tutorial on the topic Java Code From: http://sitestree.com/?p=5045 Categories:Java Short NotesTags: Post Data:2011-04-21 13:19:47 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) Shop Online: https://www.ShopForSoul.com/ Medium: https://medium.com/@SayedAhmedCanada
Permanent link to this article: http://bangla.sitestree.com/lesson-7-advanced-action-handling-in-struts-java-short-notes/
What is Java Spring Framework? #Java Short Notes
According to the Spring Framework Reference Documentation (springframework.org): “…Spring provides a light-weight solution for building enterprise-ready applications, while still supporting the possibility of using declarative transaction management, remote access to your logic using RMI or web services, mailing facilities and various options in persisting your data to a database. Spring provides an MVC framework, transparent …
Permanent link to this article: http://bangla.sitestree.com/what-is-java-spring-framework-java-short-notes/
Struts 2 vs. Struts 1 #Java Short Notes
Please check the following resources: Struts 2: Configuration Elements Struts 1 vs Struts 2 Migrating from Struts 1 to Struts 2 Comparing Struts 1 and 2 From: http://sitestree.com/?p=4987 Categories:Java Short NotesTags: Post Data:2008-11-22 05:09:37 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) …
Permanent link to this article: http://bangla.sitestree.com/struts-2-vs-struts-1-java-short-notes/
Step By Step Video Tutorial: Struts-based Java Web Application Development #Java Short Notes
Please follow the link to see a list of training videos on Struts. And watch them. Step By Step Video Tutorial: Struts-based Java Web Application Development From: http://sitestree.com/?p=4986 Categories:Java Short NotesTags: Post Data:2010-06-21 20:35:21 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) …
Permanent link to this article: http://bangla.sitestree.com/step-by-step-video-tutorial-struts-based-java-web-application-development-java-short-notes/
Creating Java Development Environment with Struts for Your Home PC #Java Short Notes
Creating Java Development Environment with Struts for Your Home PC…………………….. Why Struts? Just take a look at the web-sites using Struts J2EE does not meet all the requirements for web-applications. Struts addresses these requirements. Check this article for details Components Required J2SE 5/6 or J2EE 5 – both JRE and JDK Tomcat 5.5/6 – web-server …
Permanent link to this article: http://bangla.sitestree.com/creating-java-development-environment-with-struts-for-your-home-pc-java-short-notes/
Java: Struts: Lesson 5: Processing Requests with Action Objects #Java Short Notes
Corresponding Video TutorialCode Example for this article What happens? When a form is submitted? Flow: Refer to a x.do from form action Check struts-config.xml for action named ‘x’ Check the corresponding type (class) of the action, execute the execute method of that action type (really a class where execute is the class method) The method …
Permanent link to this article: http://bangla.sitestree.com/java-struts-lesson-5-processing-requests-with-action-objects-java-short-notes/
A simple EJB 3.0 application: Explanation of EJB 3.0 technology: EJB => Spring Framework #Java Short Notes
A simple EJB 3.0 application: Explanation of EJB 3.0 technology: EJB => Spring Framework ……. …. … A simple EJB 3.0 application: Explanation of EJB 3.0 technology: EJB => Spring Framework From: http://sitestree.com/?p=4933 Categories:Java Short NotesTags: Post Data:2008-05-07 18:54:31 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 …
Permanent link to this article: http://bangla.sitestree.com/a-simple-ejb-3-0-application-explanation-of-ejb-3-0-technology-ejb-spring-framework-java-short-notes/
Writing your first Spring application #Java Short Notes
Requirements: JDK 1.4.2 (or above), Tomcat 5.0+, Ant 1.6.1+ Also, you can use cygwin in windows to emulate linux like commands set JAVA_HOME, ANT_HOME, CATALINA_HOME environment variables – paths to the installed software Add to PATH: JAVA_HOME/bin, ANT_HOME/bin, CATALINA_HOME/bin You can start with the minimal application like struts-blanke.war or webapp-minimal that contains the basic files …
Permanent link to this article: http://bangla.sitestree.com/writing-your-first-spring-application-java-short-notes/
Your First Spring+Hibernate Application in IntelliJ #Java Short Notes
First Spring+Hibernate Application in IntelliJ From: http://sitestree.com/?p=4926 Categories:Java Short NotesTags: Post Data:2006-08-17 07:59:04 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) Shop Online: https://www.ShopForSoul.com/ Medium: https://medium.com/@SayedAhmedCanada
Permanent link to this article: http://bangla.sitestree.com/your-first-springhibernate-application-in-intellij-java-short-notes/
Java Spring Topics: What spring framework brings to the table #Java Short Notes
Java Spring TopicsKnowing the buzzwords does not make anyone a good developer. However, it helps. Being expert in a technology like Spring in one day is not possible, but initially getting familiar with all the aspects is helpful as you will know which Spring feature is required to solve the current problem/situation. Then you can …
Permanent link to this article: http://bangla.sitestree.com/java-spring-topics-what-spring-framework-brings-to-the-table-java-short-notes/
Introduction to Spring #Java Short Notes
Open-sourced on February, 2003 Layered J2EE application framework Inversion of Control (IoC): A Data Access Object (DAO) depends on a DataSource. Allows: code to interfaces Spring has classes to support Hibernate, Struts, and other frameworks According to many Java developers [ref:internet], J2EE patterns are sometimes cumbersome. Spring uses patterns but made everything simpler ServiceLocator -> …
Permanent link to this article: http://bangla.sitestree.com/introduction-to-spring-java-short-notes/
Spring Applications: Examples #Java Short Notes
equinox-jsf-ch11-completed.tar.gz equinox-jsf-ch11-completed.zip equinox-jsf-ch11.tar.gz equinox-jsf-ch11.zip equinox-tapestry-ch11-completed.tar.gz equinox-tapestry-ch11-completed.zip equinox-tapestry-ch11.tar.gz equinox-tapestry-ch11.zip equinox-webwork-ch11-completed.tar.gz equinox-webwork-ch11-completed.zip equinox-webwork-ch11.tar.gz equinox-webwork-ch11.zip myusers-after-ch6.tar.gz myusers-after-ch6.zip myusers-ch10-completed.tar.gz myusers-ch10-completed.zip myusers-ch10.tar.gz myusers-ch10.zip myusers-ch2-completed.tar.gz myusers-ch2-completed.zip myusers-ch2.tar.gz myusers-ch2.zip myusers-ch4-completed.tar.gz myusers-ch4-completed.zip myusers-ch4.tar.gz myusers-ch4.zip myusers-ch5-completed.tar.gz myusers-ch5-completed.zip myusers-ch5.tar.gz myusers-ch5.zip myusers-ch6-completed.tar.gz myusers-ch6-completed.zip myusers-ch6.5-completed.tar.gz myusers-ch6.5-completed.zip myusers-ch6.5.tar.gz myusers-ch6.5.zip myusers-ch6.tar.gz myusers-ch6.zip myusers-ch7-completed.tar.gz myusers-ch7-completed.zip myusers-ch7.tar.gz myusers-ch7.zip myusers-ch8-completed.tar.gz myusers-ch8-completed.zip myusers-ch8.tar.gz myusers-ch8.zip myusers-ch9-completed.tar.gz myusers-ch9-completed.zip myusers-ch9.tar.gz myusers-ch9.zip From: http://sitestree.com/?p=4913 Categories:Java Short NotesTags: …
Permanent link to this article: http://bangla.sitestree.com/spring-applications-examples-java-short-notes/
Spring Resources #Java Short Notes
Spring Resources ……… …… . …. . . . . . .. . . . . . . . . . . . . . .. . . . . . . . . .. Step by step Spring Spring Tutorial: Just OK Spring Tutorial Spring Tutorial From: http://sitestree.com/?p=4914 Categories:Java Short NotesTags: Post Data:2009-04-21 06:03:06 …
Permanent link to this article: http://bangla.sitestree.com/spring-resources-java-short-notes/
What is Spring Framework? What does it mean to J2EE developers #Java Short Notes
What is Spring Framework? What does it mean to J2EE developers? Spring is a light-weight framework, very often referred as an alternative/competitor to EJB, for the development of enterprise-type applications. Spring provides many features such as declarative transaction management, access to remote logic using RMI or web services, mailing facilities and database abstraction. Features of …
Permanent link to this article: http://bangla.sitestree.com/what-is-spring-framework-what-does-it-mean-to-j2ee-developers-java-short-notes/
MVC : Struts : Java : Industry Web Application #Java Short Notes
Industries use frameworks for application development quite often. For example: Java concepts like JSP, Servlet, Swing, Bean, JDBC can be used directly to create web-applications but when such applications become big, it becomes difficult to maintain and develop them further. Hence, frameworks like struts are used to develop large web-based Java applications. This makes maintenance …
Permanent link to this article: http://bangla.sitestree.com/mvc-struts-java-industry-web-application-java-short-notes/
Lesson 1: Java Spring Step by Step #Java Short Notes #Java Spring
Lesson 1: Java Spring Step by Step …. …. … … … … … … … … …. …. …. …. …. …. Video Tutorial by JustEtc: Lesson 1: Java Spring Step by Step The code of the examples as demonstrated in the video. This code is also taken from SpringFramework tutorial by Thomas Risberg, …
Permanent link to this article: http://bangla.sitestree.com/lesson-1-java-spring-step-by-step-java-short-notes-java-spring/
Java Spring: Components for Web #Java #Spring #Spring Framework and Hibernate #Spring #Spring Framework and Hibernate
Java Spring: Components for Web Web: Full-stack web development with Tomcat and Spring MVC Reactive Web: Reactive web development with Netty and Spring WebFlux: requires Spring Boot >=2.0.0.M1 Websocket: Websocket development with SockJS and STOMP Web Services: Contract-first SOAP service development with Spring Web Services Jersey (JAX-RS): RESTful Web Services framework with support of JAX-RS …
Permanent link to this article: http://bangla.sitestree.com/java-spring-components-for-web-java-spring-spring-framework-and-hibernate-spring-spring-framework-and-hibernate/
Java Spring: Use Cases #Java #Java Frameworks #Spring #Spring Framework and Hibernate
Reference: https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/overview.html Typical full-fledged Spring web application Spring middle-tier using a third-party web framework Remoting usage scenario EJBs – Wrapping existing POJOs From: http://sitestree.com/?p=10900 Categories:Java, Java Frameworks, Spring, Spring Framework and HibernateTags: Post Data:2017-07-28 20:42:31 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In …
Permanent link to this article: http://bangla.sitestree.com/java-spring-use-cases-java-java-frameworks-spring-spring-framework-and-hibernate/
Placement of buttons in a BoxLayout using rigid areas, struts, and glue #Programming Code Examples #Java/J2EE/J2ME #Layout Managers
############### InvisibleComponentTest.java Placement of buttons in a BoxLayout using rigid areas, struts, and glue ############### import java.awt.*; import javax.swing.*; import javax.swing.border.*; /** Example of using rigid areas, struts, and glue to * produce the effect of invisible components. * ****************** public class InvisibleComponentTest extends JPanel { Component spacer; public InvisibleComponentTest() { setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); // …
Permanent link to this article: http://bangla.sitestree.com/placement-of-buttons-in-a-boxlayout-using-rigid-areas-struts-and-glue-programming-code-examples-java-j2ee-j2me-layout-managers/
Java Spring and I/O #Root
Java Spring and I/O Batch: Spring Batch including HSQLDB database Integration: Common spring-integration modules Quartz Scheduler: Schedule jobs using Quartz: requires Spring Boot >=2.0.0.M2 Activiti: Activiti BPMN workflow engine Apache Camel: Integration using Apache Camel JMS (ActiveMQ): Java Message Service API via Apache ActiveMQ JMS (Artemis): Java Message Service API via Apache Artemis JMS (HornetQ): …
Permanent link to this article: http://bangla.sitestree.com/java-spring-and-i-o-root/
Java Spring and Social #Root
Java Spring and Social Social Facebook: spring-social-facebook LinkedIn: spring-social-linkedin Twitter: spring-social-twitter From: http://sitestree.com/?p=10922 Categories:RootTags: Post Data:2017-07-28 22:30:46 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) Shop Online: https://www.ShopForSoul.com/ Medium: https://medium.com/@SayedAhmedCanada
Permanent link to this article: http://bangla.sitestree.com/java-spring-and-social-root/
Java Spring and AWS Cloud #Root
Java Spring and AWS Cloud AWS Core: AWS native services from spring-cloud-aws AWS JDBC: Relational databases on AWS with RDS and spring-cloud-aws-jdbc AWS Messaging: Messaging on AWS with SQS and spring-cloud-aws-messaging From: http://sitestree.com/?p=10924 Categories:RootTags: Post Data:2017-07-28 23:45:04 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada …
Permanent link to this article: http://bangla.sitestree.com/java-spring-and-aws-cloud-root/
Java Spring: Template Engine #Root
Java Spring: Template Engines Freemarker: FreeMarker templating engine Velocity: Velocity templating engine: requires Spring Boot >=1.1.6.RELEASE and <1.4.0.M2 Groovy Templates: Groovy templating engine Thymeleaf: Thymeleaf templating engine, including integration with Spring Mustache: Mustache templating engine From: http://sitestree.com/?p=10912 Categories:RootTags: Post Data:2017-07-28 21:53:16 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com …
Permanent link to this article: http://bangla.sitestree.com/java-spring-template-engine-root/
Java Spring: Components to Deal with Database (SQL Aspect) #Root
Java Spring: Components to Deal with Database (SQL Aspect) JPA: Java Persistence API including spring-data-jpa, spring-orm and Hibernate JOOQ: Persistence support using Java Object Oriented Querying MyBatis: Persistence support using MyBatis JDBC: JDBC databases H2: H2 database (with embedded support) HSQLDB: HSQLDB database (with embedded support) Apache Derby: Apache Derby database (with embedded support) MySQL: …
Permanent link to this article: http://bangla.sitestree.com/java-spring-components-to-deal-with-database-sql-aspect-root/
struts leson 5 action object process request #Root
From: http://sitestree.com/?p=2824 Categories:RootTags: Post Data:2015-10-26 07:34:22 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) Shop Online: https://www.ShopForSoul.com/ Medium: https://medium.com/@SayedAhmedCanada
Permanent link to this article: http://bangla.sitestree.com/struts-leson-5-action-object-process-request-root/
struts leson 6 handling request parameters with form beans #Root
From: http://sitestree.com/?p=2826 Categories:RootTags: Post Data:2015-10-26 07:35:52 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) Shop Online: https://www.ShopForSoul.com/ Medium: https://medium.com/@SayedAhmedCanada
Permanent link to this article: http://bangla.sitestree.com/struts-leson-6-handling-request-parameters-with-form-beans-root/
step by step spring inventory management #Spring #Spring Framework and Hibernate #Spring #Spring Framework and Hibernate
From: http://sitestree.com/?p=2746 Categories:Spring, Spring Framework and Hibernate, Spring, Spring Framework and HibernateTags:spring, inventory management Post Data:2015-11-01 18:17:34 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In Bengali: http://Bangla.SaLearningSchool.com http://SitesTree.com 8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) Shop Online: https://www.ShopForSoul.com/ Medium: https://medium.com/@SayedAhmedCanada
Permanent link to this article: http://bangla.sitestree.com/step-by-step-spring-inventory-management-spring-spring-framework-and-hibernate-spring-spring-framework-and-hibernate/
Print three-dimensional valarray line-by-line
/* The following code example is taken from the book * “The C++ Standard Library – A Tutorial and Reference” * by Nicolai M. Josuttis, Addison-Wesley, 1999 * * (C) Copyright Nicolai M. Josuttis 1999. * Permission to copy, use, modify, sell and distribute this software * is granted provided this copyright notice appears in …
Permanent link to this article: http://bangla.sitestree.com/print-three-dimensional-valarray-line-by-line/
Example demonstrating the use of packages
&&&&&&&&&&&&&&&&&&& Example demonstrating the use of packages. * Class1.java defined in package1. * Class2.java defined in package2. * Class3.java defined in package2.package3. * Class1.java defined in package4. * PackageExample.java Driver for package example &&&&&&&&&&&&&&&&&&&&& ~~~~~~~~~~~~~~~~~~~~~ Class1.java defined in package1. ~~~~~~~~~~~~~~~~~~~~~ package package1; ***************** public class Class1 { public …
Permanent link to this article: http://bangla.sitestree.com/example-demonstrating-the-use-of-packages/
Code examples for interfaces
**************************** Code examples for interfaces: * Class1.java implements Interface1.java * Abstract Class2.java implements Interface1.java and Interface2.java * Class3.java extends abstract class Class2.java * Interface3.java extends Interface1.java and Interface2.java *************************** ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Class1.java ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // This class is not abstract, so it must provide // implementations of method1 and method2. public class Class1 …
Permanent link to this article: http://bangla.sitestree.com/code-examples-for-interfaces/
A Ship class illustrating object-oriented programming concepts
************************ Ship.java A Ship class illustrating object-oriented programming concepts. Incorporates Javadoc comments. See ShipTest.java for a test. ************************ /** Ship example to demonstrate OOP in Java. * * @author * Larry Brown * @version 2.0 */ public class Ship { // Instance variables private double x=0.0, y=0.0, speed=1.0, direction=0.0; private String name; …
Permanent link to this article: http://bangla.sitestree.com/a-ship-class-illustrating-object-oriented-programming-concepts/
Accesses instance variables in a Ship object.
Test1.java Accesses instance variables in a Ship object. ******************************************************** // Create a class with five instance variables (fields): // x, y, speed, direction, and name. Note that Ship1 is // not declared “public”, so it can be in the same file as // Test1. A Java file can only contain one “public” class // definition. …
Permanent link to this article: http://bangla.sitestree.com/accesses-instance-variables-in-a-ship-object/
Application that reports all command-line arguments
****************** ShowArgs.java Application that reports all command-line arguments. ****************** */ public class ShowArgs { public static void main(String[] args) { for(int i=0; i
Permanent link to this article: http://bangla.sitestree.com/application-that-reports-all-command-line-arguments/
DropBall.java Uses a while loop to determine how long it takes a ball to fall from the top of the Washington Monument to the ground
DropBall.java Uses a while loop to determine how long it takes a ball to fall from the top of the Washington Monument to the ground ************************************************************ /** Simulating dropping a ball from the top of the Washington * Monument. The program outputs the height of the ball each * second until the ball hits the …
Permanent link to this article: http://bangla.sitestree.com/dropball-java-uses-a-while-loop-to-determine-how-long-it-takes-a-ball-to-fall-from-the-top-of-the-washington-monument-to-the-ground-2/
NumFormat.java Formats real numbers with DecimalFormat.
import java.text.*; /** Formatting real numbers with DecimalFormat. * * Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class NumFormat { public static void main (String[] args) { DecimalFormat …
Permanent link to this article: http://bangla.sitestree.com/numformat-java-formats-real-numbers-with-decimalformat/
ModificationTest.java Demonstrates changing fields of an object. Inherits from ReferenceTest.java.
/** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ import java.awt.Point; public class ModificationTest extends ReferenceTest { public static void main(String[] args) { Point p1 = new Point(1, 2); // …
Permanent link to this article: http://bangla.sitestree.com/modificationtest-java-demonstrates-changing-fields-of-an-object-inherits-from-referencetest-java/
Tests the class type of an object using the isInstance method (preferred over instanceof operator).
/** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ interface Barking {} class Mammal {} class Canine extends Mammal {} class Dog extends Canine implements Barking {} class Retriever extends Dog {} …
Permanent link to this article: http://bangla.sitestree.com/tests-the-class-type-of-an-object-using-the-isinstance-method-preferred-over-instanceof-operator/
URLTest.java Demonstrates try/catch blocks.
/** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ // Further simplified getURL method. public URL getURL() { if (url != null) { return(url); } …
Permanent link to this article: http://bangla.sitestree.com/urltest-java-demonstrates-trycatch-blocks/
ExecTest.java illustrates use of the Exec class.
/** A test of the Exec class. * * Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class ExecTest { public static void main(String[] args) { // Note: no …
Permanent link to this article: http://bangla.sitestree.com/exectest-java-illustrates-use-of-the-exec-class/
DropBall.java Uses a while loop to determine how long it takes a ball to fall from the top of the Washington Monument to the ground.
/** Simulating dropping a ball from the top of the Washington * Monument. The program outputs the height of the ball each * second until the ball hits the ground. * * Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; …
Permanent link to this article: http://bangla.sitestree.com/dropball-java-uses-a-while-loop-to-determine-how-long-it-takes-a-ball-to-fall-from-the-top-of-the-washington-monument-to-the-ground/
Loading Images
JavaMan1.java Applet that loads an image from a relative URL. ************************************************************* import java.applet.Applet; import java.awt.*; /** An applet that loads an image from a relative URL. * >>>>>>>>>>>>>>>>>>> public class JavaMan1 extends Applet { private Image javaMan; public void init() { javaMan = getImage(getCodeBase(),”images/Java-Man.gif”); } public void paint(Graphics g) { …
Permanent link to this article: http://bangla.sitestree.com/loading-images/
Basic template for a Java applet
AppletTemplate.java >>>>>>>>>>>>>>>>>>>> import java.applet.Applet; import java.awt.*; ******************** public class AppletTemplate extends Applet { // Variable declarations. public void init() { // Variable initializations, image loading, etc. } public void paint(Graphics g) { // Drawing operations. } } >>>>>>>>>>>>>>>>>>>>>
Permanent link to this article: http://bangla.sitestree.com/basic-template-for-a-java-applet/
ForwardSnippet.java Partial servlet illustrating how to use a RequestDispatcher to forward requests
ForwardSnippet.java Partial servlet illustrating how to use a RequestDispatcher to forward requests public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String operation = request.getParameter(“operation”); if (operation == null) { operation = “unknown”; } if (operation.equals(“operation1”)) { gotoPage(“/operations/presentation1.jsp”, request, response); } else if (operation.equals(“operation2”)) …
Permanent link to this article: http://bangla.sitestree.com/forwardsnippet-java-partial-servlet-illustrating-how-to-use-a-requestdispatcher-to-forward-requests/
Example illustrating inheritance and abstract classes
*********************************** # Example illustrating inheritance and abstract classes. * Shape.java The parent class (abstract) for all closed, open, curved, and straight-edged shapes. * Curve.java An (abstract) curved Shape (open or closed). * StraightEdgedShape.java A Shape with straight edges (open or closed). * Measurable.java Interface defining classes with measurable areas. * …
Permanent link to this article: http://bangla.sitestree.com/example-illustrating-inheritance-and-abstract-classes-2/
Speedboat.java Illustrates inheritance from Ship class
***************************** Speedboat.java Illustrates inheritance from Ship class. See SpeedboatTest.java for a test. ***************************** /** A fast Ship. Red and going 20 knots by default. * *********************** public class Speedboat extends Ship { private String color = “red”; /** Builds a red Speedboat going N at 20 knots. */ public Speedboat(String name) …
Permanent link to this article: http://bangla.sitestree.com/speedboat-java-illustrates-inheritance-from-ship-class/
Demonstrates overloading methods in class Ship4
********************* class Ship4 { public double x=0.0, y=0.0, speed=1.0, direction=0.0; public String name; // This constructor takes the parameters explicitly. public Ship4(double x, double y, double speed, double direction, String name) { this.x = x; this.y = y; this.speed = speed; this.direction = direction; …
Permanent link to this article: http://bangla.sitestree.com/demonstrates-overloading-methods-in-class-ship4/
HelloWWW.java Basic Hello World (Wide Web) Applet
********************* import java.applet.Applet; import java.awt.*; ********************* public class HelloWWW extends Applet { private int fontSize = 40; public void init() { setBackground(Color.black); setForeground(Color.white); setFont(new Font(“SansSerif”, Font.BOLD, fontSize)); } public void paint(Graphics g) { g.drawString(“Hello, World Wide Web.”, 5, fontSize+5); } } <<<<<<<<<<<<<<<<<<<<<
Permanent link to this article: http://bangla.sitestree.com/hellowww-java-basic-hello-world-wide-web-applet/
Basic Hello World application
******************* HelloWorld.java Basic Hello World application. ******************* */ public class HelloWorld { public static void main(String[] args) { System.out.println(“Hello, world.”); } } /*
Permanent link to this article: http://bangla.sitestree.com/basic-hello-world-application/
StringTest.java Demonstrates various methods of the String class.
/** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class StringTest { public static void main (String[] args) { String str = “”; if (args.length > 0) …
Permanent link to this article: http://bangla.sitestree.com/stringtest-java-demonstrates-various-methods-of-the-string-class/
NegativeLengthException.java Illustrates defining and throwing your own exceptions.
import java.io.*; /** Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class NegativeLengthException extends Exception { /** Test NegativeLengthException */ public static void main(String[] args) { try { …
Permanent link to this article: http://bangla.sitestree.com/negativelengthexception-java-illustrates-defining-and-throwing-your-own-exceptions/
TreeTest.java Builds a binary tree and prints the contents of the nodes. Uses the following classes:
Treetest.java /** A NodeOperator that prints each node. * * Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ class PrintOperator implements NodeOperator { public void operateOn(Node node) { System.out.println(node.getNodeValue()); …
Permanent link to this article: http://bangla.sitestree.com/treetest-java-builds-a-binary-tree-and-prints-the-contents-of-the-nodes-uses-the-following-classes/
Illustrates the use of arrays
/** Report on a round of golf at St. Andy?s. * * Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class Golf { public static void main(String[] args) { …
Permanent link to this article: http://bangla.sitestree.com/illustrates-the-use-of-arrays/
Factorial.java Computes an exact factorial, n!, using a BigInteger
import java.math.BigInteger; /** Computes an exact factorial, using a BigInteger. * * Taken from Core Web Programming from * Prentice Hall and Sun Microsystems Press, * . * © 2001 Marty Hall and Larry Brown; * may be freely used or adapted. */ public class Factorial { public static void main(String[] args) { …
Permanent link to this article: http://bangla.sitestree.com/factorial-java-computes-an-exact-factorial-n-using-a-biginteger/
Exec.java Provides static methods for running external processes from applications.
import java.io.*; /** A class that eases the pain of running external processes * from applications. Lets you run a program three ways: * * exec: Execute the command, returning * immediately even if the command is still running. * This would be appropriate for printing a file. …
Permanent link to this article: http://bangla.sitestree.com/exec-java-provides-static-methods-for-running-external-processes-from-applications/
Controlling Image Loading
~~~~~~~~~~~~~~~~~~~ ImageBox.java A class that incorrectly tries to load an image and draw an outline around it. The problem is that the size of the image is requested before the image is completely loaded, thus, returning a width and height of -1. ~~~~~~~~~~~~~~~~~~~ import java.applet.Applet; import java.awt.*; /** A class that incorrectly tries to load …
Permanent link to this article: http://bangla.sitestree.com/controlling-image-loading/
HelloWWW2.java Illustrates the ability of an applet to read parameters contained in the HTML document
HelloWWW2.java Illustrates the ability of an applet to read parameters contained in the HTML document (PARAM element containing a NAME-VALUE pair). &&&&&&&&&&&&&&&&&&&&&&&&&&&&&& import java.applet.Applet; import java.awt.*; ************************* public class HelloWWW2 extends Applet { public void init() { setFont(new Font(“SansSerif”, Font.BOLD, 30)); Color background = Color.gray; Color foreground = Color.darkGray; String …
Permanent link to this article: http://bangla.sitestree.com/hellowww2-java-illustrates-the-ability-of-an-applet-to-read-parameters-contained-in-the-html-document/
An example Travel Site
quick-search.html Front end to travel site <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Front end to travel servlet. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <TITLE>Online Travel Quick Search</TITLE> <LINK REL=STYLESHEET HREF=”travel-styles.css” …
Permanent link to this article: http://bangla.sitestree.com/an-example-travel-site/
IfExample.jsp Page that uses the custom nested tags
IfExample.jsp Page that uses the custom nested tags <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Illustration of IfTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <TITLE>If Tag Example</TITLE> <LINK REL=STYLESHEET HREF=”JSP-Styles.css” TYPE=”text/css”> </HEAD> …
Permanent link to this article: http://bangla.sitestree.com/ifexample-jsp-page-that-uses-the-custom-nested-tags/
Statics.java Demonstrates static and non-static methods.
*/ public class Statics { public static void main(String[] args) { staticMethod(); Statics s1 = new Statics(); s1.regularMethod(); } public static void staticMethod() { System.out.println(“This is a static method.”); } public void regularMethod() { System.out.println(“This is a regular method.”); } }
Permanent link to this article: http://bangla.sitestree.com/statics-java-demonstrates-static-and-non-static-methods/
Batton’s java
import java.applet.Applet; import java.awt.*; /././././././ public class Buttons extends Applet { private Button button1, button2, button3; public void init() { button1 = new Button(“Button One”); button2 = new Button(“Button Two”); button3 = new Button(“Button Three”); add(button1); add(button2); add(button3); } } /././././././././.
Permanent link to this article: http://bangla.sitestree.com/battons-java/
IfTag.java, IfConditionTag.java, IfThenTag.java, and IfElseTag.java, Custom tags that make use of tag nesting
IfTag.java, IfConditionTag.java, IfThenTag.java, and IfElseTag.java, Custom tags that make use of tag nesting IfTag.java package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import javax.servlet.*; /** A tag that acts like an if/then/else. * <P> * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, * . * May …
Permanent link to this article: http://bangla.sitestree.com/iftag-java-ifconditiontag-java-ifthentag-java-and-ifelsetag-java-custom-tags-that-make-use-of-tag-nesting/
FilterExample.jsp Page that uses the FilterTag custom tag
FilterExample.jsp Page that uses the FilterTag custom tag <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Illustration of FilterTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <TITLE>HTML Logical Character Styles</TITLE> <LINK REL=STYLESHEET HREF=”JSP-Styles.css” TYPE=”text/css”> …
Permanent link to this article: http://bangla.sitestree.com/filterexample-jsp-page-that-uses-the-filtertag-custom-tag/
Demonstrates using a TexturePaint to fill an shape with a tiled image
^^^^^^^^^^^^^^^^^ TiledImages.java Demonstrates using a TexturePaint to fill an shape with a tiled image. Uses the following class and images: * ImageUtilities.java Simplifies creating a BufferedImage from an image file. ~~~~~~~~~~~~~~~~~~ import javax.swing.*; import java.awt.*; import java.awt.geom.*; import java.awt.image.*; /** An example of using TexturePaint to fill objects with tiled * images. Uses the …
Permanent link to this article: http://bangla.sitestree.com/demonstrates-using-a-texturepaint-to-fill-an-shape-with-a-tiled-image/
Draws a filled ellipse
import javax.swing.*; // For JPanel, etc. import java.awt.*; // For Graphics, etc. import java.awt.geom.*; // For Ellipse2D, etc. /** An example of drawing/filling shapes with Java 2D in * Java 1.2 and later. * ************************** public class ShapeExample extends JPanel { private Ellipse2D.Double circle = new Ellipse2D.Double(10, 10, 350, 350); private Rectangle2D.Double …
Permanent link to this article: http://bangla.sitestree.com/draws-a-filled-ellipse/
JavaTextField.java
import java.applet.Applet; import java.awt.*; /** Lets the user enter the name of any * good programming language. Or does it? * ********************* public class JavaTextField extends Applet { public void init() { setFont(new Font(“Serif”, Font.BOLD, 14)); setLayout(new GridLayout(2, 1)); add(new Label(“Enter a Good Programming Language”, Label.CENTER)); LanguageField langField …
Permanent link to this article: http://bangla.sitestree.com/javatextfield-java/
Applet that uses processXxx methods to print detailed reports on mouse events. Illustrates low-level alternative to handling events with listeners.
import java.applet.Applet; import java.awt.*; import java.awt.event.*; /** Prints non-detailed reports of mouse events. * Uses the low-level processXxxEvent methods instead * of the usual event listeners. * ***************** public class MouseReporter extends Applet { public void init() { setBackground(Color.blue); // So you can see applet in page enableEvents(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); …
Permanent link to this article: http://bangla.sitestree.com/applet-that-uses-processxxx-methods-to-print-detailed-reports-on-mouse-events-illustrates-low-level-alternative-to-handling-events-with-listeners/
HeadingExample.jsp Page that uses the HeadingTag custom tag
HeadingExample.jsp Page that uses the HeadingTag custom tag <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Illustration of HeadingTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <TITLE>Some Tag-Generated Headings</TITLE> </HEAD> <BODY> <%@ taglib uri=”cwp-taglib.tld” prefix=”cwp” %> …
Permanent link to this article: http://bangla.sitestree.com/headingexample-jsp-page-that-uses-the-headingtag-custom-tag/
PrimeExample.jsp Page that uses the PrimeTag custom tag
PrimeExample.jsp Page that uses the PrimeTag custom tag <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Illustration of PrimeTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <TITLE>Some N-Digit Primes</TITLE> <LINK REL=STYLESHEET HREF=”JSP-Styles.css” TYPE=”text/css”> </HEAD> …
Permanent link to this article: http://bangla.sitestree.com/primeexample-jsp-page-that-uses-the-primetag-custom-tag/
SimplePrimeExample.jsp Page that uses the SimplePrimeTag custom tag
SimplePrimeExample.jsp Page that uses the SimplePrimeTag custom tag <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Illustration of SimplePrimeTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <TITLE>Some 50-Digit Primes</TITLE> <LINK REL=STYLESHEET HREF=”JSP-Styles.css” TYPE=”text/css”> </HEAD> …
Permanent link to this article: http://bangla.sitestree.com/simpleprimeexample-jsp-page-that-uses-the-simpleprimetag-custom-tag/
SimpleExample.jsp Page that uses the ExampleTag custom tag.
SimpleExample.jsp Page that uses the ExampleTag custom tag. <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Illustration of very simple JSP custom tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <%@ taglib uri=”cwp-taglib.tld” prefix=”cwp” %> <TITLE><cwp:example /></TITLE> …
Permanent link to this article: http://bangla.sitestree.com/simpleexample-jsp-page-that-uses-the-exampletag-custom-tag/
ExampleTag.java Very simple custom tag. Remember to install it in the WEB-INF/classes/cwp/tags directory.
ExampleTag.java Very simple custom tag. Remember to install it in the WEB-INF/classes/cwp/tags directory. package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; /** Very simple JSP tag that just inserts a string * (“Custom tag example…”) into the output. * The actual name of the tag is not defined here; * that is given by the …
Permanent link to this article: http://bangla.sitestree.com/exampletag-java-very-simple-custom-tag-remember-to-install-it-in-the-web-infclassescwptags-directory/
AccessCountBean.java Bean used to illustrate the difference between running jsp:setProperty for every request vs. only when the object is created
AccessCountBean.java Bean used to illustrate the difference between running jsp:setProperty for every request vs. only when the object is created package cwp; /** Simple bean to illustrate sharing beans through * use of the scope attribute of jsp:useBean. * <P> * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun …
Permanent link to this article: http://bangla.sitestree.com/accesscountbean-java-bean-used-to-illustrate-the-difference-between-running-jspsetproperty-for-every-request-vs-only-when-the-object-is-created/
SaleEntry2.jsp Page that uses the SaleEntry bean, using the param attribute to read request parameters and assign them to bean properties
SaleEntry2.jsp Page that uses the SaleEntry bean, using the param attribute to read request parameters and assign them to bean properties <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Example of using jsp:setProperty and an explicity association with an input parameter. See SaleEntry1.jsp and SaleEntry3.jsp for alternatives. Taken from Core Web Programming Java …
Permanent link to this article: http://bangla.sitestree.com/saleentry2-jsp-page-that-uses-the-saleentry-bean-using-the-param-attribute-to-read-request-parameters-and-assign-them-to-bean-properties/
SaleEntry.java Bean used to demonstrate the various approaches to reading request parameters and stuffing them into Java objects.
package cwp; /** Simple bean to illustrate the various forms * of jsp:setProperty. * <P> * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, * . * May be freely used or adapted. */ public class SaleEntry { private String itemID = “unknown”; private double …
Permanent link to this article: http://bangla.sitestree.com/saleentry-java-bean-used-to-demonstrate-the-various-approaches-to-reading-request-parameters-and-stuffing-them-into-java-objects/
The class that actually gets the strings over the network by means of an ObjectInputStream via HTTP tunneling.
import java.net.*; import java.io.*; /** When this class is built, it returns a value * immediately, but this value returns false for isDone * and null for getQueries. Meanwhile, it starts a Thread * to request an array of query strings from the server, * reading them in one fell swoop by means of an …
Permanent link to this article: http://bangla.sitestree.com/the-class-that-actually-gets-the-strings-over-the-network-by-means-of-an-objectinputstream-via-http-tunneling/
A class the encapsulates the URLs used by various search engines.
SearchSpec.java ******************* /** Small class that encapsulates how to construct a * search string for a particular search engine. * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun Microsystems Press, * May be freely used or adapted. */ public class SearchSpec { private String name, baseURL, numResultsSuffix; …
Permanent link to this article: http://bangla.sitestree.com/a-class-the-encapsulates-the-urls-used-by-various-search-engines/
DebugExample.jsp Page that uses the DebugTag custom tag
# DebugExample.jsp Page that uses the DebugTag custom tag <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <!– Illustration of SimplePrimeTag tag. Taken from Core Web Programming Java 2 Edition from Prentice Hall and Sun Microsystems Press, . May be freely used or adapted. –> <HTML> <HEAD> <TITLE>Using the Debug Tag</TITLE> <LINK REL=STYLESHEET HREF=”JSP-Styles.css” …
Permanent link to this article: http://bangla.sitestree.com/debugexample-jsp-page-that-uses-the-debugtag-custom-tag/
ShearExample.java. Illustrates the effect of applying a shear transformation prior to drawing a square
import javax.swing.*; import java.awt.*; import java.awt.geom.*; /** An example of shear transformations on a rectangle. * *********************** public class ShearExample extends JPanel { private static int gap=10, width=100; private Rectangle rect = new Rectangle(gap, gap, 100, 100); public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D)g; for (int …
Permanent link to this article: http://bangla.sitestree.com/shearexample-java-illustrates-the-effect-of-applying-a-shear-transformation-prior-to-drawing-a-square/
LineStyles.java Provides examples of the available styles for joining line segments
import javax.swing.*; import java.awt.*; import java.awt.geom.*; /** A demonstration of different controls when joining two line * segments. The style of the line end point is controlled * through the capStyle parameter. * ************************************ public class LineStyles extends JPanel { private GeneralPath path; private static int x = 30, deltaX = 150, y …
Permanent link to this article: http://bangla.sitestree.com/linestyles-java-provides-examples-of-the-available-styles-for-joining-line-segments/
Illustrates using a local font (Goudy Handtooled BT) to perform drawing in Java 2D
import java.awt.*; /** An example of using local fonts to perform drawing in * Java 2D. * ********************** public class FontExample extends GradientPaintExample { public FontExample() { GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); env.getAvailableFontFamilyNames(); setFont(new Font(“Goudy Handtooled BT”, Font.PLAIN, 100)); } protected void drawBigString(Graphics2D g2d) { g2d.setPaint(Color.black); g2d.drawString(“Java …
Permanent link to this article: http://bangla.sitestree.com/illustrates-using-a-local-font-goudy-handtooled-bt-to-perform-drawing-in-java-2d/
Draws a circle with a gradient fill
GradientPaintExample.java Draws a circle with a gradient fill. Inherits from ShapeExample.java. ************************************** import java.awt.*; /** An example of applying a gradient fill to a circle. The * color definition starts with red at (0,0), gradually * changing to yellow at (175,175). * ********************************** public class GradientPaintExample extends ShapeExample { private GradientPaint gradient = …
Permanent link to this article: http://bangla.sitestree.com/draws-a-circle-with-a-gradient-fill/
An applet that permits freehand drawing
import java.applet.Applet; import java.awt.*; import java.awt.event.*; /** An applet that lets you perform freehand drawing. * **************** public class SimpleWhiteboard extends Applet { protected int lastX=0, lastY=0; public void init() { setBackground(Color.white); setForeground(Color.blue); addMouseListener(new PositionRecorder()); addMouseMotionListener(new LineDrawer()); } protected void record(int x, int y) { …
Permanent link to this article: http://bangla.sitestree.com/an-applet-that-permits-freehand-drawing/
A TextField that uses key events to correct the spelling of the names of computer languages entered into it
import java.awt.*; import java.awt.event.*; /** A spelling-correcting TextField for entering * a language name. * ******************* public class LanguageField extends TextField { private String[] substrings = { “”, “J”, “Ja”, “Jav”, “Java” }; public LanguageField() { addKeyListener(new SpellingCorrector()); addActionListener(new WordCompleter()); addFocusListener(new SubliminalAdvertiser()); } // Put caret …
Permanent link to this article: http://bangla.sitestree.com/a-textfield-that-uses-key-events-to-correct-the-spelling-of-the-names-of-computer-languages-entered-into-it/
DebugTag.java Custom tag that optionally makes use of a tag body
DebugTag.java Custom tag that optionally makes use of a tag body package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import javax.servlet.*; /** A tag that includes the body content only if * the “debug” request parameter is set. * <P> * Taken from Core Web Programming Java 2 Edition * from Prentice Hall and Sun …
Permanent link to this article: http://bangla.sitestree.com/debugtag-java-custom-tag-that-optionally-makes-use-of-a-tag-body/
HeadingTag.java Custom tag that makes use of a tag body
HeadingTag.java Custom tag that makes use of a tag body package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; /** Generates an HTML heading with the specified background * color, foreground color, alignment, font, and font size. * You can also turn on a border around it, which normally * just barely encloses the heading, but …
Permanent link to this article: http://bangla.sitestree.com/headingtag-java-custom-tag-that-makes-use-of-a-tag-body/
PrimeTag.java Custom tag that outputs a random prime number of a user-specifiable approximate length
PrimeTag.java Custom tag that outputs a random prime number of a user-specifiable approximate length package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; /** Generates an N-digit random prime (default N = 50). * Extends SimplePrimeTag, adding a length attribute * to set the size of the prime. The doStartTag * method of the parent class …
Permanent link to this article: http://bangla.sitestree.com/primetag-java-custom-tag-that-outputs-a-random-prime-number-of-a-user-specifiable-approximate-length/
SimplePrimeTag.java Custom tag that outputs a random prime number of a fixed approximate length
SimplePrimeTag.java Custom tag that outputs a random prime number of a fixed approximate length package cwp.tags; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import java.math.*; import cwp.*; /** Generates a prime of approximately 50 digits. * (50 is actually the length of the random number * generated — the first prime above that number will * …
Permanent link to this article: http://bangla.sitestree.com/simpleprimetag-java-custom-tag-that-outputs-a-random-prime-number-of-a-fixed-approximate-length/