JSP: Reference Manuals #Java Short Notes

From: http://sitestree.com/?p=4931
Categories:Java Short Notes
Tags:
Post Data:2013-04-10 19:14:41

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

Servlet, JSP Specifications #Java Short Notes

From: http://sitestree.com/?p=4930
Categories:Java Short Notes
Tags:
Post Data:2009-10-10 10:47:36

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

Essential Knowledge on Web Component Development #Java Short Notes

  • doGet() processes HEAD requests in the absence of a doHead() method
  • Not the service() method but the methods that are called by the service method are better candidates for overriding
  • HttpServlet supports GET, POST, DELETE, OPTIONS, and TRACE requests
  • Retrieve a single value for a form parameter named “username”: String u = request.getParameter(“username”);, String u = request.getParameterValues(“username”)[0];
  • java.util.Enumeration getHeaderNames() – retrieves the complete collection of request headers
  • set the content type of a servlet response:
    response.setContentType(“text/html”);
    response.setHeader(“Content-Type”, “text/html”);
    response.addHeader(“Content-Type”, “text/html”);
  • Servlet.destroy(): Servlets release resources: When called, the servlet container may not route other requests to that instance of the servlet: Servlet.destroy() may never be called
  • The destroy() method, called by the web container when the servlet (or the web application) is being shutdown. This is a very good place to put the code to close related socket connection
  • no guarantee on when the finalize() method will be called by the JVM
  • The init() method is called by the web container before any HTTP requests are processed by the servlet. This is a good place to open a socket connection
  • web.xml, JAR files, Class files, the deployment descriptor – are expected to be placed under WEB-INF directory
  • A welcome file: used when a user requests a directory
  • welcome files may be used at any directory level
  • the default servlet is used to handle requests for specific files that exist in the webapp
  • By default, the web container sends a 404 error back if the requested file does not exist
  • Define a mime-mapping:pdfapplication/pdf
  • WAR files are created using the jar command.
  • A web application may be packaged into a WAR file for deployment, but it is not required.
  • The files within the WEB-INF directory and the files within the META-INF directory of a WAR file must not be directly served as content by the container in response to a Web client’s request.
  • A webapp can only have one web.xml file and all configuration must exist in that one file even if the Java class files exist in some other package
  • String boundObjectName = getServletContext().getInitParameter(“com.example.BoundObj”);:returns a String if an initializathttp://www.justetc.net/knowledge/editArticlesNext.phphttp://www.justetc.net/knowledge/editArticlesNext.phpion parameter of that name exists in web.xml
  • session.removeAttribute(“app.util.DataSource”);: removes a session attribute
  • Servlet context listeners are notified when the context is ready to process requests and when it is about to be shut down
  • HttpSession.setAttribute(String attributeName,Object value): method stores an object

From: http://sitestree.com/?p=4929
Categories:Java Short Notes
Tags:
Post Data:2008-09-09 09:45:43

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

#Sensor: #Canada: #Job/Contract/Project: #Sensor, #Tracking, #Fusion, #Estimation, #Surveillance, #sensor network, #target #tracking, #security 2021-07-18

