In this article, I am going to describe an application that uses image controls in JSP. Through this application we describe the controls that are mainly used on the image. To develop this application we follow the following steps. Step 1 : Create a New Project.In this step we select the New Project option from the file menu.Step 2 : Choose Project.In this step we select a web application from the Java web option and then click on the next button.Step 3 : Name and Location.In this step we give it a specific name and set a specific location and click on the next button.
Step 4 : Server and Setting.We select a specific server for this application and click on the next button.
Step 5 : Select Framework.There is no need to select any framework for this application; just click on the finish button.Step 6 : Create JSP file.We create one JSP file for this application. index.jsp <HTML> <HEAD> <TITLE>Using Image Controls In JSP</TITLE> </HEAD> <BODY BGCOLOR="cyan"> <H1>Using Image Controls In JSP</H1> <FORM ACTION="formAction.jsp" METHOD="POST"> <INPUT TYPE="IMAGE" NAME="images" SRC="demoImage.jpg"> </FORM> </BODY> </HTML> formAction.jsp <HTML> <HEAD> <TITLE>Reading Image Controls</TITLE> </HEAD> <BODY BGCOLOR="skyblue"> <H1>Reading Image Controls</H1> You clicked the image at (<%=request.getParameter("images.x")%>, <%=request.getParameter("images.y")%>). </BODY>
Step 7 : Compile and Run the application.Now we compile the application and then run it on the server and find the following output.Outputindex.jspformAction.jspResources related to this article
B.Tech graduate in CSE, having 3+ years of experience in java related
My interests are Coding, Writing complex Queries [like d most], reading
[technical stuff,G.K books] and...
C# Corner. All contents are copyright of their authors.