90 Topics

Member Avatar for
Member Avatar for rakesh4java

# I want to give a button in my JSP page, which on click of it should store an image in the filesystem. # Following is the code ScreenCapture.java which is a servlet. Purpose: To capture the screen of working area and store it in file system. Problem: - An …

Member Avatar for stultuske
0
1K
Member Avatar for lucy nana

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 …

0
405
Member Avatar for massivefermion

I want to learn web programming with Java. I'm using eclipse neon with tomcat 8.5.13. My question is do these tools support asynchronous programming and server push technologies or should I use other tools? Thanks

Member Avatar for rproffitt
0
232
Member Avatar for new_2_java

Hello all, I have a J2EE application that displays a dropdown of items, in Arabic text. This data is stored in a table in underlying MySQL server. The DB character set is set to utf8 and I have in my JSP the carset encoding as utf8 as well. This works …

Member Avatar for new_2_java
0
1K
Member Avatar for new_2_java

Hello everyone, I am populating a dropdown list in my webapp, from a MySQL database table. There are around 160,000 records in the table. When I start my webapp and when populating the content of the drop-down, it takes incredible amount of time, and eventually the browser crashes. I am …

Member Avatar for jwenting
0
694
Member Avatar for new_2_java

Hello everyone, I need to pass some parameters from my servlet to my JSP. I am able to access 2 of my parameters from the request object, but one of them is returning null value. Here's my servlet snipet: request.setAttribute("selectedA", aBook); request.setAttribute("selectedB", bBook); request.setAttribute("book_ref", book_ref); logger.info("book_ref = " + book_ref); …

Member Avatar for new_2_java
0
247
Member Avatar for vishalonne

Dear Experts When we create table in MS Access we enter description of field in description column. I am able to get the field name and data type from the table but how can I get the description from the table. Here is the code by which I am getting …

Member Avatar for vishalonne
0
299
Member Avatar for jithinjohny

Hi, I have linux based hosting. I need to upload and work the jsp/servlet pages. after i uploaded the files into the hosting, when i checked the files , it shows the code itslef. How to fix this. Please help me. Thanks in advance.

Member Avatar for stultuske
0
210
Member Avatar for Shreyas_1

I have two different format of code for insert query using jsp+servlet+mysql. Code-1 ====== Class.forName(JDBC_DRIVER); // Open a connection out.println("Connecting to a selected database..."); con = DriverManager.getConnection(DB_URL, USER, PASSWORD); out.println("Connected database successfully..."); // Execute a query st = con.createStatement(); sql = "insert into users (name,email,password) values ('" + name + …

Member Avatar for stultuske
0
2K
Member Avatar for Sudhanshu_2

hi ! i ve just started doing mysql. i am making a web application in which employees database is reqiured to be shown in the table. i ve made a database name "educrm" and table name is "info", which i ve done in mysql through xampp(phpMyAdmin). i am showing u …

Member Avatar for Sudhanshu_2
0
341
Member Avatar for Muni123

I am trying to add some text in to a page by using a textarea where text is entered the text gets saved in to a database after clicking on a add button on a page. However, I am unable to achieve this after trying. I have two tables matchreportcomments …

0
223
Member Avatar for theGrinch

I'm trying to use html onclick in java servlets like this; ShoppingCart cart = new ShoppingCart(); out.println(" <h1><button type=\"button\" onclick=\"cart.addBook(b.getIsbn())\">add</button> </h1>"); addBook is a method in ShoppingCart class, and I'm calling it when the button is clicked, but it's not getting called. Please help.

Member Avatar for Tu Dinh
0
4K
Member Avatar for Tu Dinh

Hi every body, I tried to search for my own problem, I would think this must be popular issue but unfortunately I found no solution in Google. I tried to use `(boolean) session.getAttribute("IsValidUser")` to get the attribute of Session, but that caused error: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for …

Member Avatar for Tu Dinh
0
472
Member Avatar for wallet123

Im trying to integrate my website with facebook so that users wont have to sign up. By just using their FB accounts, they can automatically be logged in, but im encountering an error: java.lang.NullPointerException at com.fblogin.CallbackServlet.doGet(CallbackServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) …

Member Avatar for jwenting
0
308
Member Avatar for wallet123

I want to connect my website with Facebook. I'd like my user to be able to login to my site without having to sign up. Jut by clicking the facebook logo, I will be able to fetch the data needed like their email, name, age, etc. I used **restFB** but, …

0
131
Member Avatar for Vanquish39

Question regarding concurrency. Imagine 10 different doGet() requests from 10 different users around the world called within milliseconds of each other to a servlet called LoginServlet.java. Inside the servlet's doGet() method is a call to DbUtil.getConnection(). The DBUtil class is static and the method getConnection() is also static. What happens …

