Sir can you please send me an example to upload an image to the server (with user defined file name and display message if name exist) at specific folder "images" and save its path to the mysql database. And again display the images uploaded on the server folder by using the path which is stored in database. Sir i am able to upload image on server specific folder or the image directly in database in bolb datatype but i become failed to store its path in database and fetch the uploaded image using the path in database. So please guide …

Member Avatar
Member Avatar
+0 forum 6

Hello, Iam new to programming.Can someone please help me out how can i read URL process it and return the number to browser in jsp. Actually I have a URL which returns an integer now what i want is I have to write a program to take the URL as input and return that result back to browser in jsp(or servlet).

Member Avatar
Member Avatar
+0 forum 1

Hello everyone, I am having trouble in displaying the multiple images on jsp. I am using servlet to pull the image from the database. Following code, will always display single image multiple times on my jsp page. Can anyone please help me in rectifying the error in the code. I am new to jsp and servlet programming! Thanks for your anticipation. Fyi, `Inline Code Example Here` Table A: fieldname: personid(datatype: int, primary key) fieldname: person_name(datatype: varchar(20) Table B: fieldname: person_pic(datatype: BLOB) fieldname: personid(foreign key references Table A(id)) fieldname: picid(datatype: int, primary key) Below is the jsp code: <% //uid will …

Member Avatar
+0 forum 0

I need to insert an imagen into a SQL Server Database and i need to do it using jsp, but i don't know how to do it. Someone can teach me the best way to do that?

Member Avatar
Member Avatar
+0 forum 1

I want to print the username on jsp page"**success.jsp**" from "**home.jsp**" i have used **hibernate** to save data in table . "home.jsp" <%@ page language="java" 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/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <center> <h1 ><font color="red">User-Interface</font></h1> <form action=loginServlet method="post"> <table border="1" bordercolor="red" style="border-style: dotted;" cellpadding="5px" cellspacing="10px"> <tr> <td>UserName:</td><td><input type="text" name="username"></td> </tr> <tr> <td>Password:</td><td><input type="password" name="password"></td> </tr> </table> <input type="submit" value="Log-In" > </form> New User?<a href="register.jsp"> Register Here</a> </center> </body> </html> success.jsp <%@ page language="java" 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/loose.dtd"> …

Member Avatar
+0 forum 0

Hi, I'm new to JSP. I want a sample code to call a java class on button click in jsp.

Member Avatar
Member Avatar
+0 forum 3

Hello .Im a final year student in bachelor of science computer in web technology. I need your suggestion for my final year project title.Do you have any related ideas?

Member Avatar
Member Avatar
+0 forum 13

hI! I m trying to create a simple login application in jsp where i create a session allows the user to use certain features and then logout. Problem is that after the user logs out. I destroy all session objects and invalidate the session and redirect to welcome page still, on hitting the back button user can see the login pages, which ideally should not be navigable without login. i have also used this code to disable caching [CODE] <head> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> </head> ----//body tags <%response.setHeader("Cache-Control","no-cache"); response.setHeader("Pragma","no-cache"); response.setDateHeader ("Expires", 0 ---//my stuff %> …

Member Avatar
Member Avatar
+0 forum 6

test for check more 5 items

Member Avatar
Member Avatar
+0 forum 4

hi i am trying to take an n number of inputs from user where n is user defined .i am a bit confused how to write my jsp so it can as many as inputs required by the user

Member Avatar
+0 forum 0

I want to store multiple checkboxe values in my sql database. I am using jsp as front end.

Member Avatar
Member Avatar
+0 forum 1

I facing a problem with checkbox value that already exists inside the database. so how can I retrieve those value into another database table? The table subject and service below is what I want. But based on the code below the SERVICE TABLE on SUBJECTID COLUMN producing null value. How to remove those null value with subjectid value? I don't understand that well because I am a newbie. SUBJECT TABLE (Values inside subject table already exists) SUBJECTID SUBJECTNAME ----------- ---------------- PT3_ENGLISH ENGLISH PT3_BM BAHASA MELAYU PT3_SC SCIENCE PT3_MATH MATHEMATICS CURRENT SERVICE TABLE IN DB SERVICE TABLE SERVICEID SERVICECATEGORY SERVICETYPE STUDENTID …

Member Avatar
+0 forum 0

//The php section of the code <?php function getJSONFromDB($sql){ $conn = mysqli_connect("localhost", "root", "","rent"); //echo $sql; $result = mysqli_query($conn, $sql)or die(mysqli_error()); $arr=array(); while($row = mysqli_fetch_assoc($result)) { $arr[]=$row; } return json_encode($arr); } $jsonData= getJSONFromDB("select Pic from Display"); $jsn=json_decode($jsonData); //for loop to retrieve rows from database for($i=0;$i<sizeof($jsn);$i++){ $a=$jsn[$i]->Pic; //here is the main problem echo "<html><body><img src='sponsor/$a.jpeg' alt=''></body></html>"; //here is the problem i am facing } ?> 01 //The php section of the code 02 <?php 03 function getJSONFromDB($sql){ 04 $conn = mysqli_connect("localhost", "root", "","rent"); 05 //echo $sql; 06 $result = mysqli_query($conn, $sql)or die(mysqli_error()); 07 $arr=array(); 08 while($row = mysqli_fetch_assoc($result)) { 09 $arr[]=$row; …

Member Avatar
Member Avatar
+0 forum 1

I am trying to create an HTML form which displays text from a text file, using a Java Servlet. I keep getting the following error: Error instantiating servlet class servlets.ReportServlet. Here is the HTML page: <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <form name = "managementReports" method = "get" action = "ReportServlet"> <input type="submit"> </form> </body> </html> And here is my servlet: package servlets; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import javax.servlet.annotation.WebServlet; @WebServlet(urlPatterns = { "/ReportServlet" }) public class ReportServlet extends HttpServlet { public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { …

Member Avatar
Member Avatar
+0 forum 7

If a table contains field's like name,age tuition fee,bus fee,year, 1,2 When I tried to update 1 year details it is updating but when I try to update the entire fields it's not updating in form of jsp page

Member Avatar
Member Avatar
+0 forum 5

Can anyone help me out to create multiple check boxes for attendance purpose

Member Avatar
Member Avatar
-2 forum 1

As I am doing a application on attendance management where I need to store the details by using check boxes I am unable to store the details of check boxes where it will be generated as present or absent in database Can anyone help me to find out this

Member Avatar
Member Avatar
+0 forum 4

Hi, I'm starting to learn Java EE - JSP / SERVLET and as for my learning progress, I'm trying to achieve this kind of web app but Im having problem with displaying the right selected row (TASK ID Column) from my table. It is populated from my oracle db. Im able to display my expected output correctly. But when I'm trying to get the selected row through clicking the corresponding button, I'm always getting the 1st row value, i.e. ID = '123456', no matter what Button I clicked, 2nd, 3rd, etc. It always display the 1st row. You can kindly …

Member Avatar
Member Avatar
+0 forum 6

I want to have a forum in my website project in school. i don't have any idea. may anyone help me suggesting some examples. it is like daniweb forums. i want to save the topics in the database and retrieve it as a link. i dont know how to do that in jsp code. can anybody help me?? i really need help. God bless you .

Member Avatar
Member Avatar
+0 forum 24

hi..so i am facing problelm how to upload data on my websites in which format (.pdf,etc) should upload data and how to do it.

Member Avatar
Member Avatar
-1 forum 3

Hello everyone, I have a simple JSP, with a text input and a submit button, as follow: <form accept-charset="UTF-8" method="get" action="<%=request.getContextPath()%>/someAction"> Enter Search: <input type="text" name="keyword"/><input type="submit" /> </form> And in my Servlet, I am reading the input, as such: String word = request.getParameter("keyword").trim(); System.out.println("Keyword: " + word); The input I am entering is: من And the output I am getting is as follow: Keyword: &#1605;&#1606; Is there anything I am missing?

Member Avatar
Member Avatar
+0 forum 1

Hello Sir, I am developing social networking website using jsp and servlet . I have created login page using mysql but now i am not able to make posting status and commenting system on that post.Please provide me solution. thankyou aayush

Member Avatar
Member Avatar
+0 forum 3

Hi Everyone, i am a final year computer science student.I was thinking of building a secure online voting system for my university's student union elections process. I wondering if anyone has an idea on how i can go about implementing the system.I would really appreciate any help you give to me.Thanks

Member Avatar
Member Avatar
+1 forum 28

My intention is to delete file from folder But Here in above script is not working properly can any one please suggest me about this function deleteFile() { var myObject; myObject = new ActiveXObject("Scripting.FileSystemObject"); myObject.DeleteFile("D:\\WEBSITE_FILES\\docs\\OTR\\"+db_unicid+"\\passportImage.jpg"); return true; } <input type='Button' value='Click to Delete File' onClick='return deleteFile()'>

Member Avatar
Member Avatar
+0 forum 1

i want source code for uploading ,displaying and downloading image in jsp

Member Avatar
Member Avatar
+0 forum 4

I have a validateRequiredField(e) function to validate empty field and a validateExistingEmail() to validate an email has existed in my database. I am able to see both alert("Field" + i + "is Required"); when the fields are empty and alert("This email has been registered"); when the email existed in my database. **The problem I am facing is I am unable to submit my form once the validation is done and submit button is pressed.** Please help index.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> …

Member Avatar
Member Avatar
+0 forum 2

I need to validate a name field to validate if the name field is empty and if the name existed in my database. If it passes both the validation(the user has input a name that is not existed in my database), then the form will be submitted. The problem is with my validation of name existed in my database. I used ajax and even though I used e.preventDefault() to stop the form from submitting if the name existed in the success block, it just pops up an alert "name existed" and proceed to submit the form. Please help. index.jsp <%@ …

Member Avatar
+0 forum 0

the code below is working, but it is displaying only one image in a blank page where there is no css I want it to display all the image in a table. please help me... <%@page import="com.sun.javafx.tk.Toolkit"%> <%@page import="java.awt.Image"%> <%@page import="javax.swing.ImageIcon"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@page import ="java.sql.*" %> <%@page import="java.io.*" %> <%@ page import="java.util.*" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/product.css" /> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Product</title> </head> <body> <div class="nav"> <div id="contactBox"> <form method="post" action="showSearch.jsp"> <input type="text" name="searching" id="search"/><input type="submit" name="look" value="Search" id="searchButton"/> </form> </div> <img src="indica.PNG" alt="indica" …

Member Avatar
+0 forum 0

Hi all i have couple jsp pages and java class as follows below.Can you help me with the session on the handleForm .jsp As this page supposed to show all info entered by the user in the form.I did manage to display session object in thanks,jsp But have now a problem in doing it in handleForm.jsp. #1User class /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package business; public class User { public String getName() { …

Member Avatar
+0 forum 0

Hi, a) I need to display list of ItemName, ItemLocation in a table row with a check box in the left-most column. b) User can select multiple jobs and on clicking "Submit" button I should pass the selected ItemName and ItemLocation to a fuction in java. I am able to get the list of items using Item bean java class in Arraylist but need suggestion on what will be the best approach so that I can pass each selected ItemName and ItemLocation to a fuction in java. Please suggest, any sample would be of great help. Regards

Member Avatar
Member Avatar
+0 forum 11

The End.