90 Topics

Member Avatar for
Member Avatar for mynameissiva

hi folks, Here i face problem in my webpage [servlet + mysql] Connection are working fine. But when running time it get download the page instead of display the content in the browser. I try myself so many time, cant sove it.. plz guys help me to overcome this problem. …

Member Avatar for mynameissiva
0
247
Member Avatar for ronnieaka

here's my code: [CODE] import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.annotation.WebServlet; @WebServlet(name="HelloWorld",urlPatterns={"/HW"}) public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("Hello Programmers!!! "); } } [/CODE] to access it on Tomcat, i goto : localhost:8080/examples/HW so i …

0
125
Member Avatar for OnnDay

Hi everyone. I'm using Tomcat 7.0.8 I have created servlet, which loads image to "webcontent\pic" folder of my project. Then I need to display this image. The servlet works, but with only restriction: i need manually refresh content of project, or directory (I'm using Eclipse). Otherwise ugly cross will be …

Member Avatar for OnnDay
0
166
Member Avatar for Eric Cute

Hi everyone, Im trying to download all files in a directory residing in the server to clients pc. I know how to download single files using response.getoutputStream(). My problem is I want to download ALL the files in that directory with a single click of a button. i tried iterating …

0
96
Member Avatar for Niveditya

ajax.html [CODE]<html> <head> <title> Ajax at work </title> <script language = "javascript"> var XMLHttpRequestObject = false; if (window.XMLHttpRequest) { XMLHttpRequestObject = new XMLHttpRequest(); } else if (window.ActiveXObject) { XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP"); } function getData(dataSource, divID) { if(XMLHttpRequestObject) { var obj = document.getElementById(divID); XMLHttpRequestObject.open("GET", dataSource); XMLHttpRequestObject.onreadystatechange = function() { if …

Member Avatar for Niveditya
0
164
Member Avatar for ajuv_001

hi guys, im developing a search engine using servlet and jsp.how can we display the search results in the same webpage below the search bar.i dont want to use ajax and all. i want it in simple way....if anybody know please help me.... thank you

Member Avatar for ajuv_001
0
111
Member Avatar for Haclon

I search a lot of solution but neither is working. Can anyone help me with this storing the textarea from JSP into MySQL and retrieve it? Thanks a lot! [code]<html> <head> <% String ta1 = request.getParameter("ta1"); %> </head> <body> <form action="testing.jsp" name="form" id="form" class="form"> <textarea cols="10" rows="10" id="ta1" name="ta1"></textarea> <input …

0
73
Member Avatar for Dean_Grobler

Hello there, I have a JSP page that has a couple of images in, when I type the address of the JSP directly in my browser the page loads, with images and all. But when I go the page, through my servlet [RequestDispatcher.forward()] the page loads but the images are …

Member Avatar for javaAddict
0
1K
Member Avatar for Dean_Grobler

Hello there, This is just a quick question. You know that servlets respond by printing out dynamic HTML code? Well, is it possible that instead of doing that, the servlet just redirects back to the HTML form that send the servlet the Form data in the first place? myHtml(sends form …

Member Avatar for Dean_Grobler
0
287
Member Avatar for Hakoo

Hello all, I have created Servelets which are used by midlets and having Database in MySQL. I have deployed servelets in Apache Folder. but now question is how to setup Database? Thanking You, Hakoo S Desai.

Member Avatar for peter_budo
0
176
Member Avatar for vigneshd90

Hi, I would like to know if its possible to edit a properties file after the project is deployed. I tried editing the values in the properties file using a classloader. [CODE] ClassLoader classLoader = this.getClass().getClassLoader(); prop.load(classLoader.getResourceAsStream("test.properties"));[/CODE] It reads the values properly but I couldn't write it back to the …

Member Avatar for vigneshd90
0
769
Member Avatar for matstars

I have a JSP page that has two pieces of data that I need to send to a page on another domain via post when a button is clicked. My original iteration was just having the two pieces of data in 2 hidden fields and when the user clicked a …

0
116
Member Avatar for mokztan

Hi. Im having a difficult time to figure out how to connect all the claass and jsp as well as the .xml. (I am working on a web application project, and these codes are for the registration module oly. Im using ECLIPSE EUROPA for my IDE, Apache Tomcat 6.0 for …

0
90
Member Avatar for EagerLearner167

I'm a student. I am trying to make simple project for online borrowing book system. Basically the flow is from Borrow.jsp (The user select which data their want to update) The UpdateBorrowBinder.java will grab the object and pass to sql then bring the result to appear in UpdateBorrow.jsp But the …

0
75
Member Avatar for rakesh4java

[CODE]import java.io.*; import java.text.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; public class getname extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void destroy() { } public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException { String name = null; PrintWriter out = response.getWriter(); if(request.getParameter("txtname") != null) …

Member Avatar for rakesh4java
0
25K
Member Avatar for jaypatel711

For my project I am sending the HTML value from one text editor. For that I had set the character set to UTF-8. Here I am sending value through URL. In the text editor I am Providing the facility of changing the color of text. Now when I change the …

Member Avatar for jaypatel711
0
169
Member Avatar for khurram.1987

when we call servlet from a JSP page .. explorer/program moves to servlet page .... Such in my scenareo i have JSP form that on submiting call servlet to retrieve data from XML .. But problem is that . i like that on submitin form servlet runs in background without …

0
81
Member Avatar for manjukdvg

Im developing one application here i need to pass the data from servlet to JSP .How can i pass it ? i tried by request.setAttribute() but it printing as null in JSP page . how can i solve this problem?

Member Avatar for punit.it
0
132
Member Avatar for sugumarclick

Hi javaAddicts I am a novice java programmer. I am in a learning process in java servlets. How to load a servlet and invoke its method from index.jsp. I want the servlet to execute first and dispatch its value to index.jsp and also i dont want to use redirect from …

Member Avatar for Stefano Mtangoo
0
3K
Member Avatar for raul8

I have an HTML/JSP page on which I have to display all the images stored in a folder. For this I have to use Java. Please tell me how this can be done. Will appreciate if it is possible to provide code for explanation. Thank You

0
89
Member Avatar for sugumarclick

hi friends, I am a novice java programmer. I am in a learning process in java servlets. But i struck into a uploading a file into (desired location) server I will show my code as some one can point out where am i going wrong. Currently im dealing with null …

0
110
Member Avatar for sugumarclick

hi friends, I am a novice java programmer. I am in a learning process in java servlets. But i struck into a Class method which should return a result set as an array. I will show my code as some one can point out where am i going wrong. Currently …

Member Avatar for sugumarclick
0
682
Member Avatar for mindbend

Need to make a website for a school project. Decided to make a website like photobucket. I got every page read, but the only thing missing is the uploading part. Does anyone know where I can find some examples of uploading blobs? Or mayb someone can share one. The thing …

Member Avatar for mindbend
0
89
Member Avatar for rumpleteaser33

Hi, I'm trying my first program using servlets and JSP and would appreciate any help or advice about a problem I'm having. In my servlet I'm connecting to the database and displaying all the records in there. I'm then trying to add data to a JavaBean so that I can …

Member Avatar for peter_budo
0
161
Member Avatar for pradeep2002gs

Dear all, i'm facing a prob for past few days that my servlets classes are not referenced properly in glass fish server . i downloaded a project from sourceforge.net named Javalibrary [url]http://sourceforge.net/projects/javalibrary/[/url] i imported all the files and all files working properly in netbeans i mean i can run the …

Member Avatar for jwenting
0
104
Member Avatar for feoperro

Hi, I would like to know if it's possible to have a web application that processes data like this: 1. Submit form data in a JSP, using the: action="myServlet". 2. In the myServlet code, we process the requests and responses and add what we need to add into sessions. 3. …

Member Avatar for feoperro
0
98
Member Avatar for feoperro

Hi, I'm having a problem debugging a piece of code. I will paste the JSP version (that works) and then the exact same thing in Servlet form (that does not work). The code's function is to change a picture on mouseover and then revert onmouseout. I will paste for only …

Member Avatar for feoperro
0
200
Member Avatar for rs25

Hello All, While Browsing thru some sites I visited a site [url]http://www.tattooart.pl/[/url] When you visit by links it work fine but when I delibrately omitted some text in url i can see the Directroy structure and can even access them [url]http://www.tattooart.pl/pliki/[/url] Can you People focus as how this can be …

Member Avatar for rs25
0
137
Member Avatar for timon_zed

Hello good citizens, Am trying to implement a simple web based shopping system, however I want to find out if there is a way in which i can reduce the quantity of goods in stock after customer buys just by using servlets without me having to go to the database …

Member Avatar for timon_zed
0
457
Member Avatar for peter_budo

After spending some time on JSP section of this forum as many before me, I come to the conclusion that we are in need of "proper" tutorial on this topic. This tutorial is not intended to teach you everything from top to bottom, it is just a starting point to …

16
7K

The End.