Member Avatar for ~s.o.s~
0
267
Member Avatar for maxbummber

I have the following code that prints out something like a database using a velocity engine and the output is printed to a console. Though what I'm asked is to generate HTML code using a Velocity template. The **Velocity Test Class** import java.io.StringWriter; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; public …

Member Avatar for ~s.o.s~
0
377
Member Avatar for prnjn

Hi , I have a JSP page where i have few checkboxes and i have disabled few of them usign javascript for certain conditions. When i fetch the value from checkbox using `request.getParameterValues("CheckBoxName");` , then do i get the values from disabled checkboxes too or disabled checkboxes are not considered …

Member Avatar for GliderPilot
0
2K
Member Avatar for Zababa

Hey there guys :) I need to create a page (HTML) which contains some static content, and an `iframe`. The `iframe` is used to contain an external page, so I am trying to 'inject' the source of the page into the document element of the` iframe`. You would ask me, …

Member Avatar for asmira
0
247
Member Avatar for faysal515

I am working on a dynamic project for my own but struggling to create an article. The idea is that one registered user can publish an article with an image . <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <!DOCTYPE html PUBLIC …

Member Avatar for Deepak_11
0
1K
Member Avatar for Rasika Gonekar /

How to forward data to jsp from Servlet multiple times using request dispatcher. I have tried with timer in servlet with request dispatcher to forward updated data from databases to jsp page to display result. i laso tried with page refreshing with single jsp page

Member Avatar for cool_zephyr
0
127
Member Avatar for titusnainggolan

Hi, Guys! Actually I want to ask about servlet and ajax. Sorry if I post in wrong room, I have search the room that suitable for my question, but the most suitable is here. I'm developing a push notification for web using servlet + ajax. I have done an tutorial …

Member Avatar for titusnainggolan
0
1K
Member Avatar for Valten1992

Basically I have a java application that can display the data it outputs onto a webpage. I have a div containing tables, each table representing one java object and its values, after a period of time I want AJAX to refresh that div with the new data. Problem, I'm using …

Member Avatar for darshit9u
0
699
Member Avatar for anisha.silva

hi what i wan to do is to get the customer ID from the glassfisn database and displaindey it in a drop down box in a jsp page. in the index.jsp page how to i call the servlet so that the the servlet would load the jsp page? i have …

Member Avatar for anisha.silva
0
548
Member Avatar for anisha.silva

hi i create a jsp and a servlet to get data from the data to be displayed in the jsp page. the code is below ListCustomer.jsp <table id="customerListTable" border="3"> <tr > <th bgcolor=>ID</th> <th bgcolor=>Name</th> <th bgcolor=>Address</th> <th bgcolor=>TelNo</th> <th bgcolor=>Req</th> </tr> <c:forEach var="customer" begin="0" items="${requestScope.customerList}"> <tr> <td>${customer.cusid}&nbsp;&nbsp;</td> <td>${customer.cusname}&nbsp;&nbsp;</td> <td>${customer.cusaddress}&nbsp;&nbsp;</td> …

Member Avatar for LastMitch
0
249
Member Avatar for solomon_13000

A web server is used to process http request and send a response back to the client browser. I was wondering how does a client browser send a http request to the web server? Is it done via socket connection? Which socket connection is used to establish a connection with …

Member Avatar for ~s.o.s~
0
221
Member Avatar for mahemaa.iyer

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { int c=0; String u1=request.getParameter("u1"); String e1=request.getParameter("e1"); String user=request.getParameter("user1"); request.setAttribute("u1",u1); request.setAttribute("e1",e1); request.setAttribute("user", user); out.println("welcOme"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con =DriverManager.getConnection("Jdbc:Odbc:db5"); String str = "select * from Table1 where email=?"; out.println("welcOme"); PreparedStatement statement = con.prepareStatement(str); statement.setString(1,user); ResultSet …

0
146
Member Avatar for raul8

Using Ajax after an year...please tell me what I'm missing: JSP/Ajax File: [CODE]<%@ 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> <script type="text/javascript"> function login() { var xmlhttp; var username = document.getElementById('username').value; var queryString = "username="+username; …

Member Avatar for i_M_patil
0
248
Member Avatar for charming-_-eyes

How can I get parameter from servlet with a specific name in android activity? like in java servlet request.getParameter("name");

Member Avatar for peter_budo
0
241
Member Avatar for paryudi

I am creating a program that will do 67,108,864 calculations using Netbeans. But when I run it, there is an error message: java.lang.OutOfMemoryError: Java heap space. I have tried several things to overcome this problem: 1. I changed the setting of VM Options of the Project Properties. I even set …

Member Avatar for JamesCherrill
0
679

The End.