The document discusses HTTP status codes and how to set them in servlets. It covers common status codes like 200, 302, 401, and 404. It provides examples of how to redirect users, handle errors, and build a front end to various search engines using status codes. Setting status codes allows servlets to accomplish many tasks and the document outlines methods like setStatus(), sendRedirect(), and sendError() for doing so. It also discusses encoding user input and handling invalid data.
Android | Busy Java Developers Guide to Android: Persistence | Ted NewardJAX London
2011-11-02 | 10:00 AM - 11:00 AM
The Android ecosystem offers a few different ways to store things across restarts, but because Android also runs Java, a few more options also make themselves available, which means the Android developer has a pretty wide assortment of choices available to her. In this session, we’ll talk about those available choices, the pros and cons of each, and how to and when to use them. (Note: this session assumes you have some familiarity with the Android environment.)
SQLAdria 2009 presentation's slides about our experience with Maven and SQLJ. It delves in some details about SQLJ and performance comparion between SQLJ and JDBC with prepared statements. It also shows surprising results for what concerns performances of (DB2) SQL PL procedures
Android | Busy Java Developers Guide to Android: Persistence | Ted NewardJAX London
2011-11-02 | 10:00 AM - 11:00 AM
The Android ecosystem offers a few different ways to store things across restarts, but because Android also runs Java, a few more options also make themselves available, which means the Android developer has a pretty wide assortment of choices available to her. In this session, we’ll talk about those available choices, the pros and cons of each, and how to and when to use them. (Note: this session assumes you have some familiarity with the Android environment.)
SQLAdria 2009 presentation's slides about our experience with Maven and SQLJ. It delves in some details about SQLJ and performance comparion between SQLJ and JDBC with prepared statements. It also shows surprising results for what concerns performances of (DB2) SQL PL procedures
Spring Data is a high level SpringSource project whose purpose is to unify and ease the access to different kinds of persistence stores, both relational database systems and NoSQL data stores.
Xcore is a textual format to define ecore models. This not only makes editing and reading much more convenient but has other cool advantages as well. Xcore, for instance, allows to embed Xbase expressions to define logic within EOperations and the like.
In this session you will learn, why and when using Xcore is a good idea and how to use it with Xtext languages. I will explain talk about which URIs to use, and how to properly configure the MWE2 file as well as more complicated setups, with multiple languages and mixtures of ecore, xcore and generated models.
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slidesHitesh-Java
In this Java Spring Training session, you will learn Spring AOP – Aspect Oriented Programming. Topics covered in this session are:
For more information, visit this link:
• Spring framework
• Inversion of Control
• Dependency Injection – Two types
• Defining beans using XML
• Inheriting beans
• Auto-wiring
• Annotations based configuration
• Java based configuration
https://www.mindsmapped.com/courses/software-development/spring-fundamentals-learn-spring-framework-and-spring-boot/
Building High Performance and Reliable Windows Phone 8 AppsMichele Capra
Have you ever dreamed to build a solid and fast application for your Windows Phone 8? Come to this session and you will see how to leverage the power of your device and how to deliver outstanding robust application. You'll discover how to unit test your WP8 application and how to tune its performance.
These are the slides from a talk "Spot the Web Vulnerability" held at Hacktivity 2012 conference (Hungary / Budapest 12th–13th October 2012) by Miroslav Stampar.
Spring Data is a high level SpringSource project whose purpose is to unify and ease the access to different kinds of persistence stores, both relational database systems and NoSQL data stores.
Xcore is a textual format to define ecore models. This not only makes editing and reading much more convenient but has other cool advantages as well. Xcore, for instance, allows to embed Xbase expressions to define logic within EOperations and the like.
In this session you will learn, why and when using Xcore is a good idea and how to use it with Xtext languages. I will explain talk about which URIs to use, and how to properly configure the MWE2 file as well as more complicated setups, with multiple languages and mixtures of ecore, xcore and generated models.
Spring - Part 2 - Autowiring, Annotations, Java based Configuration - slidesHitesh-Java
In this Java Spring Training session, you will learn Spring AOP – Aspect Oriented Programming. Topics covered in this session are:
For more information, visit this link:
• Spring framework
• Inversion of Control
• Dependency Injection – Two types
• Defining beans using XML
• Inheriting beans
• Auto-wiring
• Annotations based configuration
• Java based configuration
https://www.mindsmapped.com/courses/software-development/spring-fundamentals-learn-spring-framework-and-spring-boot/
Building High Performance and Reliable Windows Phone 8 AppsMichele Capra
Have you ever dreamed to build a solid and fast application for your Windows Phone 8? Come to this session and you will see how to leverage the power of your device and how to deliver outstanding robust application. You'll discover how to unit test your WP8 application and how to tune its performance.
These are the slides from a talk "Spot the Web Vulnerability" held at Hacktivity 2012 conference (Hungary / Budapest 12th–13th October 2012) by Miroslav Stampar.
The Change! Tool is a comprehensive evaluation and project management
tool with a history of rigorous development and testing. The Tool enables
practitioners to evaluate the impact of community engagement projects
that bring about behaviour change towards sustainable lifestyles.
A quick introduction to node.js in order to have good basics to build a simple website.
This slide covers:
- node.js (you don't say?)
- express
- jade
- mongoDB
- mongoose
The Web and Spring MVC continue to be one of the most active areas of the
Spring Framework with each new release adding plenty of features and refinements
requested by the community. Furthermore version 4 added a significant choice
for web applications to build WebSocket-style architectures.
This talk provides an overview of the areas in which the framework has evolved
along with highlights of specific noteworthy features from the most recent
releases.
Generating the Server Response: HTTP Status CodesDeeptiJava
In this session you will learn:
Format of the HTTP response
How to set status codes
What the status codes are good for
Shortcut methods for redirection and error pages
A servlet that redirects users to browser-specific pages
A front end to various search engines
For more information, visit this link: https://www.mindsmapped.com/courses/software-development/online-java-training-for-beginners/
The outline of the presentation (presented at NDC 2011, Oslo, Norway):
- Short summary of OData evolution and current state
- Quick presentation of tools used to build and test OData services and clients (Visual Studio, LinqPad, Fiddler)
- Definition of canonical REST service, conformance of DataService-based implementation
- Updateable OData services
- Sharing single conceptual data model between databases from different vendors
- OData services without Entity Framework (NHibernate, custom data provider)
- Practical tips (logging, WCF binding, deployment)
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
2. Agenda
• Format of the HTTP response
• How to set status codes
• What the status codes are good for
• Shortcut methods for redirection and error
pages
A l t th t di t t b• A servlet that redirects users to browser-
specific pages
• A front end to various search engines• A front end to various search engines
5
HTTP Request/Responseq p
• Request • Response
GET /servlet/SomeName HTTP/1.1
Host: ...
HTTP/1.1 200 OK
Content-Type: text/html
Header2: ...
...
HeaderN:
Content Type: text/html
Header2: ...
...
HeaderN: ...HeaderN:
(Blank Line)
HeaderN: ...
(Blank Line)
<!DOCTYPE ...>
<HTML><HTML>
<HEAD>...</HEAD>
<BODY>
...
</BODY></HTML>
6
3. Setting Status Codes
• response.setStatus(int statusCode)
– Use a constant for the code, not an explicit int.
Constants are in HttpServletResponse
– Names derived from standard message– Names derived from standard message.
E.g., SC_OK, SC_NOT_FOUND, etc.
• response.sendError(int code,p ( ,
String message)
– Wraps message inside small HTML document
• response.sendRedirect(String url)
– Sets status code to 302
S t L ti h d l– Sets Location response header also
7
Common HTTP 1.1 Status
CodesCodes
• 200 (OK)
– Everything is fine; document follows.
– Default for servlets.
204 (No Content)• 204 (No Content)
– Browser should keep displaying previous document.
• 301 (Moved Permanently)• 301 (Moved Permanently)
– Requested document permanently moved elsewhere
(indicated in Location header).
– Browsers go to new location automatically.
– Browsers are technically supposed to follow 301 and 302
(next page) requests only when the incoming request is(next page) requests only when the incoming request is
GET, but do it for POST with 303. Either way, the
Location URL is retrieved with GET.8
4. Common HTTP 1.1 Status
Codes (Continued)Codes (Continued)
• 302 (Found)
R t d d t t il d l h– Requested document temporarily moved elsewhere
(indicated in Location header).
– Browsers go to new location automatically.
– Servlets should use sendRedirect, not setStatus, when
setting this header. See example.
• 401 (Unauthorized)401 (Unauthorized)
– Browser tried to access password-protected page without
proper Authorization header.
• 404 (Not Found)• 404 (Not Found)
– No such page. Servlets should use sendError to set this.
– Problem: Internet Explorer and small (< 512 bytes) error
pages. IE ignores small error page by default.
– Fun and games: http://www.plinko.net/404/
9
A Servlet That Redirects Users
to Browser-Specific Pagesto Browser-Specific Pages
public class WrongDestination extends HttpServlet {
public void doGet(HttpServletRequest request,public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
String userAgent = request.getHeader("User-Agent");g g q g ( g )
if ((userAgent != null) &&
(userAgent.contains("MSIE")) {
response.sendRedirect("http://home.mozilla.com");
} else {
response.sendRedirect("http://www.microsoft.com");
}
}}
}
10
5. A Servlet That Redirects Users
to Browser-Specific Pagesto Browser-Specific Pages
• Original URL for both
– http://localhost/status-codes/servlet/coreservlets.WrongDestination
11
A Front End to Various
Search EnginesSearch Engines
public class SearchEngines extends HttpServlet {
public void doGet(HttpServletRequest request,public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
String searchString =
request.getParameter("searchString");
if ((searchString == null) ||
(searchString.length() == 0)) {
reportProblem(response "Missing search string");reportProblem(response, Missing search string );
return;
}
searchString = URLEncoder.encode(searchString, "utf-8");
String searchEngineName =
request.getParameter("searchEngine");
if ((searchEngineName == null) ||
( hE i N l th() 0)) {(searchEngineName.length() == 0)) {
reportProblem(response, "Missing search engine name");
return;
}12
6. A Front End to Various
Search Engines (Continued)Search Engines (Continued)
String searchURL =
SearchUtilities.makeURL(searchEngineName,SearchUtilities.makeURL(searchEngineName,
searchString);
if (searchURL != null) {
response.sendRedirect(searchURL);
} else {
reportProblem(response,
"Unrecognized search engine");
}}
}
private void reportProblem(HttpServletResponse response,
String message)
throws IOException {
response.sendError(HttpServletResponse.SC_NOT_FOUND,
)message);
}
}
13
A Front End to Various
Search Engines (Continued)Search Engines (Continued)
public class SearchSpec {
/** Builds a URL for the results page by
* simply concatenating the base URL
//* (http://...?someVar=") with the
* URL-encoded search string (jsp+training).
*/
public String makeURL(String searchString) {
return(baseURL + searchString);( g);
}
…
}}
14
7. Front End to Search Engines:
HTML FormHTML Form
15
Front End to Search Engines:
Result for Valid DataResult for Valid Data
16
8. Front End to Search Engines:
Result for Invalid DataResult for Invalid Data
17
Summary
• Many servlet tasks can only bey y
accomplished with HTTP status codes
• Setting status codes:
Redirect user with response sendRedirect(someURL)– Redirect user with response.sendRedirect(someURL)
• If you insert user-supplied data into the URL, encode with
URLEncoder.encode
S d 404 ith dE– Send 404 error pages with sendError
– In general, set via response.setStatus
• Most important status codesp
– 200 (default)
– 302 (forwarding; set with sendRedirect)
401 (password needed)– 401 (password needed)
– 404 (not found; set with sendError)
18