COSC 2206 Internet Tools. Java Servlets
|
|
- Imre Vörös
- 5 évvel ezelőtt
- Látták:
Átírás
1 COSC 2206 Internet Tools Java Servlets
2 Java Servlets Tomcat Web Application Hello World Servlet Simple Servlets
3 What is a servlet? A servlet is a special Java class that can be loaded by a servlet enabled web server to respond to an HTTP request with an HTTP response. Servlets usually execute in a multi-threaded environment inside a servlet container that is part of the web server. We will use the Jakarta-Tomcat web server 10/26/2004 BGA 3
4 Comparison with CGI Servlets are much more efficient than CGI scripts. Once a servlet is loaded it can efficiently respond to many requests. Each is a separate thread (lightweight process) In CGI each request causes a separate external process to be started in the operating system. 10/26/2004 BGA 4
5 Comparison with CGI Servlets have built-in object-oriented functionality for dealing with the HTTP request and the associated list of namevalue pairs resulting from a form or url submission They have support for cookies They have support for session management They are essentially part of the Web server rather than separate processes. 10/26/2004 BGA 5
6 Comparison with CGI Servlets are portable and use a standard object-oriented API with several packages javax.servlet javax.servlet.http For JSP there are the additional packages javax.servlet.jsp javax.servlet.jsp.tagext 10/26/2004 BGA 6
7 Some Interfaces and Classes Servlet ServletConfig ServletRequest ServletResponse ServletContext HttpSession HttpServletRequest HttpServletResponse interface class implements extends GenericServlet HttpServlet ServletInputStream ServletOutputStream Cookie ServletException 10/26/2004 BGA 7
8 Servlet Life-cycle Servlet Life-cycle Servlet Container Servlet Servlet Servlet A servlet is a class that extends the HttpServlet class 1. Server loads servlet: creates an instance 2. init method is called 3. Servlet instance accepts 0 or more client requests 4. Server calls destroy method and unloads servlet 10/26/2004 BGA 8
9 Servlet/Client interaction (1) client request Servlet Container Servlet Servlet Servlet client request client request Several client requests can be made to the same servlet instance using a thread for each request 10/26/2004 BGA 9
10 Servlet/Client Interaction (2) Servlet doget dopost Server sends an HttpRequest object to the servlet's doget or dopost method. An HttpResponse object is also sent so the servlet can use it for the response client making a GET request client making a GET request client making a POST request 10/26/2004 BGA 10
11 Simple Servlet Template (1) import javax.servlet.*; import javax.servlet.http.*; // other imports public class TemplateServlet extends HttpServlet public void init() // called once when servlet created public void destroy() // called once when servlet is unloaded // continued on next slide 10/26/2004 BGA 11
12 Simple Servlet Template (2) public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException // Handle a GET request here public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException // Handle a POST request here // other methods 10/26/2004 BGA 12
13 HTTPServlet methods (1) public void init() called only once by servlet container just after the servlet is loaded into the servlet container public void destroy() called only once by servlet container just before the servlet is unloaded (removed) from the servlet container Note: HttpServlet extends the GenericServlet class 10/26/2004 BGA 13
14 HTTPServlet methods (2) protected void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException the server (servlet container) calls this method when a client makes a GET request the request object contains information on the request such as parameters and their values this method responds using the response object this method should be thread-safe 10/26/2004 BGA 14
15 HTTPServlet methods (3) protected void dopost(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException the server (servlet container) calls this method when a client makes a POST request in a form. the request object contains information on the request such as form parameters and their values this method responds using the response object this method should be thread-safe 10/26/2004 BGA 15
16 HTTPServlet methods (4) public String getinitparameter(string name) Return a string for the value of an initialization parameter name If no value exists null is returned This method is used to get servlet initialization name-value pairs from the application's web.xml file More on this later 10/26/2004 BGA 16
17 HTTPServlet methods (5) public Enumeration getinitparameternames() Return all the names of the initialization parameters as an enumeration This is useful if you don't know the names. Each name can then be used in the getinitparameter method to get the value. 10/26/2004 BGA 17
18 HttpServlet methods (6) public ServletConfig getservletconfig() Each servlet in a web application has its own ServletConfig object that is used by the servlet container to pass initialization information to the servlet. This initialization information is obtained from the web application's deployment descriptor (Tomcat) : the web.xml file we will see an example later that uses the <servlet> tag in the web.xml file 10/26/2004 BGA 18
19 HttpServlet methods (7) public ServletContext getservletcontext() There is one ServletContext object per web application. It is used for communication between the application's servlets and the servlet container we will see an example later that uses the <context-param> tag in the web.xml file to provide context information. 10/26/2004 BGA 19
20 HttpServletRequest methods String getparameter(string name) get value of the specified parameter Enumeration getparameternames() get all parameter names as a list String[] getparametervalues(name) A parameter may have several values so this method returns all values as a string array There are many other methods 10/26/2004 BGA 20
21 HttpServletResponse methods Servlet receives a response object of this type that it uses to send reply back to the client. Some important methods are void setcontenttype(string type) void setcontentlength(int len) PrintWriter getwriter() ServletOutputStream getoutputstream() addcookie(cookie cookie) sendredirect(string location) 10/26/2004 BGA 21
22 Course web applications The web application called test is used only for the examples in the tomcat install instructions The remaining examples use a web application called c2206 Both of these applications are available as the war files test.war and c2206.war Put these files in webapps directory and tomcat will unpack them after a restart 10/26/2004 BGA 22
23 The HelloWorld servlet (1) import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); 10/26/2004 BGA 23
24 The HelloWorld servlet (2) Send the HTML out.println( document "<html>\n" + "<head>\n" + "<title>hello World</title>\n" + "</head>\n" + "<body>\n" + "<h1>hello World</h1>\n" + "This html document was " + "produced by a servlet.\n" + "</body>\n" + "</html>\n" ); out.close(); 10/26/2004 BGA 24
25 Compiling the servlet (1) Put servlet in the test application directory c:\tomcat\webapps\test\web-inf\classes To compile it use the path and classpath SET PATH=c:\j2sdk1.4.2\bin;%PATH% SET CLASSPATH=.;c:\tomcat\webapps\test\WEB-INF\classes SET CLASSPATH=%CLASSPATH%;c:\tomcat\common\lib\servlet-api.jar Note: we have not put this servlet in a package (it's in default package). In practice most servlets are in named packages. 10/26/2004 BGA 25
26 Compiling the servlet (2) Now use the compiler command from the classes directory: javac HelloWorld.java It is better to make a custom prompt to set the appropriate classpath. Tomcat installation notes show how to do this. 10/26/2004 BGA 26
27 Testing the servlet (2) Since we put the HelloWorld servlet in the default package and didn't define a logical name for it in web.xml we can test it using there is also a version in the mypackage package. It can be tested using lloworld Note this 10/26/2004 BGA 27
28 Testing the servlet (3) We can use the web.xml file to define servlet mappings which allow us to use logical names for our servlet: First define a servlet name in web.xml <servlet> <servlet-name>example1</servlet-name> <servlet-class>helloworld</servlet-class> </servlet> mypackage.helloworld for the package version 10/26/2004 BGA 28
29 Testing the servlet (4) (1) Define a servlet mapping in web.xml <servlet-mapping> <servlet-name>example1</servlet-name> <url-pattern>helloa</url-pattern> </servlet-mapping> Now the following url can be used See Tomcat installation notes 10/26/2004 BGA 29
30 Testing the servlet (5) The order of the tags in web.xml is important: all <servlet> tags must precede all <servlet-mapping> tags Also, when you modify web.xml it is usually necesssary to stop and restart the tomcat server so that it reads the new file. 10/26/2004 BGA 30
31 c2206 web application Now we use the c2206 web application Place a copy of c2206.war in the webapps directory and restart tomcat The c2206.war file will be automatically unpacked into a web app directory called c2206 Now delete the war file in webapps. Why? 10/26/2004 BGA 31
32 Getting Init Parameters (1a) Initialization parameters are specified in the web.xml file using the XML tags <servlet> <servlet-name>initparameterservlet</servlet-name> <servlet-class>simple.initparameterservlet</servlet-class> <init-param> <param-name>message</param-name> <param-value>this is the message in web.xml</param-name> </init-param> </servlet>... <servlet-mapping> <servlet-name>initparameterservlet</servlet-name> <url-pattern>init</url-pattern> </servlet-mapping> 10/26/2004 BGA 32
33 Getting Init Parameters (1b) web.xml file is located in directory c:\tomcat\webapps\c2206\web-inf\ Run the servlet Servlet source code is located in directory c:\tomcat\webapps\c2206\web- INF\classes\simple\InitParameterServlet.java 10/26/2004 BGA 33
34 Getting Init Parameters (2) package simple; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class InitParameterServlet extends HttpServlet private String message; private String defaultmessage = "This is the default message"; 10/26/2004 BGA 34
35 Getting Init Parameters (3) public void init() ServletConfig config = getservletconfig(); message = config.getinitparameter("message"); if (message == null) message = defaultmessage; public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException doget(request, response); A trick for handling GET and POST requests in same way 10/26/2004 BGA 35
36 Getting Init Parameters (4) public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException response.setcontenttype("text/html"); PrintWriter out = new response.getwriter(); out.println( "<html><head><title>" + message + "</title>" + "</head><body>" + "<h1>" + message + "</h1>" + "This HTML document was produced by a servlet" + "</body></html>"); out.close(); 10/26/2004 BGA 36
37 Dynamic Images (1) With Java2D it is easy to write a servlet that generates a dynamic image and returns it to the browser. Java 1.4 has new imageio packages import javax.imageio.*; import javax.imageio.stream.*; The supported types are JPG and PNG (portable network graphics) 10/26/2004 BGA 37
38 Dynamic Images (2) Put HTML file images.html in test directory <html> <head><title>generating Images with Servlets</title> </head> <body> <h1>generating Images with Servlets</h1> <h2>generate a JPEG image dynamically</h2> <img src="servlet/images.imageservlet1" /> <h2>generate a PNG image dynamically</h2> <img src="servlet/images.imageservlet2" /> </body> </html> note how servlets are referenced 10/26/2004 BGA 38
39 Dynamic Images (3) Try it 10/26/2004 BGA 39
40 Source code ImageServlet1 and ImageServlet2 are located in directory c:\tomcat\webapps\c2206\web- INF\classes\images Source code ImageServlet1.java ImageServlet2.java 10/26/2004 BGA 40
41 ImageServlet1.java (1) package images; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.awt.*; import java.awt.geom.*; import java.awt.image.*; import javax.imageio.*; import javax.imageio.stream.*; 10/26/2004 BGA 41
42 ImageServlet1.java (2) public class ImageServlet1 extends HttpServlet public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException // Make a simple image object BufferedImage image = new BufferedImage(100, 100,BufferedImage.TYPE_INT_RGB); Graphics2D g2d = (Graphics2D) image.getgraphics(); 10/26/2004 BGA 42
43 ImageServlet1.java (3) g2d.setcolor(color.yellow); Rectangle2D rect = new Rectangle2D.Double(25,25,50,50); g2d.fill(rect); g2d.dispose(); // Send image in JPEG format to browser ImageIO.setUseCache(false); // important OutputStream out = response.getoutputstream(); response.setcontenttype("image/jpeg"); ImageIO.write(image, "jpg", out); out.close(); 10/26/2004 BGA 43
44 ImageServlet2.java Replace by response.setcontenttype("image/jpeg"); ImageIO.write(image, "jpg", out); response.setcontenttype("image/png"); ImageIO.write(image, "png", out); in ImageServlet1 to get PNG output 10/26/2004 BGA 44
45 Getting client parameters (1) Client information is sent to the server as a sequence of name-value pairs This is done either using a get request with a query string of name value pairs or by submitting an HTML form of name-value pairs. The servlet receives these pairs as part of an HttpServletRequest object. 10/26/2004 BGA 45
46 Getting client parameters (2) getparameter can be used if name is known and there's only one value for the parameter Example: suppose that request is an HttpServletRequest object and that "name" and "age" are parameters: String name = request.getparameter("name"); String age = request.getparameter("age"); Note: values are always returned as strings 10/26/2004 BGA 46
47 Getting client parameters (3) If a parameter has no value or there is no parameter with the specified name then null is returned so we can check using String name = request.getparameter("name"); if (name == null) // didn't get parameter or name else // parameter exists and has a value 10/26/2004 BGA 47
48 Getting client parameters (4) Getting list of single-valued parameters Enumeration names = request.getparameternames(); if (names.hasmoreelements())... while (names.hasmoreelements()) String name = (String) names.nextelement(); String value = request.getparameter(name); // do something with name and value here else // there were no parameters in request 10/26/2004 BGA 48
49 Getting client parameters (5) Getting list of multiple-valued parameters. Use the following while loop while (names.hasmoreelements()) String name = (String) names.nextelement(); String[] values = request.getparametervalues(name); for (int i = 0; i < values.length; i++) // do something with the ith parameter with // this name 10/26/2004 BGA 49
50 Examples (1) test/servlet/simple.getrequestparameters0 getting two specific parameters =34 Source code: GetRequestParameters0.java test/servlet/simple.getrequestparameters1 using getparameternames and getparameter in single valued case stone&age=34 ice=perl Source code: GetRequestParameters1.java 10/26/2004 BGA 50
51 Examples (2) test/servlet/simple.getrequestparameters2 multiple valued case using getparametervalues Java&choice=Perl Source code: GetRequestParameters2.java 10/26/2004 BGA 51
52 GetRequestParameters0 package simple; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class GetRequestParameters0 extends HttpServlet public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); // Display HTML header 10/26/2004 BGA 52
53 GetRequestParameters0 // Display HTML header out.println("<html>" + "<head>\n" + "<title>get Request Parameters</title>\n" + "</head>\n" + "<body\n" + "<h1>get Request Parameters</h1>\n" ); // Get the parameters explicitly String name = request.getparameter("name"); String age = request.getparameter("age"); 10/26/2004 BGA 53
54 GetRequestParameters0 if (name == null) out.println("name was not specified<br>\n"); else if (name.equals("")) out.println("value for name not specified<br>"); else out.println("value of name is " + name + "<br>"); if (age == null) out.println("age was not specified<br>\n"); else if (age.equals("")) out.println("value of age not specified<br>"); else out.println("value of age is " + age + "\n"); out.println("</body>\n</html>\n"); out.close(); 10/26/2004 BGA 54
55 GetRequestParameters1 package simple; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class GetRequestParameters1 extends HttpServlet public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); // Display HTML header 10/26/2004 BGA 55
56 GetRequestParameters1 // Display HTML header out.println("<html>" + "<head>\n" + "<title>get Request Parameters (single values</title>\n" + "</head>\n" + "<body\n" + "<h1>get Request Parameters (single values</h1>\n" ); 10/26/2004 BGA 56
57 GetRequestParameters1 // Get an enumeration of all the request // parameter names Enumeration parameternames = request.getparameternames(); // Display table header if (parameternames.hasmoreelements()) out.println( "<table border=\"1\">\n" + "<tr>\n" + "<th>parameter Name</th>\n" + "<th>parameter Value</th>\n" + "</tr>\n" ); 10/26/2004 BGA 57
58 GetRequestParameters1 // Iterate through the list and display the // parameter names and values while (parameternames.hasmoreelements()) String parametername = (String) parametername.nextelement(); out.println( "<tr>\n" + "<td>" + parametername + "</td>\n" + "<td>" + request.getparameter(parametername) + "</td>\n</tr>" ); 10/26/2004 BGA 58
59 GetRequestParameters1 else out.println("no parameters were specified"); out.println("</body></html>\n"); out.close(); 10/26/2004 BGA 59
60 GetRequestParameters2 package simple; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class GetRequestParameters2 extends HttpServlet public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); // Display HTML header 10/26/2004 BGA 60
61 GetRequestParameters2 // Display HTML header out.println("<html>" + "<head>\n" + "<title>get Request Parameters (multiple values</title>\n" + "</head>\n" + "<body\n" + "<h1>get Request Parameters (multiple values</h1>\n" ); 10/26/2004 BGA 61
62 GetRequestParameters2 // Get an enumeration of all the request // parameter names Enumeration parameternames = request.getparameternames(); // Display table header if (parameternames.hasmoreelements()) out.println( "<table border=\"1\">\n" + "<tr>\n" + "<th>parameter Name</th>\n" + "<th>parameter Value</th>\n" + "</tr>\n" ); 10/26/2004 BGA 62
63 GetRequestParameters2 // Iterate through the list and display the // parameter names and values while (parameternames.hasmoreelements()) String parametername = (String) parametername.nextelement(); // Get multiple values if any and put them // together in colon separated string String[] values = request.getparametervalues(parametername); String list = ""; for (int i=0; i < values.length; i++) if (i == 0) list = values[0]; else list = list + ":" + values[i]; 10/26/2004 BGA 63
64 GetRequestParameters2 out.println( "<tr>\n" + "<td>" + parametername + "</td>n" + "<td>" + list + "</td>\n" + "</tr>" ); out.println("</table>\n"); else out.println("no parameters were specified"); out.println("</body>\n</html>\n"); out.close(); 10/26/2004 BGA 64
65 Accessing the request headers Use getheadernames() to return the header names as an Enumeration Use getheader(name) to return the value of the header with the given name There are also get methods that retrieve the CGI type parameters fred Source code: ShowRequestHeaders.java 10/26/2004 BGA 65
66 ShowRequestHeaders package simple; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class ShowRequestHeaders extends HttpServlet public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException doget(request, response); 10/26/2004 BGA 66
67 ShowRequestHeaders public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println( "<html><head>\n" + "<title>servlet Request Headers</title>\n" + "<style type=\"text/css\">\n" + ".color background-color: #CCCCCC;\n" + "</style>\n" + "</head>\n" + "<h1>servlet Request Headers</h1>\n" 10/26/2004 BGA 67
68 ShowRequestHeaders + "<b>request Method: </b>" + request.getmethod() + "<br>\n" + "<b>request PRotocol: </b>" + request.getprotocol() + "<br>\n" + "<b>auth Type: </b>" + request.getauthtype() + "<br>\n" + "<b>request URI: </b>" + request.getrequesturi() + "<br>\n" + "<b>request URL: </b>" + request.getrequesturl() + "<br>\n" + "Servlet Path: </b>" + request.getservletpath() + "<br>\n" + "Context Path: </b>" + request.getcontextpath() + "<br>\n" + "Path Info: </b>" + request.getpathinfo() 10/26/2004 BGA 68
69 ShowRequestHeaders ); + "<br>\n" + "<b>path Translated: </b>" + request.getpathtranslated() + "<br>\n" + "Query String: </b>" + request.getquerystring() + "<br>\n" + "<b>remote User: </b>" + request.getremoteuser() + "<br>\n" + "<table border=\"1\">\n" + "<tr class=\"color\">header Name</th>\n" + "<th class=\"color\">header Values</th>\n" + "</tr>\n" 10/26/2004 BGA 69
70 ShowRequestHeaders Enumeration headernames = request.getheadernames(); while (headernames.hasmoreelements()) String headername = (String) headernames.nextelement(); out.println( "<tr>\n" + "<td>" + headername + "</td>\n" + "<td>" + request.getheader(headername) + "</td>\n<\tr>" ); out.println("</table>\n</body>\n</html>"); out.close(); 10/26/2004 BGA 70
71 COSC 2206 Internet Tools Java Servlets Simple Form Processing
72 Form Processing with GET <html> <head><title>processing form with GET</title></head> <body> <h1>processing form with GET</h1> <form action="servlet/forms.doformservlet1" method="get"> First name: <input type="text" name="firstname"><br> Last name: <input type="text" name="lastname"> <p><input type="submit" name="button" value="submit Name"></p> </form></body></html> LOGICAL NAME form1 CAN ALSO BE USED (see web.xml) 10/26/2004 BGA 72
73 Form Processing with POST <html> <head><title>processing form with POST</title></head> <body> <h1>processing form with GET</h1> <form action="servlet/forms.doformservlet1" method="post"> First name: <input type="text" name="firstname"><br> Last name: <input type="text" name="lastname"> <p><input type="submit" name="button" value="submit Name"></p> </form></body></html> LOGICAL NAME form1 CAN ALSO BE USED (see web.xml) 10/26/2004 BGA 73
74 DoFormServlet1 public void dopost(...) doget(request, response); public void doget(...)... String firstname = request.getparameter("firstname"); String lastname = request.getparameter("lastname"); if (firstname == null) firstname = ""; if (lastname == null) lastname = ""; // Display page here showing parameter values DoFormServlet1.java /26/2004 BGA 74
75 Generate form with servlet The servlet can both generate the form and process it. The logic is IF button value is defined THEN process form and display output page ELSE display the page containing the form ENDIF /26/2004 BGA 75
76 DoFormServlet2 public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException doget(request, response); public void doget(httpservletrequest request, HttpServletResponse response) throws IOException String button = request.getparameter("button"); if (button!= null) displayoutputpage(request, response); else displayformpage(request, response); 10/26/2004 BGA 76
77 DoFormServlet2 public void displayoutputpage(httpservletrequest request, HttpServletResponse response) throws IOException String firstname = request.getparameter("firstname"); String lastname = request.getparameter("lastname"); if (firstname == null) firstname.equals("")) firstname = "null"; if (lastname == null) lastname.equals("")) lastname = "null"; String self = request.getrequesturi(); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); 10/26/2004 BGA 77
78 DoFormServlet2 out.println( "<html>\n" + "<head><title>formresults</title></head>\n" + "<body>\n" + "<h1>form Results</h1>\n" + "Hello " + firstname + " " + lastname + "<br />\n" + "The request URI is " + self + "\n" + "</body>\n" + "</html>\n" ); 10/26/2004 BGA 78
79 DoFormServlet2 public void displayformpage(httpservletrequest request, HttpServletResponse response) throws IOException String self = request.getrequesturi(); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); 10/26/2004 BGA 79
80 DoFormServlet2 out.println("<html>\n" + "<head><title>forms, Version 2</title></head>\n" + "<body>\n<h1>forms, Version 1</h1>\n" + "<form action=\"" + self + "\" method=\"post\"\n" + "First name: <input type=\"text\"" + "name=\"firstname\" /><br>\n" + "Last name: <input type=\"text\"" + "name=\"lastname\" />\n" + "<p><input type=\"submit\" name=\"button\"" + "value=\"submit Name\"/></p>\n" + "</form>\n</body>\n</html>\n" ); /26/2004 BGA 80
81 Using two buttons Alternate choices can be made by having more than one submit button IF button1 was clicked THEN display page1 ELSIF button2 was clicked THEN display page2 ELSE display form page ENDIF /26/2004 BGA 81
82 DoFormServlet3 public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException doget(request, response); public void doget(httpservletrequest request, HttpServletResponse response) throws IOException String button1 = request.getparameter("button1"); String button2 = request.getparameter("button2"); if (button1!= null) displaypage1(request, response); else if (button2!= null) displaypage2(request, response); else displayformpage(request, response); 10/26/2004 BGA 82
83 DoFormServlet3 public void displaypage1(httpservletrequest request, HttpServletResponse response) throws IOException String firstname = request.getparameter("firstname"); String lastname = request.getparameter("lastname"); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>\n" + "<head><title>form Results</title></head>\n" + "<body>\n" + "<h1>form Results</h1>\n" + "Hello " + firstname + " " + lastname + "<br />\n"); out.println("you clicked the first button<br />\n"); out.println("</body>\n"); out.println("</html>\n"); 10/26/2004 BGA 83
84 DoFormServlet3 public void displaypage2(httpservletrequest request, HttpServletResponse response) throws IOException String firstname = request.getparameter("firstname"); String lastname = request.getparameter("lastname"); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>\n" + "<head><title>form Results</title></head>\n" + "<body>\n" + "<h1>form Results</h1>\n" + "Hello " + firstname + " " + lastname + "<br />\n"); out.println("you clicked the second button<br />\n"); out.println("</body>\n"); out.println("</html>\n"); 10/26/2004 BGA 84
85 DoFormServlet3 public void displayformpage(httpservletrequest request, HttpServletResponse response) throws IOException String self = request.getrequesturi(); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println( "<html>\n" + "<head><title>forms, Version 3</title></head>\n" + "<body>\n" + "<h1>forms, Version 3</h1>\n" + "In this version the form is generated by the " + "Servlet and there are two buttons and we need" + " to determine which one was clicked.\n" 10/26/2004 BGA 85
86 DoFormServlet3 + "<form action=\"" + self + "\" method=\"post\">" + "First name: <input type=\"text\" + "name=\"firstname\" />\n" + "Last name: <input type=\"text\" + "name=\"lastname\" />\n" + "<p><input type=\"submit\" name=\"button1\" + "value=\"submit Name 1\" />\n" + "<input type=\"submit\" name=\"button2\" + " "value=\"submit Name 2\" />\n" + "</form>\n<\body>\n<\html\n" ); DoFormServlet3.java 10/26/2004 BGA 86
87 Error checking on forms Can use regular expressions to check form data IF there are errors display an error message and redisplay the form showing the data that has been entered Forms like this are called sticky forms: they remember the previous values entered and display them in the form /26/2004 BGA 87
88 DoFormServlet4 public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException doget(request, response); public void doget(httpservletrequest request, HttpServletResponse response) throws IOException String button = request.getparameter("button"); if (button!= null) processform(request, response); else displayformpage(request, response, ""); 10/26/2004 BGA 88
89 DoFormServlet4 public void processform(httpservletrequest request, HttpServletResponse response) throws IOException String error = validateform(request); if (! error.equals("")) displayformpage(request, response, error); else displayoutputpage(request, response); 10/26/2004 BGA 89
90 DoFormServlet4 public String validateform(httpservletrequest request) String firstname = request.getparameter("firstname"); String lastname = request.getparameter("lastname"); firstname = (firstname == null)? "" : firstname; lastname = (lastname == null)? "" : lastname; String error = ""; Pattern p = Pattern.compile("^[a-zA-Z-']+$"); Matcher m1 = p.matcher(firstname); Matcher m2 = p.matcher(lastname); if (! m1.matches()) error += "First name invalid..."; if (! m2.matches()) error += "Last name invalid..."; return error; 10/26/2004 BGA 90
91 DoFormServlet4 public void displayformpage(httpservletrequest request, HttpServletResponse response) throws IOException String self = request.getrequesturi(); String firstname = request.getparameter("firstname"); String lastname = request.getparameter("lastname"); firstname = (firstname == null)? "" : firstname; lastname = (lastname == null)? "" : lastname; response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>\n" + "<head><title>forms, Version 4</title></head>\n" + "<body>\n" + "<h1>forms, Version 4</h1>\n" 10/26/2004 BGA 91
92 DoFormServlet4 + "In this version the form is generated by the " + "Servlet using error checking and sticky forms.\n" + "<p>" + error + "</p>\n" + "<form action=\"" + self + "\" method=\"post\">\n" + "First name: <input type=\"text\"" + "name=\"firstname\" " + "value=\"" + firstname + "\" /><br />\n" + "Last name: <input type=\"text\"" + "name=\"lastname\" " + "value=\"" + lastname + "\" /><br />\n" + "<p><input type=\"submit\" name=\"button\" " + "value=\"submit Name\" /></p>\n" + "</form>\n</body>\n<\html>" ); 10/26/2004 BGA 92
93 DoFormServlet4 public void displayoutputpage(httpservletrequest request, HttpServletResponse response) throws IOException String firstname = request.getparameter("firstname"); String lastname = request.getparameter("lastname"); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println("<html>\n<head><title>form Results " + "</title>\n</head>\n<body>\n" + "<h1>form Results</h1>\n" + "Hello " + firstname + " " + lastname + "<br />\n" + "</body>\n</html>\n" ); DoFormServlet4.java 10/26/2004 BGA 93
94 Reg Expressions in Java (1) Java has regular expressions An import statement is needed import java.util.regex.*; To use them create a string regexp representing the regular expression then define a target string and use Pattern p = Pattern.compile(regexp); Matcher m = p.matcher(target); 10/26/2004 BGA 94
95 Reg Expressions in Java (2) The Matcher object m has 3 methods matches() check for a match of the entire regex in target, return true if there is a match. lookingat() try to find match by searching from beginning of the target string find() iterator to find all matches of regex in target 10/26/2004 BGA 95
96 Reg Expressions in Java (3) If a pattern is used more than once use Pattern p = Pattern.compile(regexp); Matcher m = p.matcher(target); if (m.matches())... else... m.lookingat() m.find() 10/26/2004 BGA 96
97 Reg Expressions in Java (4) If a pattern is used just once use if (Pattern.matches(regexp, target))... else... lookingat(regexp, target) find(regexp, target) 10/26/2004 BGA 97
98 RegExp test application /26/2004 BGA 98
99 RegExp public void doget(httpservletrequest request, HttpServletResponse response) throws IOExeception, ServletException String self = request.getrequesturi(); String regexp = request.getparameter("regexp"); String target = request.getparameter("target"); if (regexp == null) regexp = ""; if (target == null) target = ""; out.println( // html goes here // the three buttons have names matches, // loolingat, and find ); 10/26/2004 BGA 99
100 RegExp Pattern p = Pattern.compile(regexp); Matcher m = p.matcher(target); if (request.getparameter("matches")!= null) if (m.matches()) out.println(...); else out.println(...); if (request.getparameter("lookingat")!= null) if (m.lookingat()) out.println(...); else out.println(...); 10/26/2004 BGA 100
101 RegExp if (request.getparameter("find")!= null) out.println("<p>"); while (m.find()) out.println("<b>find: Found a match</b><br>"); out.println("</body>\n</html>\n"); out.close(); RegExp.java 10/26/2004 BGA 101
102 Detecting form submission (1) Form submission can be detected using the GET request method. To do this specify POST as the method in the form. If the servlet receives a GET request then the form should be displayed If the servlet receives a POST request then the form has just been submitted /26/2004 BGA 102
103 Temperature1 Conversion public class Temperature1 extends HttpServlet public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException // URL was submitted so display form String self = request.getrequesturi(); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println( // display page with form with fahrenheit // input field ands submit button called convert // form method is set to POST ); 10/26/2004 BGA 103
104 Temperature1 Conversion public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException // form was submitted so get temperature double fahr = 0.0; try fahr = Double.parseDouble( request.getparameter("fahrenheit")); catch (NumberFormatException e) // use default temp in case of error 10/26/2004 BGA 104
105 Temperature1 Conversion double celsius = (fahr ) * (5.0/9.0); DecimalFormat two = new DecimalFormat("0.00"); String self = request.getrequesturi(); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); out.println( // display output page with converted temp // and link to do another calculation using "<a href=\"" + self + "\a>another conversion</a>" ); Temperature1.java 10/26/2004 BGA 105
106 Detecting form submission (2) Form submission can be detected using a button Determine if button named "button" is clicked: String buttonvalue = request.getparameter("button"); if (buttonvalue == null) // button was not clicked else // button was clicked /26/2004 BGA 106
107 Temperature2 Conversion public class Temperature2 extends HttpServlet public void doget(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException // URL was submitted so display form String self = request.getrequesturi(); response.setcontenttype("text/html"); PrintWriter out = response.getwriter(); 10/26/2004 BGA 107
108 Temperature2 Conversion if (request.getparameter("calculate") == null) // display the form else // display output and new calculation link public void dopost(httpservletrequest request, HttpServletResponse response) throws IOException, ServletException doget(request, response); Temperature2.java 10/26/2004 BGA 108
Bevezető. Servlet alapgondolatok
A Java servlet technológia Fabók Zsolt Ficsor Lajos Általános Informatikai Tanszék Miskolci Egyetem Utolsó módosítás: 2008. 03. 06. Servlet Bevezető Igény a dinamikus WEB tartalmakra Előzmény: CGI Sokáig
Web-fejlesztés NGM_IN002_1
Web-fejlesztés NGM_IN002_1 Dinamikus tartalom 2. Servletek Java Servletek Szerver oldali alkalmazások Java nyelven szerver funkcionalitásának kiterjesztése dinamikus és interaktív tartalom el!állításra
Hello World Servlet. Készítsünk egy szervletet, amellyel összeadhatunk két számot, és meghívásakor üdvözlőszöveget ír a konzolra.
Hello World Servlet Készítsünk egy szervletet, amellyel összeadhatunk két számot, és meghívásakor üdvözlőszöveget ír a konzolra. Hozzunk létre egy Dynamic Web projectet File New Other itt a következőket
Java technológiák - ANTAL Margit. komponensek. A HTTP protokoll. Webkonténerek és szervletek. Egyszerű HTTP. ANTAL Margit.
Sapientia - EMTE 2010 A célja A viselkedése Megjelenítés komponenstípusok Adatok megjelenítése: grafikonok, táblázatok Űrlapok Navigációs elemek: menük, hiperlinkek Informácios képernyők: útbaigazítások,
JEE tutorial. Zsíros Levente, 2012
JEE tutorial Zsíros Levente, 2012 A J2EE részei Webkonténer Szervletek JSP oldalak EJB (Enterprise Java Bean) konténer Session Bean Entity Bean (Java Persistence API-t használják) A Glassfish és JBoss
Széchenyi István Egyetem www.sze.hu/~herno
Oldal: 1/6 A feladat során megismerkedünk a C# és a LabVIEW összekapcsolásának egy lehetőségével, pontosabban nagyon egyszerű C#- ban írt kódból fordítunk DLL-t, amit meghívunk LabVIEW-ból. Az eljárás
Web-fejlesztés NGM_IN002_1
Web-fejlesztés NGM_IN002_1 Dinamikus tartalom 3. Template feldolgozás Template feldolgozás Statikus (HTML) fájlok dinamikus tartalom beszúrással (speciális tagek) Template processzor PHP Cold Fusion ASP
A WEB programozása - JSP1 dr.gál Tibor. 2010. őszi félév
Általános jellemzők JavaServer Pages (JSP) Java utasításokat helyezetünk el a HTML lapon Ezket a Java utasításokat a kiszolgáló végrehajtja Az ügyfél felé generált tartalom: statikus HTML kód + Java utasítások
Using the CW-Net in a user defined IP network
Using the CW-Net in a user defined IP network Data transmission and device control through IP platform CW-Net Basically, CableWorld's CW-Net operates in the 10.123.13.xxx IP address range. User Defined
Java Servlet technológia
Java Servlet technológia Servlet Java osztály, megvalósítja a Servlet interfészt Kérés-válasz (request-response) modellre épül, leginkább web-kérések kiszolgálására használjuk A Servlet technológia http-specifikus
Webfejlesztés alapjai
Webfejlesztés alapjai Óbudai Egyetem, Java Programozás Mérnök-informatikai kar Labor 7 Bedők Dávid 2016.12.01. v0.9 Webfejlesztés A mai világban szinte minden "programozás iránt érdeklődő" 14 éves "webprogramozó".
Proxer 7 Manager szoftver felhasználói leírás
Proxer 7 Manager szoftver felhasználói leírás A program az induláskor elkezdi keresni az eszközöket. Ha van olyan eszköz, amely virtuális billentyűzetként van beállítva, akkor azokat is kijelzi. Azokkal
Symfony kurzus 2014/2015 I. félév. Controller, Routing
Symfony kurzus 2014/2015 I. félév Controller, Routing Request - Response GET / HTTP/1.1 Host: xkcd.com Accept: text/html User-Agent: Mozilla/5.0 (Macintosh) HTTP/1.1 200 OK Date: Sat, 02 Apr 2011 21:05:05
T Á J É K O Z T A T Ó. A 1108INT számú nyomtatvány a http://www.nav.gov.hu webcímen a Letöltések Nyomtatványkitöltő programok fülön érhető el.
T Á J É K O Z T A T Ó A 1108INT számú nyomtatvány a http://www.nav.gov.hu webcímen a Letöltések Nyomtatványkitöltő programok fülön érhető el. A Nyomtatványkitöltő programok fület választva a megjelenő
JavaServer Pages (JSP) (folytatás)
JavaServer Pages (JSP) (folytatás) MVC architektúra a Java kiszolgálón Ügyfél (Böngésző) 5 View elküldi az oldal az ügyfélez View (JSP) Ügyfél üzenet küldése a vezérlőnek 1 3 4 Kérelem továbbítása a megjelenítőnek
Angol Középfokú Nyelvvizsgázók Bibliája: Nyelvtani összefoglalás, 30 kidolgozott szóbeli tétel, esszé és minta levelek + rendhagyó igék jelentéssel
Angol Középfokú Nyelvvizsgázók Bibliája: Nyelvtani összefoglalás, 30 kidolgozott szóbeli tétel, esszé és minta levelek + rendhagyó igék jelentéssel Timea Farkas Click here if your download doesn"t start
discosnp demo - Peterlongo Pierre 1 DISCOSNP++: Live demo
discosnp demo - Peterlongo Pierre 1 DISCOSNP++: Live demo Download and install discosnp demo - Peterlongo Pierre 3 Download web page: github.com/gatb/discosnp Chose latest release (2.2.10 today) discosnp
Mapping Sequencing Reads to a Reference Genome
Mapping Sequencing Reads to a Reference Genome High Throughput Sequencing RN Example applications: Sequencing a genome (DN) Sequencing a transcriptome and gene expression studies (RN) ChIP (chromatin immunoprecipitation)
Teszt topológia E1/1 E1/0 SW1 E1/0 E1/0 SW3 SW2. Kuris Ferenc - [HUN] Cisco Blog -
VTP Teszt topológia E1/1 E1/0 SW1 E1/0 E1/0 SW2 SW3 2 Alap konfiguráció SW1-2-3 conf t interface e1/0 switchport trunk encapsulation dot1q switchport mode trunk vtp domain CCIE vtp mode transparent vtp
SQL/PSM kurzorok rész
SQL/PSM kurzorok --- 2.rész Tankönyv: Ullman-Widom: Adatbázisrendszerek Alapvetés Második, átdolgozott kiadás, Panem, 2009 9.3. Az SQL és a befogadó nyelv közötti felület (sormutatók) 9.4. SQL/PSM Sémában
Utasítások. Üzembe helyezés
HASZNÁLATI ÚTMUTATÓ Üzembe helyezés Utasítások Windows XP / Vista / Windows 7 / Windows 8 rendszerben történő telepítéshez 1 Töltse le az AORUS makróalkalmazás telepítőjét az AORUS hivatalos webhelyéről.
1. Gyakorlat: Telepítés: Windows Server 2008 R2 Enterprise, Core, Windows 7
1. Gyakorlat: Telepítés: Windows Server 2008 R2 Enterprise, Core, Windows 7 1.1. Új virtuális gép és Windows Server 2008 R2 Enterprise alap lemez létrehozása 1.2. A differenciális lemezek és a két új virtuális
Biztonság java web alkalmazásokban
Biztonság java web alkalmazásokban Webalkalmazások fejlesztése tananyag Krizsán Zoltán 1 [2012. május 9.] 1 Általános Informatikai Tanszék Miskolci Egyetem 2012. május 9. Krizsán Zoltán [2012. május 9.]
KN-CP50. MANUAL (p. 2) Digital compass. ANLEITUNG (s. 4) Digitaler Kompass. GEBRUIKSAANWIJZING (p. 10) Digitaal kompas
KN-CP50 MANUAL (p. ) Digital compass ANLEITUNG (s. 4) Digitaler Kompass MODE D EMPLOI (p. 7) Boussole numérique GEBRUIKSAANWIJZING (p. 0) Digitaal kompas MANUALE (p. ) Bussola digitale MANUAL DE USO (p.
Construction of a cube given with its centre and a sideline
Transformation of a plane of projection Construction of a cube given with its centre and a sideline Exercise. Given the center O and a sideline e of a cube, where e is a vertical line. Construct the projections
Csatlakozás a BME eduroam hálózatához Setting up the BUTE eduroam network
Csatlakozás a BME eduroam hálózatához Setting up the BUTE eduroam network Table of Contents Windows 7... 2 Windows 8... 6 Windows Phone... 11 Android... 12 iphone... 14 Linux (Debian)... 20 Sebők Márton
10. Gyakorlat: Alkalmazások publikálása Remote Desktop Szervízen keresztül
10. Gyakorlat: Alkalmazások publikálása Remote Desktop Szervízen keresztül 10.1. Jogosultságok és csoportok létrehozása 10.2. Az RDS szerver szerepkör telepítése a DC01-es szerverre 10.3. Az RDS01-es szerver
4. Gyakorlat: Csoportházirend beállítások
4. Gyakorlat: Csoportházirend beállítások 4.1. A Default Domain Policy jelszóra vonatkozó beállításai 4.2. Parancsikon, mappa és hálózati meghajtó megjelenítése csoport házirend segítségével 4.3. Alkalmazások
Stateless Session Bean
Stateless Session Bean Készítsünk egy stateless session bean-t, amellyel összeadhatunk két számot. Hozzunk létre egy Dynamic Web projectet File New Other itt a következőket kell választani: Web Dynamic
Cloud computing. Cloud computing. Dr. Bakonyi Péter.
Cloud computing Cloud computing Dr. Bakonyi Péter. 1/24/2011 1/24/2011 Cloud computing 2 Cloud definició A cloud vagy felhő egy platform vagy infrastruktúra Az alkalmazások és szolgáltatások végrehajtására
Phenotype. Genotype. It is like any other experiment! What is a bioinformatics experiment? Remember the Goal. Infectious Disease Paradigm
It is like any other experiment! What is a bioinformatics experiment? You need to know your data/input sources You need to understand your methods and their assumptions You need a plan to get from point
Correlation & Linear Regression in SPSS
Petra Petrovics Correlation & Linear Regression in SPSS 4 th seminar Types of dependence association between two nominal data mixed between a nominal and a ratio data correlation among ratio data Correlation
JAVA webes alkalmazások
JAVA webes alkalmazások Java Enterprise Edition a JEE-t egy specifikáció definiálja, ami de facto szabványnak tekinthető, egy ennek megfelelő Java EE alkalmazásszerver kezeli a telepített komponensek tranzakcióit,
SOPHOS simple + secure. A dobozba rejtett biztonság UTM 9. Kókai Gábor - Sophos Advanced Engineer Balogh Viktor - Sophos Architect SOPHOS
SOPHOS simple + secure A dobozba rejtett biztonság UTM 9 Kókai Gábor - Sophos Advanced Engineer Balogh Viktor - Sophos Architect SOPHOS SOPHOS simple + secure Megint egy UTM? Egy újabb tűzfal extrákkal?
WCF, Entity Framework, ASP.NET, WPF 1. WCF service-t (adatbázissal Entity Framework) 2. ASP.NET kliens 3. WPF kliens
WCF, Entity Framework, ASP.NET, WPF 1. WCF service-t (adatbázissal Entity Framework) 2. ASP.NET kliens 3. WPF kliens Hozzunk létre egy ASP.NET Empty Web Site projektet! A projekt neve legyen WCFAPP1. Ez
Eladni könnyedén? Oracle Sales Cloud. Horváth Tünde Principal Sales Consultant 2014. március 23.
Eladni könnyedén? Oracle Sales Cloud Horváth Tünde Principal Sales Consultant 2014. március 23. Oracle Confidential Internal/Restricted/Highly Restricted Safe Harbor Statement The following is intended
Create & validate a signature
IOTA TUTORIAL 7 Create & validate a signature v.0.0 KNBJDBIRYCUGVWMSKPVA9KOOGKKIRCBYHLMUTLGGAV9LIIPZSBGIENVBQ9NBQWXOXQSJRIRBHYJ9LCTJLISGGBRFRTTWD ABBYUVKPYFDJWTFLICYQQWQVDPCAKNVMSQERSYDPSSXPCZLVKWYKYZMREAEYZOSPWEJLHHFPYGSNSUYRZXANDNQTTLLZA
Interaktív weboldalak készítése
Java programozási nyelv 2007-2008/ősz 7. óra Interaktív weboldalak készítése XHTML form Adatok feldolgozása szervletekkel legradi.gabor@nik.bmf.hu szenasi.sandor@nik.bmf.hu Interaktív weboldalak készítése
16F628A megszakítás kezelése
16F628A megszakítás kezelése A 'megszakítás' azt jelenti, hogy a program normális, szekvenciális futása valamilyen külső hatás miatt átmenetileg felfüggesztődik, és a vezérlést egy külön rutin, a megszakításkezelő
Java programozási nyelv 2007-2008/ősz 9. óra. Java Server Pages. JSP technika alapjai
Java programozási nyelv 2007-2008/ősz 9. óra Java Server Pages JSP technika alapjai legradi.gabor@nik.bmf.hu szenasi.sandor@nik.bmf.hu Java Server Pages Témakörök JSP architektúra Scriptletek elhelyezése
Cloud computing Dr. Bakonyi Péter.
Cloud computing Dr. Bakonyi Péter. 1/24/2011 Cloud computing 1/24/2011 Cloud computing 2 Cloud definició A cloud vagy felhő egy platform vagy infrastruktúra Az alkalmazások és szolgáltatások végrehajtására
JNDI - alapok. Java Naming and Directory Interface
JNDI - alapok Java Naming and Directory Interface Naming Service Naming service: nevek hozzárendelése objektumokhoz, elérési lehetőség (objektumok/szolgáltatások lokalizálása), információk központosított
USER MANUAL Guest user
USER MANUAL Guest user 1 Welcome in Kutatótér (Researchroom) Top menu 1. Click on it and the left side menu will pop up 2. With the slider you can make left side menu visible 3. Font side: enlarging font
Can/be able to. Using Can in Present, Past, and Future. A Can jelen, múlt és jövő idejű használata
Can/ Can is one of the most commonly used modal verbs in English. It be used to express ability or opportunity, to request or offer permission, and to show possibility or impossibility. A az egyik leggyakrabban
PHP alapjai, bevezetés. Vincze Dávid Miskolci Egyetem, IIT
alapjai, bevezetés Vincze Dávid Miskolci Egyetem, IIT vincze.david@iit.uni-miskolc.hu PHP Personal Home Page (Tools) Script nyelv -> interpretált Elsősorban weboldal (dinamikus) tartalmak előállítására
ios alkalmazásfejlesztés Koltai Róbert
ios alkalmazásfejlesztés Koltai Róbert robert.koltai@ponte.hu Mi az a block? Utasítások sorozata { }-ek között, amit egy objektumként tuduk kezelni. ios 4.0 és Mac OSX 10.6 óta 2 Egy példa a felépítésére
(Asking for permission) (-hatok/-hetek?; Szabad ni? Lehet ni?) Az engedélykérés kifejezésére a következő segédigéket használhatjuk: vagy vagy vagy
(Asking for permission) (-hatok/-hetek?; Szabad ni? Lehet ni?) SEGÉDIGÉKKEL Az engedélykérés kifejezésére a következő segédigéket használhatjuk: vagy vagy vagy A fenti felsorolásban a magabiztosság/félénkség
Cluster Analysis. Potyó László
Cluster Analysis Potyó László What is Cluster Analysis? Cluster: a collection of data objects Similar to one another within the same cluster Dissimilar to the objects in other clusters Cluster analysis
EN United in diversity EN A8-0206/419. Amendment
22.3.2019 A8-0206/419 419 Article 2 paragraph 4 point a point i (i) the identity of the road transport operator; (i) the identity of the road transport operator by means of its intra-community tax identification
ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA I. VIZSGÁZTATÓI PÉLDÁNY
ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA I. VIZSGÁZTATÓI PÉLDÁNY A feladatsor három részbol áll 1. A vizsgáztató társalgást kezdeményez a vizsgázóval. 2. A vizsgázó egy szituációs feladatban vesz részt a
On The Number Of Slim Semimodular Lattices
On The Number Of Slim Semimodular Lattices Gábor Czédli, Tamás Dékány, László Ozsvárt, Nóra Szakács, Balázs Udvari Bolyai Institute, University of Szeged Conference on Universal Algebra and Lattice Theory
Website review acci.hu
Website review acci.hu Generated on September 30 2016 21:54 PM The score is 37/100 SEO Content Title Acci.hu - Ingyenes apróhirdető Length : 30 Perfect, your title contains between 10 and 70 characters.
Szakmai továbbképzési nap akadémiai oktatóknak. 2012. december 14. HISZK, Hódmezővásárhely / Webex
Szakmai továbbképzési nap akadémiai oktatóknak 2012. december 14. HISZK, Hódmezővásárhely / Webex 14.00-15.00 15.00-15.30 15.30-15.40 Mai program 1. Amit feltétlenül ismernünk kell: az irányítótábla közelebbről.
Szervlet-JSP együttműködés
Java programozási nyelv 2007-2008/ősz 10. óra Szervlet-JSP együttműködés Kérés továbbítás technikái legradi.gabor@nik.bmf.hu szenasi.sandor@nik.bmf.hu Szervlet-JSP együttműködés Témakörök Osztálykönyvtár
Java servlet technológia 1 / 40
Java servlet technológia 1 / 40 Áttekintés Bevezetés Servlet map-elés web.xml-ben Szessziókövetés include, forward Szűrők 2 / 40 Áttekintés Bevezetés Servlet map-elés web.xml-ben Szessziókövetés include,
Java Server Pages - JSP. Web Technológiák. Java Server Pages - JSP. JSP lapok életciklusa
Web Technológiák Java Server Pages - JSP Répási Tibor egyetemi tanársegéd Miskolc Egyetem Infomatikai és Villamosmérnöki Tanszékcsoport (IVM) Általános Informatikai Tanszék Iroda: Inf.Int. 108. Tel: 2101
Számítógépes hálózatok
Számítógépes hálózatok Negyedik gyakorlat SSL/TLS, DNS, CRC, TCP Laki Sándor Szűrési feladatok 1 - Neptun A neptun_out.pcapng felhasználásával állomány felhasználásával válaszolja meg az alábbi kérdéseket:
(NGB_TA024_1) MÉRÉSI JEGYZŐKÖNYV
Kommunikációs rendszerek programozása (NGB_TA024_1) MÉRÉSI JEGYZŐKÖNYV (5. mérés) SIP telefonközpont készítése Trixbox-szal 1 Mérés helye: Széchenyi István Egyetem, L-1/7 laboratórium, 9026 Győr, Egyetem
Adatbázisok webalkalmazásokban
Sapientia - EMTE, Pannon Forrás,,Egységes erdélyi felnőttképzés a Kárpát-medencei hálózatban 2010 A JDBC API A Data Access Object tervezési minta Adatforrás - DataSource JDBC architektúra A JDBC API java.sql
Utolsó módosítás: 2013. 02. 25.
Utolsó módosítás: 2013. 02. 25. 1 2 3 4 Az esemény azonosítása a forrás és az esemény azonosító alapján történhet. 5 Forrás: http://social.technet.microsoft.com/wiki/contents/articles/event-id-7030- basic-service-operations.aspx
Ellenőrző lista. 2. Hálózati útvonal beállítások, kapcsolatok, névfeloldások ellenőrzése: WebEC és BKPR URL-k kliensről történő ellenőrzése.
Ellenőrző lista 1. HW/SW rendszer követelmények meglétének ellenőrzése: A telepítési segédlet által megjelölt elemek meglétének, helyes üzemének ellenőrzése. 2. Hálózati útvonal beállítások, kapcsolatok,
Új funkciók az RBP-ben 2015. október 1-től New functions in RBP from 1 October 2015. Tatár Balázs
Új funkciók az RBP-ben 2015. október 1-től New functions in RBP from 1 October 2015 Tatár Balázs Üzletfejlesztés vezető / Business Development Manager Rendszerhasználói Tájékoztató Nap, 2015. szeptember
Contact us Toll free (800) fax (800)
Table of Contents Thank you for purchasing our product, your business is greatly appreciated. If you have any questions, comments, or concerns with the product you received please contact the factory.
Budapest By Vince Kiado, Klösz György
Budapest 1900 2000 By Vince Kiado, Klösz György Download Ebook : budapest 1900 2000 in PDF Format. also available for mobile reader If you are looking for a book Budapest 1900-2000 by Vince Kiado;Klosz
1. Ismerkedés a Hyper-V-vel, virtuális gépek telepítése és konfigurálása
1. Ismerkedés a Hyper-V-vel, virtuális gépek telepítése és konfigurálása 1.1. Új virtuális gép és a Windows Server 2012 R2 Datacenter alap lemez létrehozása 1.2. A differenciális lemezek és a két új virtuális
Webfejlesztés alapjai
Webfejlesztés alapjai Óbudai Egyetem, Java Programozás Mérnök-informatikai kar Labor 7 Bedők Dávid 2017.10.30. v1.0 Webfejlesztés A mai világban szinte minden "programozás iránt érdeklődő" 14 éves "webprogramozó".
Genome 373: Hidden Markov Models I. Doug Fowler
Genome 373: Hidden Markov Models I Doug Fowler Review From Gene Prediction I transcriptional start site G open reading frame transcriptional termination site promoter 5 untranslated region 3 untranslated
Parsing and Application
XML Parsing - SAX 1 Parsing and Application Parsing Well-formed ness checking & Validating Reading Application Manipulating Creating Writing and Sending 2 SAX Historical Background Simple API for XML Started
Java servlet technológia. Web alkalmazások. Servlet-et használni érdemes, ha. JSP-t használni érdemes, ha. Servlet-JSP kombináció (MVC) szükséges, ha
Áttekintés Java servlet technológia Bevezetés Servlet map-elés web.xml-ben Szessziókövetés include, forward Szűrők 1 / 31 2 / 31 Servlet-et használni érdemes, ha a kimenet típusa bináris (pl. egy kép)
Intézményi IKI Gazdasági Nyelvi Vizsga
Intézményi IKI Gazdasági Nyelvi Vizsga Név:... Születési hely:... Születési dátum (év/hó/nap):... Nyelv: Angol Fok: Alapfok 1. Feladat: Olvasáskészséget mérő feladat 20 pont Olvassa el a szöveget és válaszoljon
Excel vagy Given-When-Then? Vagy mindkettő?
TESZT & TEA BUDAPEST AGILE MEETUP Pénzügyi számítások automatizált agilis tesztelése: Excel vagy Given-When-Then? Vagy mindkettő? NAGY GÁSPÁR TechTalk developer coach Budapest, 2014 február 6. SpecFlow
Basic Arrays. Contents. Chris Wild & Steven Zeil. May 28, Description 3
Chris Wild & Steven Zeil May 28, 2013 Contents 1 Description 3 1 2 Example 4 3 Tips 6 4 String Literals 7 4.1 Description...................................... 7 4.2 Example........................................
FOSS4G-CEE Prágra, 2012 május. Márta Gergely Sándor Csaba
FOSS4G-CEE Prágra, 2012 május Márta Gergely Sándor Csaba Reklám helye 2009 óta Intergraph szoftverek felől jöttünk FOSS4G felé megyünk Békés egymás mellett élés több helyen: Geoshop.hu Terkep.torokbalint.hu
KIEGÉSZÍTŽ FELADATOK. Készlet Bud. Kap. Pápa Sopr. Veszp. Kecsk. 310 4 6 8 10 5 Pécs 260 6 4 5 6 3 Szomb. 280 9 5 4 3 5 Igény 220 200 80 180 160
KIEGÉSZÍTŽ FELADATOK (Szállítási probléma) Árut kell elszállítani három telephelyr l (Kecskemét, Pécs, Szombathely) öt területi raktárba, melyek Budapesten, Kaposváron, Pápán, Sopronban és Veszprémben
Lopocsi Istvánné MINTA DOLGOZATOK FELTÉTELES MONDATOK. (1 st, 2 nd, 3 rd CONDITIONAL) + ANSWER KEY PRESENT PERFECT + ANSWER KEY
Lopocsi Istvánné MINTA DOLGOZATOK FELTÉTELES MONDATOK (1 st, 2 nd, 3 rd CONDITIONAL) + ANSWER KEY PRESENT PERFECT + ANSWER KEY FELTÉTELES MONDATOK 1 st, 2 nd, 3 rd CONDITIONAL I. A) Egészítsd ki a mondatokat!
Adatbázis-kezelés ODBC driverrel
ADATBÁZIS-KEZELÉS ODBC DRIVERREL... 1 ODBC: OPEN DATABASE CONNECTIVITY (NYÍLT ADATBÁZIS KAPCSOLÁS)... 1 AZ ODBC FELÉPÍTÉSE... 2 ADATBÁZIS REGISZTRÁCIÓ... 2 PROJEKT LÉTREHOZÁSA... 3 A GENERÁLT PROJEKT FELÉPÍTÉSE...
Webes alkalmazások fejlesztése 8. előadás. Webszolgáltatások megvalósítása (ASP.NET WebAPI)
Eötvös Loránd Tudományegyetem Informatikai Kar Webes alkalmazások fejlesztése 8. előadás (ASP.NET WebAPI) 2016 Giachetta Roberto groberto@inf.elte.hu http://people.inf.elte.hu/groberto A webszolgáltatás
Minta ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA II. Minta VIZSGÁZTATÓI PÉLDÁNY
ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA II. A feladatsor három részből áll VIZSGÁZTATÓI PÉLDÁNY 1. A vizsgáztató társalgást kezdeményez a vizsgázóval. 2. A vizsgázó egy szituációs feladatban vesz részt a
Computer Architecture
Computer Architecture Locality-aware programming 2016. április 27. Budapest Gábor Horváth associate professor BUTE Department of Telecommunications ghorvath@hit.bme.hu Számítógép Architektúrák Horváth
ANGOL NYELVI SZINTFELMÉRŐ 2012 A CSOPORT. to into after of about on for in at from
ANGOL NYELVI SZINTFELMÉRŐ 2012 A CSOPORT A feladatok megoldására 45 perc áll rendelkezésedre, melyből körülbelül 10-15 percet érdemes a levélírási feladatra szánnod. Sok sikert! 1. Válaszd ki a helyes
BKI13ATEX0030/1 EK-Típus Vizsgálati Tanúsítvány/ EC-Type Examination Certificate 1. kiegészítés / Amendment 1 MSZ EN 60079-31:2014
(1) EK-TípusVizsgálati Tanúsítvány (2) A potenciálisan robbanásveszélyes környezetben történő alkalmazásra szánt berendezések, védelmi rendszerek 94/9/EK Direktíva / Equipment or Protective Systems Intended
ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA I. VIZSGÁZTATÓI PÉLDÁNY
ANGOL NYELV KÖZÉPSZINT SZÓBELI VIZSGA I. VIZSGÁZTATÓI PÉLDÁNY A feladatsor három részből áll 1. A vizsgáztató társalgást kezdeményez a vizsgázóval. 2. A vizsgázó egy szituációs feladatban vesz részt a
A WEB programozása - Szervletek dr. Gál Tibor tavaszi félév
SZERVLETEK Általános jellemzők A WEB kiszolgálók funkcionalitását bővítik Appletek az ügyfél oldali szervletek a kiszolgáló oldali Java alkalmazások A CGI programok alternatívái De nem külön processzként,
Miskolci Egyetem Gazdaságtudományi Kar Üzleti Információgazdálkodási és Módszertani Intézet. Hypothesis Testing. Petra Petrovics.
Hypothesis Testing Petra Petrovics PhD Student Inference from the Sample to the Population Estimation Hypothesis Testing Estimation: how can we determine the value of an unknown parameter of a population
Statistical Dependence
Statistical Dependence Petra Petrovics Statistical Dependence Deinition: Statistical dependence exists when the value o some variable is dependent upon or aected by the value o some other variable. Independent
Komponensek együttműködése web-alkalmazás környezetben. Jónás Richárd Debreceni Egyetem T-Soft Mérnökiroda KFT richard.jonas@tsoft.
Komponensek együttműködése web-alkalmazás környezetben Jónás Richárd Debreceni Egyetem T-Soft Mérnökiroda KFT Komponensek a gyakorlatban A szoftverkomponenseket fejlesztő csoportoknak szüksége van olyan
Tavaszi Sporttábor / Spring Sports Camp. 2016. május 27 29. (péntek vasárnap) 27 29 May 2016 (Friday Sunday)
Tavaszi Sporttábor / Spring Sports Camp 2016. május 27 29. (péntek vasárnap) 27 29 May 2016 (Friday Sunday) SZÁLLÁS / ACCOMODDATION on a Hotel Gellért*** szálloda 2 ágyas szobáiban, vagy 2x2 ágyas hostel
ENROLLMENT FORM / BEIRATKOZÁSI ADATLAP
ENROLLMENT FORM / BEIRATKOZÁSI ADATLAP CHILD S DATA / GYERMEK ADATAI PLEASE FILL IN THIS INFORMATION WITH DATA BASED ON OFFICIAL DOCUMENTS / KÉRJÜK, TÖLTSE KI A HIVATALOS DOKUMENTUMOKBAN SZEREPLŐ ADATOK
11. Gyakorlat: Certificate Authority (CA), FTP site-ok
11. Gyakorlat: Certificate Authority (CA), FTP site-ok 11.1. A CA szerver szerepkör telepítése a DC01-es szerverre 11.2. Az FTP szervíz telepítése a DC01-es szerverre 11.3. A szükséges DNS rekordok létrehozása
Üdvözli Önöket A PGY3 tantárgy! Bakay Árpád dr. NETvisor kft (30) 385 1711 arpad.bakay@netvisor.hu
Üdvözli Önöket A PGY3 tantárgy! Bakay Árpád dr. NETvisor kft (30) 385 1711 arpad.bakay@netvisor.hu Tartalom idén WEB UI programozási technológiák A Tudor/Szeráj/SingSing a Web-re megy Szoftvertechnológiai
C# nyelv alapjai. Krizsán Zoltán 1. Objektumorientált programozás C# alapokon tananyag. Általános Informatikai Tanszék Miskolci Egyetem
C# nyelv alapjai Krizsán Zoltán 1 Általános Informatikai Tanszék Miskolci Egyetem Objektumorientált programozás C# alapokon tananyag Tartalom Bevezetés Lokális változó Utasítások Szójáték Why do all real
3. MINTAFELADATSOR KÖZÉPSZINT. Az írásbeli vizsga időtartama: 30 perc. III. Hallott szöveg értése
Oktatáskutató és Fejlesztő Intézet TÁMOP-3.1.1-11/1-2012-0001 XXI. századi közoktatás (fejlesztés, koordináció) II. szakasz ANGOL NYELV 3. MINTAFELADATSOR KÖZÉPSZINT Az írásbeli vizsga időtartama: 30 perc
1. MINTAFELADATSOR KÖZÉPSZINT. Az írásbeli vizsga időtartama: 30 perc. III. Hallott szöveg értése
Oktatáskutató és Fejlesztő Intézet TÁMOP-3.1.1-11/1-2012-0001 XXI. századi közoktatás (fejlesztés, koordináció) II. szakasz ANGOL NYELV 1. MINTAFELADATSOR KÖZÉPSZINT Az írásbeli vizsga időtartama: 30 perc
C#, OOP. Osztályok tervezése C#-ban
C#, OOP Osztályok tervezése C#-ban OOP Létrehozás (creating) Megszüntetés (destroying) Túlterhelés (overlading) Felsorolás típus (enumerated types) 2 Hajó osztály Sailboat class using System; class Sailboat
Collections. Összetett adatstruktúrák
Collections Összetett adatstruktúrák Collections framework Előregyártott interface-ek és osztályok a leggyakoribb összetett adatszerkezetek megvalósítására Legtöbbször módosítás nélkül használhatók Időt,
Business Opening. Very formal, recipient has a special title that must be used in place of their name
- Opening English Hungarian Dear Mr. President, Tisztelt Elnök Úr! Very formal, recipient has a special title that must be used in place of their name Dear Sir, Formal, male recipient, name unknown Dear
PHP II. WEB technológiák. Tóth Zsolt. Miskolci Egyetem. Tóth Zsolt (Miskolci Egyetem) PHP II. 2014 1 / 19
PHP II. WEB technológiák Tóth Zsolt Miskolci Egyetem 2014 Tóth Zsolt (Miskolci Egyetem) PHP II. 2014 1 / 19 Tartalomjegyzék Objektum Orientált Programozás 1 Objektum Orientált Programozás Öröklődés 2 Fájlkezelés
Szálkezelés. Melyik az a hívás, amelynek megtörténtekor már biztosak lehetünk a deadlock kialakulásában?
Szálkezelés 1. A szekvencia diagram feladata az objektumok egymás közti üzenetváltásainak ábrázolása egy időtengely mentén elhelyezve. Az objektumok életvonala egy felülről lefelé mutató időtengely. A
Cashback 2015 Deposit Promotion teljes szabályzat
Cashback 2015 Deposit Promotion teljes szabályzat 1. Definitions 1. Definíciók: a) Account Client s trading account or any other accounts and/or registers maintained for Számla Az ügyfél kereskedési számlája
Személyes adatváltoztatási formanyomtatvány- Magyarország / Personal Data Change Form - Hungary
Személyes adatváltoztatási formanyomtatvány- Magyarország / Personal Data Change Form - Hungary KITÖLTÉSI ÚTMUTATÓ: A formanyomtatványon a munkavállaló a személyes adatainak módosítását kezdeményezheti.