Date Posted:2021-07-18 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

  1. armament-10027
  2. Signal Smoke Marine, Orange (W8486-217390/A)
  3. communications-detection-and-fibre-optics-10031
  4. LEED Recognition Display
  5. construction-products-10032
  6. LEED Recognition Display
  7. electrical-and-electronics-10006
  8. LEED Recognition Display
  9. Surveillance of Space 2 RFI (W8474-187639/C)
  10. fire-fighting-security-and-safety-equipment-10010
  11. Smart Anti-Loitering and Security System
  12. textiles-and-apparel-10028
  13. LEED Recognition Display
  14. architect-and-engineering-services-10048
  15. RFP – Building Perimeter – Access Point Security
  16. communications-photographic-mapping-printing-and-publication-services-10042
  17. LEED Recognition Display
  18. custodial-operations-and-related-services-10037
  19. LEED Recognition Display
  20. environmental-services-10050
  21. LEED Recognition Display
  22. information-processing-and-related-telecommunications-services-10049
  23. LEED Recognition Display
  24. research-and-development-r-d-10036
  25. Surveillance of Space 2 Ground-Based Optical System Request for Information (W8474-207923/B)
  26. ITS Operational Security Services
  27. utilities-10041
  28. LEED Recognition Display
  29. Keywords Used:sensor,fusion,sensor network,tracking,target tracking,surveillance,self driving car,self-driving,estimation,security,signal processing,image processing,autonomouse vehicle,facial recognition,signal,recognition,sensor fusion

    #Engineering: #Canada: #Job/Contract/Project: Any #Engineering: #Computer, #Electrical, #Electronics, #Civil, #Chemical, #Mechanical, #Naval, #Biomedical, and misc Engineering

    Date Posted:2021-07-18 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

    1. construction-services-10004
    2. REGINA SOUTH SWITCHING STATION – CIVIL WORKS
    3. ET Kenney Electrical Upgrades
  30. electrical-and-electronics-10006
  31. Electrical Products (Door Locks) (W3330-22-111)
  32. Electrical Wire Products
  33. transportation-equipment-and-spares-10029
  34. Fleet Lighting and Electrical Components
  35. architect-and-engineering-services-10048
  36. Install Doorway to Mechanical Pit for Elevator Maintenance
  37. If & As Required Geotechnical Engineering Review Services
  38. Professional Engineering Services – Street Reconstruction No. 4
  39. Project Electrical Engineer- Peak Shavers NF 91 Project
  40. RQQ-2020-NAFA-487: Engineering Services for Mount Joy Passing Track
  41. Engineering Services-Brown Street, Sydney Mines-Waterline Upgrade
  42. Engineering Services, CS 2-20 Twinning, North of Prince Albert
  43. environmental-services-10050
  44. If & As Required Geotechnical Engineering Review Services
  45. Prime Consultant Landscape Architecture or Civil Engineering Consultant Services for David Thompson Corridor Infrastructure Safety Upgrades
  46. natural-resources-services-10051
  47. SP22TED251 – Mechanical Site Preparation – Excavator – Kamloops
  48. Mechanical Site Preparation – Excavator – Kamloops Field Team
  49. operation-of-government-owned-facilities-10039
  50. Engineering Services for Intersection Improvement Program
  51. professional-administrative-and-management-support-services-10040
  52. If & As Required Geotechnical Engineering Review Services
  53. NPP – W6399-21-LF84/B – TSPS – One (1) Intermediate Professional Engineer (P.Eng). (W6399-21-LF84/B)
  54. research-and-development-r-d-10036
  55. Software reverse engineering prototypes development (W7701-217332/A)
  56. Engineering Services for Intersection Improvement Program
  57. special-studies-and-analysis-not-r-d-10047
  58. Engineering and Architectural Services
  59. undefined-10055
  60. RQQ-2020-NAFA-487: Engineering Services for Mount Joy Passing Track
  61. Keywords Used:engineer,civil,mechanical,electrical,electronics,mechatronics,naval,biomedical,computer engineer,software engineer,civil engineer,biomedical,electrical engineer,electronics engineer,mechanical engineer,metallurgical,chemical engineer,industrial engineer,communications engineer,quality assurance engineer,Aerospace engineer,aeronautical engineer,Engineering manager,Agricultural Engineer,Automotive Engineer,Environmental Engineer,Geological Engineer,Marine Engineer,Petroleum Engineer,Acoustic Engineer,Acoustic Engineer,Aerospace Engineer,Agricultural Engineer,Applied Engineer,Architectural Engineer,Audio Engineer,Automotive Engineer,Biomedical Engineer,Chemical Engineer,Civil Engineer,Computer Engineer,Electrical Engineer,Environmental Engineer,Industrial Engineer,Marine Engineer,Materials Science Engineer,Mechanical Engineer,Mechatronic Engineer,Mining and Geological Engineer,Molecular Engineer,Nanoengineering,Nuclear Engineer,Petroleum Engineer,Software Engineer,Structural Engineer,Telecommunications Engineer,Thermal Engineer,Transport Engineer,Vehicle Engineer,engineering

    #Canada: #IT Jobs:#Consultants, #Contractors, #Analysts, #Engineers, #Developers, #Technology Consultants, #IT-Consultants Opportunities2021-07-18

    Apply yourself, or submit others as a candidate, Build a recruitment team to submit others as a candidate, submit RFP to be considered for projects in future, Try to become a vendor so that you are asked to submit consultants/resources in future

    1. edp-hardware-and-software-10034
    2. Project: tender_15205 – 21-004P Cloud-Based Web Services
    3. energy-10007
    4. Source List (SL) for Environmental Consulting Services
    5. Prime Consultant for Main Building Foundation Repairs & Site Grading
    6. architect-and-engineering-services-10048
    7. Consulting Services: Archibald Drive Storm Sewers
    8. RFP for PRIME ARCHITECTURAL CONSULTANT SERVICES for CALGARY ROCKYVIEW GENERAL HOSPITAL Intensive Care Unit/ Coronary Care Unit/ Gastrointestinal Clinic Redevelopment
    9. communications-photographic-mapping-printing-and-publication-services-10042
    10. Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
    11. educational-and-training-services-10043
    12. Assessment Consulting Service for the Assured Income for the Severely Handicapped (AISH) Program for the Province of Alberta
    13. Anti-Racism & Anti-Discrimination Exploratory Working Group (AREWG) Consultant
    14. environmental-services-10050
    15. Environmental and Survey Consultant Services for Highway-774 Wildlife Road Crossing Study and Fence Line Survey
    16. Prime Consultant Landscape Architecture or Civil Engineering Consultant Services for David Thompson Corridor Infrastructure Safety Upgrades
    17. financial-and-related-services-10038
    18. Group Insurance Consulting (EP899-220446/A)
    19. RQQ-2020-FACA-499: VOR + 2nd Stage- Provide Accounting & Tax Consulting Services
    20. Request for Proposal (RFP) for Actuarial and Pension Consulting Services
    21. information-processing-and-related-telecommunications-services-10049
    22. Business Consulting and Risk Management (20210074)
    23. Project: tender_15205 – 21-004P Cloud-Based Web Services
    24. REFONTE DES SITES WEB
    25. professional-administrative-and-management-support-services-10040
    26. RFP for PRIME ARCHITECTURAL CONSULTANT SERVICES for CALGARY ROCKYVIEW GENERAL HOSPITAL Intensive Care Unit/ Coronary Care Unit/ Gastrointestinal Clinic Redevelopment
    27. NPP – W6399-21-LF84/B – TSPS – One (1) Intermediate Professional Engineer (P.Eng). (W6399-21-LF84/B)
    28. TSPS 2.5 – Business Process Consultant (Senior) (W0152-22-AA034)
    29. TSPS 2.3 Business Consultant (Senior) (W0152-22-AA035)
    30. special-studies-and-analysis-not-r-d-10047
    31. CONSULTING SERVICES FOR STREETSCAPE ASSESSMENT
    32. Anti-Racism & Anti-Discrimination Exploratory Working Group (AREWG) Consultant
    33. Maven 1.0: A pretty good article: Compare Ant and Maven #Java Short Notes

      From: http://sitestree.com/?p=4928
      Categories:Java Short Notes
      Tags:
      Post Data:2007-02-02 16:28:00

      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

      Your First Spring+Hibernate Application in IntelliJ #Java Short Notes

      From: http://sitestree.com/?p=4926
      Categories:Java Short Notes
      Tags:
      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

      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 for struts and spring frameworks respectively. Or start with a equinox download from https://equinox.dev.java.net/files/documents/1901/5728/equinox-1.0.zip that will simplify strut-spring integration/switching. Download and unzip
      • Make sure that the environment variables are set properly. Take a look at build.xml file. Check different sections like compile, distribution, ant-tomcat, help, database
      • run ant new -Dapp.name=users from windows/linux/cygwin command prompt. It will create a new application with name users.
      • Check the directory structure. It should look like as follows:
      • under newly created users directory run commands like ant and check output. In build.xml, change default=”help” to default=”compile”, run ant again, run ant deploy, play with different ant commands
      • if ant command shows error messages then you may need to change build.xml file as indicated. With equinox, you may face path error like {…}/common/lib or {…} lib
      • If things don’t work right, check build.properties and modify the options if required. Play again
      • Also, check tomcatTasks.properties file to see what classes are used for different ant commands (used in the build.xml file)
      • Run ant list to check the services running. if the command fails, check that build.properties file contains right information. Make sure tomcat-users.xml file under the Tomcat installation directory has an entry for users as provided in the build.properties file
      • Make sure, you are under the users directory
      • run: ant deploy : the users application will be deployed under Tomcat. Check target name=deploy section in your build.xml file. You will see what actually happens in deployment (mostly copy)
      • Using your browser, go to: http://localhost:8080/users/, you will see the interface of the users application
      • Unit Test Persistence Layer
      • Hibernate for persistence
      • Hibernate relates Java Objects to database tables, makes CRUD (Create, Read, Update, Delete) very easy
      • Spring + Hibernate: 75% code reduction than Hibernate alone: [ref:Internet, sourcebeat.com]
      • Spring + Hibernate: removal of a ServiceLocator, removal of several DAOFactory classes, replace Hibernate’s checked exceptions with Spring’s runtime exceptions
      • Before proceeding further, you may want to open the application using Eclipse. You can also use any editor to create Java files.
      • Eclipse 3.3.2: How to open the project: File->new->project->java->java project->create project from existing source->identify the location and provide project name as users->you may want to switch to java perspectives.
      • Click on build.xml file. Right click -> run as -> 2 Ant Build. If compilation fails: change basedir to the application directory. If it fails again check, tomcat directories and the directories mentioned in the build.xml files are the same. [you may not need /server in build.xml for tomcat 6.o]
      • Check: build.xml -> right click -> Run As -> 3. Ant Build -> check that you selected the operation you want. If you want to deploy your application after compilation you need to select compile, deploy. Check what else apply. Or you can use the ant command [with options] from the command prompt
      • Now Hibernate and Persistence again:

      From: http://sitestree.com/?p=4924
      Categories:Java Short Notes
      Tags:
      Post Data:2006-12-25 08:52:32

      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

      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 -> to lookup Hibernate sessions. Spring Alternative: configure a SessionFactory
      • Spring provides/supports good programming practices such as, coding to interfaces, reducing coupling, easy testability.
      • But EJBs require to run EJB containers (WebLogic, JBoss, Websphere) to test them [testability problems inherent in EJBs] [as of 2005]
      • Over the time EJB [EJB 3.0 ] has recovered some of the issues like testability, portability [ 1. EJB 2.0 has deployment descriptors but EJB 3.0 has no deployment descriptor, 2. In EJB 2.0 you have to write Home and Remote Interfaces But in EJB3.0 you do not need to write Home interfaces, 3. In EJB 3.0, all entities are identified with ‘@’, 4. In EJB 3.0 methods like ejbPassivate, ejbActivate, ejbLoad, ejbStore, etc. are not required, 5. EJB 3.0 is totally newly designed including the entity manager, 6. EJB 3.0 entity beans are just POJO, 7. No EJB container required to run, 8. EJB 3.0 supports Java Persistence API for all of its data needs, 9. No XMLDeployment Descriptors but annotations, 10. EJB 3.0 entity beans/JPA becomes local, 11. Queries are very flexible. Multiple levels of joins are enabled, 12. EJB 3.0 pluggable, security enabled ]
      • Spring Criticisms [as of 2005]: It’s not an standard like EJBs, too heavyweight (though custom selection of modules/jars will help)
      • How Spring works: Spring can configure applications using JavaBeans. A class can expose it’s dependency through setters, Spring can configure that dependency.
      • Inversion of Control/Dependency Injection: Wiring dependent objects together through a container
      • Spring Modules: Spring AOP (source level metadata), ORM (Hibernate, iBATIS, JDO support), Spring Web (WebApplicationContext, MultipartResolver, Web Utilities), DAO (Transaction Infrastructure, JDBC, DAO support), Context (ApplicationContext, UI Support, Validation, JNDI, EJB, Remoting support, Mail), MVC (Web Framework, Web Views, JSP, Velocity, Freemarker, PDF, Excel, XML/XSL)
      • Spring advantage over J2EE: Reducing Coupling: It’s better not to tightly couple any application to a specific resource. In J2EE, for database operations typically an abstract Factory class (DAOFactory) is defined and a class is written for each specific implementation (DAOFactoryOracle). [J2EE Factory Pattern]. It creates additional issues such as managing dependencies of these factoried objects, handling Hibernate Session
      • Spring approach: bind interfaces to implementations, configure everything in an XML file, and modify the XML file as required for switching, unit tests can be written without the knowledge of the implementation [great with Hibernate and iBATIS] p30. Define the bean in the applicationContext.xml file, and use it from your code through ClassPathXmlApplicationContext, get a reference to the bean using ClassPathXmlApplicationContext.getBean. You can change the class property in the bean definition to use a different implementation
      • You can use Hibernate from Spring (ORM support). If you go through wrapping classes of Spring to provide Hibernate functionalities, you will not require to worry about (try, catch) checked exceptions that Hibernate usually throws

      From: http://sitestree.com/?p=4923
      Categories:Java Short Notes
      Tags:
      Post Data:2006-10-26 16:03: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