This document demonstrates how to upload a local file to a remote server using Oracle ADF Mobile. It describes setting up the development environment, creating an application and task flow, adding JavaScript code to call the device camera and upload the photo, and including Java code to call the JavaScript functions. The server component is a simple JSP page that accepts a file upload. When the user taps a button, it opens the camera to take a photo, uploads the file to the server, and logs the response.
2.1 Identify the structure of a web application and web archive file, the name of the WebApp deployment descriptor, and the name of the directories where you place the following:
The WebApp deployment descriptor
The WebApp class files
Any auxiliary JAR files
2.2 Match the name with a description of purpose or functionality, for each of the following deployment descriptor elements:
Servlet instance
Servlet name
Servlet class
Initialization parameters
URL to named servlet mapping
2.1 Identify the structure of a web application and web archive file, the name of the WebApp deployment descriptor, and the name of the directories where you place the following:
The WebApp deployment descriptor
The WebApp class files
Any auxiliary JAR files
2.2 Match the name with a description of purpose or functionality, for each of the following deployment descriptor elements:
Servlet instance
Servlet name
Servlet class
Initialization parameters
URL to named servlet mapping
JAVA EE DEVELOPMENT (JSP and Servlets)Talha Ocakçı
Java and J2EE is the most used technologies in enterprise web development. Telecom operators, service providers are using these technlogies; banking and insurance companies are moving to Java from old generation technologies.
https://www.udemy.com/java-web-developmen-with-real-world-development-flow
If you want to earn much in web development business, you also need to learn Java web technologies.
Java has de facto standart frameworks such as EJB 3.0, Spring and others that can be bound to them.
But at heart, they all use the similar JSP/Servlet technology and add some layers above them to speed up the development.
You will use them in your daily business but before using them, you must learn the basics and what is going on while using them. Otherwise, you will not be able to find a proper solution to common problems.
This course will make you understand the basics of JSP / servlet technlogies, designing a relational database, DB operations, design patterns, working with other developers,
and let you know the must-do operations in professional projects such as performance increasing, logging errors.
If you want to develop a web-site in a couple of hours without understanding what you are doing, you may go ahead and find other resources. But if you really want to understand what you are doing and learn the theory at the same time, this course will be a great oppurtunity for you. You will develop a real working project. Yow will first write quick and dirty code then you will apply professional patterns one by one while investigating the problems.
You will walk through a real development flow:
1- Write a quick and dirty code for doing the job.
2- You will design database tables and high performance queries
3 - You will apply design patterns to make the code reusable and high performance.
4 - You will beautify the user interface with Javascript and CSS tweaks
5- You will add exception handling, logging mechanism for production environment
6- AT THIS STEP, YOU WILL BE HIRED FOR MUCH MUCH HIGHER SALARIES. BECAUSE YOU ARE A REAL PROFESSIONAL.
2.1 Identify the structure of a web application and web archive file, the name of the WebApp deployment descriptor, and the name of the directories where you place the following:
The WebApp deployment descriptor
The WebApp class files
Any auxiliary JAR files
2.2 Match the name with a description of purpose or functionality, for each of the following deployment descriptor elements:
Servlet instance
Servlet name
Servlet class
Initialization parameters
URL to named servlet mapping
2.1 Identify the structure of a web application and web archive file, the name of the WebApp deployment descriptor, and the name of the directories where you place the following:
The WebApp deployment descriptor
The WebApp class files
Any auxiliary JAR files
2.2 Match the name with a description of purpose or functionality, for each of the following deployment descriptor elements:
Servlet instance
Servlet name
Servlet class
Initialization parameters
URL to named servlet mapping
JAVA EE DEVELOPMENT (JSP and Servlets)Talha Ocakçı
Java and J2EE is the most used technologies in enterprise web development. Telecom operators, service providers are using these technlogies; banking and insurance companies are moving to Java from old generation technologies.
https://www.udemy.com/java-web-developmen-with-real-world-development-flow
If you want to earn much in web development business, you also need to learn Java web technologies.
Java has de facto standart frameworks such as EJB 3.0, Spring and others that can be bound to them.
But at heart, they all use the similar JSP/Servlet technology and add some layers above them to speed up the development.
You will use them in your daily business but before using them, you must learn the basics and what is going on while using them. Otherwise, you will not be able to find a proper solution to common problems.
This course will make you understand the basics of JSP / servlet technlogies, designing a relational database, DB operations, design patterns, working with other developers,
and let you know the must-do operations in professional projects such as performance increasing, logging errors.
If you want to develop a web-site in a couple of hours without understanding what you are doing, you may go ahead and find other resources. But if you really want to understand what you are doing and learn the theory at the same time, this course will be a great oppurtunity for you. You will develop a real working project. Yow will first write quick and dirty code then you will apply professional patterns one by one while investigating the problems.
You will walk through a real development flow:
1- Write a quick and dirty code for doing the job.
2- You will design database tables and high performance queries
3 - You will apply design patterns to make the code reusable and high performance.
4 - You will beautify the user interface with Javascript and CSS tweaks
5- You will add exception handling, logging mechanism for production environment
6- AT THIS STEP, YOU WILL BE HIRED FOR MUCH MUCH HIGHER SALARIES. BECAUSE YOU ARE A REAL PROFESSIONAL.
Server side programs can be written using different server-side technologies , such as Common Gateway Interface (CGI) , Active Server Pages (ASP) and Servlets.
CGI scripts are written in C , C++ or perl programming languages .
In case of an application server using CGI script to process client request , the server creates a separate instance of the CGI script to process the request.
As a result, the efficiency of the server is affected when there is large number of concurrent requests.
This slide is about basics of java servlet and java server page.
A basic example of JSP using multiple directives.
Further information of setting up and using of Apache Tomcat server.
Server side programs can be written using different server-side technologies , such as Common Gateway Interface (CGI) , Active Server Pages (ASP) and Servlets.
CGI scripts are written in C , C++ or perl programming languages .
In case of an application server using CGI script to process client request , the server creates a separate instance of the CGI script to process the request.
As a result, the efficiency of the server is affected when there is large number of concurrent requests.
This slide is about basics of java servlet and java server page.
A basic example of JSP using multiple directives.
Further information of setting up and using of Apache Tomcat server.
Google's I/O 2016 annual developer conference is scheduled to kick off in San Francisco on 18 May, with a main keynote that begins at 10am PST. Here are all the keynotes that has been expected from Google’s big event.
Agenda for the Google’s Big Event
• Android N
• Chrome OS
• Android Wear
• Android Auto
• Virtual reality or “Andriod VR”
• Self-driving Cars
• Project Ara
• Project Tango
• Project Fi
• Smarthome
These are some of the questions this PPT will answer for you:
1. Google I/O 2016: What events are scheduled?
2. What all to Expect from the Google's big Event?
There's been a lot of talk lately about Progressive Web Apps. The main purpose is to provide an app-like user experience. For those who haven't heard of them, progressive web apps aim to bridge the gap between the mobile web and native apps by providing things like the ability to install, provide offline support, run background processes and send push notifications.
What are the non-technical doubts about using it? How does it work? Is it worth to dig into PWA now?
I had very strange experience when I had been interview yesterday, there three guys, I was asked to
write a code to upload multiple documents to document library neither laptop was given nor JS file
limit in sharepoint or REST API limit being asked, I was explaining code behind files usage, either
cross domain or single domain. Infact they are not aware of broader view sharepoint usage and
limitations. At this age of 40 people still ask to code on paper to clear interview. If they would have
given laptop and assignment that would have made sense to me.
The latest browser APIs now make it possible to redesign how your web pages interact with other applications. Web pages are too often little islands that fail to play well with the wider user interfaces of our devices. This talk will explore the possibilities from Drag and Drop to Web Intents, demonstrating how to make web pages more equal in the world of applications.
Modernizing the monolithic architecture to container based architecture apaco...Vinay Kumar
Transform the architecture from monolithic architecture to container/serverless architecture. Speaker would explain how things work with monolithic implementation and what would require to change to the container-based design. Example of Fusion middleware (WebLogic) to new technologies like node.js etc would be given. This session would be more interactive and provides advantages of the container-based system. Container and container management software would be explained.
Kafka and event driven architecture -apacoug20Vinay Kumar
Event-driven architecture in APIs and microservice are very important topics if you are developing modern applications with new technology, platforms. This session explains what is Kafka and how we can use in event-driven architecture. This session explains the basic concepts of publisher, subscriber, streams, and connect. Explain how Kafka works. The session covers developing different functions with different programming languages and shows how they can share messages by using Kafka. What are the options we have in Oracle stack? Which tool make it possible event-driven architecture in Oracle stack. Speaker will also explain Oracle Event HUB, OCI streaming, and Oracle AQ implementation.
Modern application development with oracle cloud sangam17Vinay Kumar
How Oracle cloud helps in building modern application development. This explains Oracle Application container cloud with developer cloud service and etc. Spring boot application deployed in Oracle ACCS and CI/CD part done in Oracle Developer cloud service.
This technical article explains personalization concept in Webcenter Portal. It also provides steps to create a scenario and use it in Webcenter Portal.
Tuning and optimizing webcenter spaces application white paperVinay Kumar
This white paper focuses on Oracle WebCenter Spaces performance problem and analysis after post production deployment. We will tune JVM ( JRocket). Webcenter Portal, Webcenter content and ADF task flow.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
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/
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.
When stars align: studies in data quality, knowledge graphs, and machine lear...
File upload in oracle adf mobile
1. FILE UPLOAD IN
ORACLE ADF MOBILE
An Oracle White Paper – 12-03-2014
Vinay Kumar
Abstract
This paper demonstrates a way to upload a local file to a remote server in ADF
Mobile
3. Setup:
Install JDeveloper 11g Release 2 (version 11.1.2.3 or above) along with Oracle ADF Mobile
extension for JDeveloper. This can be done from Help Check for Updates and then either
downloading the extension from Oracle or alternatively installing it from a local copy of the
Extension Zip file.
Install Android SDK. Create a virtual device if you would like to deploy on an emulator or else
you could also deploy directly to an actual Android device. Configure the ADF Mobile
environment for Android from Tools ->Preferences->ADF Mobile-> Platforms.
Steps Involved
We will consider a simple business use case where the user is required to click a photograph with
the device camera and upload it to a remote server.
Creating the application and task flow:
Open JDeveloper. Create a new application and select the type as Mobile Application (ADF)
4. Click “OK”, name your application (for this example we will name it as “FileTransferDemo”),
and then click “Next” on all subsequent dialog windows, accepting all default options, and
finally click on “Finish”.
5. Create a new feature in the adfmf-feature.xml. Name it as “FileTransfer”. Create a new AMX
page under the Contents tab and name it “upload.amx”.
8. Now edit the JavaScript file as follows:
(function () {
if (!window.application)
window.application = {
};
snapUpload = function () {
// take picture
navigator.camera.getPicture(uploadPhoto, function (message) {
alert("get picture failed");
},
{
quality : 50, destinationType :
navigator.camera.DestinationType.FILE_URI,
sourceType : navigator.camera.PictureSourceType.CAMERA
});
};
9. function uploadPhoto(imageURI) {
var options = new FileUploadOptions();
options.fileKey = "file";
// extract filename from URI
options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1);
options.mimeType = "image/jpeg";
var params = {
};
options.params = params;
var ft = new FileTransfer();
// upload to server
ft.upload(imageURI, encodeURI("http://10.87.194.23:7101/FileUpload-
ViewController-
context-root/upload.jsp"), success, fail, options);
}
function success(response) {
alert("File uploaded successfully");
// log response
console.log("Code = " + response.responseCode);
console.log("Response = " + response.response);
console.log("Sent = " + response.bytesSent);
}
function fail(error) {
alert("An error has occurred: Code = " + error.code);
// log error
console.log("Upload error source " + error.source);
console.log("Upload error target " + error.target);
}
})();
Now we will add code in the AMX page that will call the JavaScript functions. First create a
bean with a method that will call the JavaScript function snapUpload, and register it as a
managed bean in the adf-mobile-config.xml file as shown:
10. package mobile;
import oracle.adfmf.amx.event.ActionEvent;
import oracle.adfmf.framework.api.AdfmfContainerUtilities;
public class MyBean {
public void snapUpload(ActionEvent ae) { // action listener method
// call JavaScript function to take picture and upload to server
AdfmfContainerUtilities.invokeContainerJavaScriptFunction("FileTransfe
r",
"snapUpload", new Object [] {});
}
}
Edit the upload.amx page as follows:
11. <?xml version="1.0" encoding="UTF-8" ?>
<amx:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:amx="http://xmlns.oracle.com/adf/mf/amx"
xmlns:dvtm="http://xmlns.oracle.com/adf/mf/amx/dvt">
<amx:panelPage id="pp1">
<amx:facet name="header">
<amx:outputText value="Image Upload" id="ot1"/>
</amx:facet>
<amx:commandButton text="Upload Photo" id="cb1"
actionListener="#{pageFlowScope.myBean.snapUpload}"/>
</amx:panelPage>
</amx:view>
Basically, we are associating an action listener with a button that calls the JavaScript function
from our Java code.
The server must be up and running for the file upload to work. The URL provided must point to
a page that accepts a file whose contents are sent in the body of a POST request. In our case, we
are using a JSP page, but any other web technology may be used like PHP, ASP.NET etc.
The following code lists our simple upload.jsp page:
<%@ page language="java" import="java.io.*" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4
<%
// get the content type information from JSP Request Header
String contentType = request.getContentType();
// content type should not be null and data passed from mulitpart/form-data is greater tha
to 0
if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) {
DataInputStream in = new DataInputStream(request.getInputStream());
// get length of the data content
int formDataLength = request.getContentLength();
byte dataBytes[] = new byte[formDataLength];
int byteRead = 0;
int totalBytesRead = 0;
// read bytes while available
while (totalBytesRead < formDataLength) {
byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
totalBytesRead += byteRead;
}
String file = new String(dataBytes);
// get filename for saving
String saveFile = file.substring(file.indexOf("filename="") + 10);
saveFile = saveFile.substring(0, saveFile.indexOf("n"));
saveFile = saveFile.substring(saveFile.lastIndexOf("") + 1,saveFile.indexOf("""));
int lastIndex = contentType.lastIndexOf("=");
// get boundary delimiter from header
String boundary = contentType.substring(lastIndex + 1, contentType.length());
int pos;
// locate start and end positions of file data within request
pos = file.indexOf("filename="");
pos = file.indexOf("n", pos) + 1;
pos = file.indexOf("n", pos) + 1;
pos = file.indexOf("n", pos) + 1;
int boundaryLocation = file.indexOf(boundary, pos) - 4;
12. int startPos = ((file.substring(0, pos)).getBytes()).length;
int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
// create a new file with the same name as source and copy the file contents to it
FileOutputStream fout = new FileOutputStream(saveFile);
fout.write(dataBytes, startPos, (endPos - startPos));
fout.flush();
fout.close();
%>
<br></br>
<table border="2">
<tr>
<td>
<b>You have successfully uploaded the file by the name of:</b>
<%=new File(saveFile).getAbsolutePath()%>
</td>
</tr>
</table>
<%
} // end if
%>
Finally, deploy the application to an Android device or emulator using the Application Deploy
menu.Tapping on the “Upload Photo” button opens up the device camera using which you can
14. After you have clicked the photo the file is uploaded to the server. Upon successful upload the
user is alerted accordingly.
15. Looking at the log file “FileTransferDemo.txt” under the sdcard root you can see the response
code, the HTML response from the server and the number of bytes transferred has been logged.
You can view the log file by typing “file:///sdcard/FileTransferDemo.txt” in the address bar of
the device browser.
16. Notes
Using PhoneGap/Apache Cordova it is possible to upload any kind of file by simply changing
the URI and the MIME type. For a better user experience we could integrate a file browser to
locate and select our desired file from the device’s local file system. For a demonstration on
using a filesystem browser in ADF
At the server side we have used a very simple implementation of an upload page. However,
depending on requirements this upload page might need to be able to read one or more
parameters and involve other complexities. Typically, if we are leveraging Apache and JEE
technology to host our server it is often a popular choice to use Apache HttpClient or
HttpComponents libraries.
References
1. Oracle Fusion Middleware Mobile Developer’s Guide for Oracle Application Development
Framework (http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/toc.htm)
2. PhoneGap API Documentation (http://docs.phonegap.com/en/1.0.0/index.html)
3. Uploading Single File by Using JSP
(http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml)