3,760 Topics

Member Avatar for
Member Avatar for Papitha Murugan

[CODE] <%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection conn = null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); conn = DriverManager.getConnection("jdbc:odbc:mydsn","a", "a"); PreparedStatement psInsertRecord=null; String sqlInsertRecord=null; String dt=request.getParameter("datum1"); String Name=request.getParameter("Name"); try { sqlInsertRecord="insert into ATT (Date, Name) values(?,?)"; psInsertRecord=conn.prepareStatement(sqlInsertRecord); psInsertRecord.setString(1,dt); psInsertRecord.setString(2,Name); psInsertRecord.executeUpdate(); } catch(Exception e) { out.println("Unable to connect to the database"); } try{ if(psInsertRecord!=null) …

Member Avatar for Stefano Mtangoo
0
78
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 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([B]result of a join query[/B])as a an arrayList using the existing bean class. I will show my code as some one …

Member Avatar for sugumarclick
0
194
Member Avatar for mutawari

Dear all, I have some table on my database. i had input them via JSP and i view them on JSP too. i use simple MySql queri in it to view the values of the Table. But when i use another query like : [CODE] SELECT tabel_jawab.nis, CASE WHEN (tabel_jawab.jwb1=tabel_kunci.Kjwb1) …

Member Avatar for javaAddict
0
64
Member Avatar for brave2010

i have attached the file i got this system which is help desk information using jsp and servlet but i don know weather its working or not i dont know how to run it?i have netbeans installed with tomcat and mysql..any one can tell me is it working or not …

0
49
Member Avatar for jhonilson

I am having a small problem with getParameterValues function and my algoritm. Before I will explain how is my data table showed: [COLOR="Red"]| value1 | value2 | TextArea | CheckBox | [/COLOR] Then when I check any checkbox and press submit it call other servlet and read the parameters : …

Member Avatar for javaAddict
0
1K
Member Avatar for letheredge

So, I'm using two jsps: test1.jsp and test2.jsp. I'm importing the second in the first using c:import. I'm able to pass in a value to test2 using c:param. How do I a) use this value as a variable in test2 and b) pass back a variable to test1? Some example …

Member Avatar for martin5211
0
82
Member Avatar for Harine

Hi, i'm working on migrating csv data into MySQL using jsp. I would like to know if the sql statement shown below can be used in jsp and where i can get examples on the codes. [CODE]String sql3 = "LOAD DATA LOCAL INFILE 'test.csv' INTO TABLE test FIELDS TERMINATED BY …

Member Avatar for peter_budo
0
175
Member Avatar for madhub2v

I got the basics of Sevlets and JSP , now I want to get a good knowledge of the language and improve my coding skills so I want to start on a project. please suggest me any resource from where i can get sample projects to learn from them on …

Member Avatar for madhub2v
0
124
Member Avatar for himmat.m4

I want to change image at click event in jsp. suppose I have img1 and img2, whenever I click on img1 thn display img2 and again click on img2 then display img1. so tell me how to do that. code is [code]<%-- Document : imgChange Created on : 26 Aug, …

Member Avatar for javaAddict
0
255
Member Avatar for yuvi2288

hi, i have issues regarding parse the following xmlns code with jsp....can anyone help me .. <response> <lf:request_type>listing</lf:request_type> <lf:response_code>0</lf:response_code> − <lf:result type="listing" count="10"> − <lf:item id="33585487"> <lf:attr name="title">Used 2001 Ford Mustang SVT Cobra Cobra</lf:attr> <lf:attr name="year">2001</lf:attr> <lf:attr name="make">FORD</lf:attr> <lf:attr name="model">MUSTANG</lf:attr> <lf:attr name="price">18991</lf:attr> <lf:attr name="mileage">17424</lf:attr> <lf:attr name="auction">no</lf:attr> <lf:attr name="city">Dearborn</lf:attr> <lf:attr name="state">Michigan</lf:attr> …

0
84
Member Avatar for moied

I have one jsp file which inserts data in a database. Currently I have coded like the database file is available in c:\. I mean I have given a path to c:\ in code. But I want to save that in my application folder. So In jsp Did any one …

-2
35
Member Avatar for white feather

Is there a way to add a user to a group in J2EE dynamically (using glassfish btw)? If so, is there a away to have a user in a group called members to be promoted to an admin group. Thanks in advance

0
147
Member Avatar for kesh1000

hi all im writing a website for a life insurance agency as a final year project and i need the system to have a mechanism of an online payment system. i have no idea how to create it. could anyone lead me to a tutorial or something which can help. …

Member Avatar for kesh1000
0
578
Member Avatar for amrutan

can anybody tell me, how to create table dynamically in the same JSP page. I'm using Jsp servlet and hibernate technologies.

0
47
Member Avatar for forumite

Training management system: Hi, I want to build a webpage in a plain HTML, JavaScript, CSS. In this webpage, I want to build a TRAINING MANAGEMENT SYSTEM. Requirements: 1. A form which should take the trainee's unique id and process it. If the entered trainee ID matches with any of …

Member Avatar for Henzard
0
225
Member Avatar for Papitha Murugan

[CODE] <%@ page language="java" import="java.sql.*" errorPage="" %> <% Connection con = null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); Connection conn = DriverManager.getConnection("jdbc:odbc:mydsn","a", "a"); PreparedStatement psSelectRecord=null; ResultSet rsSelectRecord=null; Statement st=null; String sqlSelectRecord=null; String Name=null; String id=null; String doj=null; String address=null; String contact=null; String dob=null; String blood=null; String gender=null; String pan=null; String martial=null; String email=null; String f1=null; …

0
53
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 ishlux

Hi all, I have an jsp code for registration page... i have used ms access for storing the data.......but after running, ,,,, its giving an error.... data source name not found,,,no default driver is found........how to overcome with this problem.........pls do reply........ Thanks in advance ishlux

Member Avatar for moied
0
189
Member Avatar for letheredge

Hi. I have two files, one HTML/Javascript and the other JSP. They run on different servers. I need the HTML/Javascript file to communicate with the JSP. Basically, I need to run the HTML/Javascript, pass in a variable to the JSP, run the JSP, and pass a variable back to the …

0
37
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 ashish22343

I have a problem, I want to change the value of the textfield dynamically, Like,I have a form with its values set at the start( using database) , but when i update the form and redirect to the same form with same text fields,I have to set that value changed …

0
58
Member Avatar for letheredge

Hello, I am having trouble getting my c:param working. I've looked all around the web for a solution. Here's some of the code that I have: test.jsp <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" language="java" errorPage="" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <html> <head> </head> <body> <c:import url="test2.jsp" > <c:param name="testVar" value="0" …

Member Avatar for ~s.o.s~
0
330
Member Avatar for raghujosh

I have a JSP( a form) that calls a servlet when I click the submit button. I want to add javascript validation to the form fields. When I try to embed the script it does not run. I tried to link the file to the JSP, but that also did …

Member Avatar for javaAddict
0
2K
Member Avatar for vponnoju

Hello All, I am not sure, if this is the right place to post this query. If not, please redirect me. Here is the brief explanation of I have a web application (GWT application) project in Eclipse. I have a server side code which interacts with LDAP directory for some …

Member Avatar for vponnoju
0
277
Member Avatar for raghujosh

I am trying to deploy a simple web application. I only have 2 files, Entry.html and UpdateDBServlet. I have placed them under a directory in the webapps of tomcat. I can access the entry.html when Tomcat is running, but upon pressing the submit button, the UpdateDBServlet should be called, however, …

Member Avatar for raghujosh
0
186
Member Avatar for srdva59

hi, i need activate a div to inform the user when a page is doing something in ajax or a hidden iframe. i need put a div on top of all elements and when the job is done simple remove that div. is there is a way to lock the …

0
57
Member Avatar for ursiguy

Hi i am beginner to java, My requirement is i need to scan the database changes every second and need to show the changesin the jsp, I have started to write progrmme as below......My major problem was the data was not appending to the jsp but after exiting the while …

0
22
Member Avatar for agent7
Member Avatar for agent7

<SCRIPT language="javascript"> function box(){ if (document.getElementById('adminUserName').value == " "){ alert("UserName is Empty"); }else{ alert("UserName Successfully Save"); } } </script> ===================================== <td>User Name:</td> <td colspan="2"> <div id="adminUserName"> <html:text property="adminUserName"/> </div> </td>

Member Avatar for agent7
0
78

The End.