3,760 Topics
| |
<html> <body> <%@page import="java.sql.*"%> <form method="post" action="csea.jsp"> <table border="1"> <tr><th>Reg No</th><th>Name</th><th>Present/Absent</th></tr> <% String pa = request.getParameter("pa"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:Student"); Statement st = con.createStatement(); ResultSet rs = st.executeQuery("select * from student_details"); while (rs.next()) { %> <tr><th><%=rs.getString("reg_no")%></th><th><%=rs.getString("s_name")%></th> <th><input type="text" name="pa"/></th> </tr> <% } st.executeUpdate("update csea set pa='"+pa+"'"); con.close(); … | |
Suppose i have a standalone java project that performs two main functions, send and recieve. I want to deploy it to the glassfish server to be used just like that. An EJB connects to it though a resource adapter, and i just want it to run one of those methods, … | |
Hi all, when I use equals method is not working when i tried to check password from database and from textfeild both the values are same but eqals method shows error my code is if(strPasswordNew.equals(passwordManager.getPassword())) My complete code for rreference String strPasswordOld=request.getParameter("oldpassword"); String strPasswordNew=(request.getParameter("newpassword")).trim(); String strPasswordNew1=(request.getParameter("newpassword1")).trim(); if(strPasswordNew.length()!=0 && strPasswordNew.equals(strPasswordNew1)){ dataManager.getConnection(); … | |
I'm trying to create a jUnit test for my EJB's and if my app just contains a few beans everything's all good but as soon as I incorporate JPA and entity-classes my jUnit test blows up. My test fails at ejbContainer = javax.ejb.embeddable.EJBContainer.createEJBContainer(); and the stack trace says the following: … | |
is it possible not to include the account password for the user that will send the email. i tried not to put password but it does not work. the email that can send only is the one that is set. please help. this is the code: <%@ page import="java.io.*,java.util.*,javax.mail.*"%> <%@ … | |
the web app is a simple calculator that adds and subtracts. my problem is that the add and the subtract buttons don't work i get an error message: "An error occurred at line: 19 in the jsp file: /adder.jsp Invalid character constant" <% String name = (String) session.getAttribute("name"); if (name==null) … | |
package edu.edusys.demo.jdbc.dao; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import edu.edusys.demo.jdbc.bean.Customer; public class CustomerDAO { private Connection connection; public CustomerDAO(Connection connection) { super(); this.connection = connection; } public boolean addCustomer(Customer customer) throws Exception { String sql = "INSERT INTO Customer" + "(name,address,phone)" + "VALUES (?,?,?)"; PreparedStatement ps … | |
My web hosting service provider allows me to uplaod my ROOT.war file only. and there is no directory structure. So is there any way by which I can upload pics and add new pages or make changes in existing pages without re-uploading the entire ROOT.war file. P.S. I also want … | |
Hi,I havent posted in over a year but I need a good starting point for a class project. We are using netbeans with glassfish. We have to create online Library. Below is my starting point. Any help is appreciated.I just need a starting point at this time. Im a little … | |
Please any one help in this problem, stuck in this. i want difference of login time and log out time, get time from machine in this way 090010 (hour, minute,second), i want to separate time with "-" and insert in database. e.g. login time from machine = 091043 , save … | |
hai am trying to submint form using document.forms.myForm.submit(). it's work fine in firefox.but it's not working in ie please help me.actual i have two from. I have also tried document.['myForm'].submit() method. <script type="text/javascript"> function showBrowser() { document.getElementById('imageFile').click(); } function submitElmentImage(){ document.forms.myForm.submit(); } </script> <html:form action="/ext" onsubmit="return validateElementForm(this)"> <html:button onclick="showBrowser()" /> … | |
the simple thing i want to achieve is to be able to browse a file on my system an then use a servlet to finally store the file as a byte stream to my DB2 database. Initially i started by using coding the servlet part as a java application by … | |
**Hello everyone, I dont know if im placing this in a good place. I have a problem with my application. Its a simple application with connecting to database, retriving info and populating table. I changed the apache tomcats context.xml to looks like this:** <Resource name="jdbc/test" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" … | |
Hi there i recently started web applications using jsp and servlets, is it possible to get all http sessions of logged in users in a servlet? | |
I need some help for the development of my website. I want to send and sms through jsp. anybody can help? i don't have any idea for this.. | |
hello every one i trying to display image in jsp by using following code <% System.out.println("from the view page"); String imagePath =(String) request.getAttribute("path"); System.out.println(imagePath); %> <img src="<%=imagePath %>"/> variable imagePath shows the correct path where imge is store but it doenot display any image please suggest me some way to … | |
Hello everyone, I am designing one website in which I want to build one chatting application. My problem is in which technology chat application will be develop like jsp, servlet and spring and how to start to develop chat application. I heard about RMI so using RMI it is possible … | |
m trying to connect my project wid oracle db ..wts wrong wid dis code yr....:( <%@page import="java.sql.ResultSet"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ page import ="java.io.*"%> <%@ page import ="javax.servlet.*"%> <%@ page import ="javax.servlet.http.*"%> <%@ page import ="java.sql.*"%> <%@ page import="java.sql.*" %> <html> <head> <title>db</title> </head> <body> <% try{ System.out.println("hi"); Class.forName("oracle.jdbc.OracleDriver"); Connection … | |
HI, i want to store the text present in the text area in ms access database when user clicks submit button.....i am using macromedia dreamweaver..........pls kindly help me for doing this............ | |
Hello, I was looking for a way to post multipart/form data to a servlet using java standalone application. Any information would be helpful. | |
hello everybody first of all thanks to Daniweb and all its users for helping me lot of time. now come to the problem I've just started studying servlets 1 week back it was going well but i got one problrm when i try to run a packaged servlet code. path … | |
hi all, I have doubt in my project,I have created Login page using MVC, If user name and password correct then LoginServlet navigates **user.jsp** page which has has user name ,latest events,andd other user informations, In user.jsp i have one link for **editsettings.jsp** which helps to edit user details,after edit … | |
Hi Friends, I need to some help in connecting to webserver using c shell or tcl scripting in linux ie in my office in linux system we have some intranet which is run by tomcat server so i need to connect to that server and read some data existing in … | |
Hi, We are developing a software in j2ee/jboss appserver. I have designed a login page the source code of which is given below, loginpage.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> <title>index of third eye</title> <link rel="stylesheet" href="stylepage.css"> <meta http-equiv="Content-Type" content="text/html; … | |
Hello I appreciate all the help i can get on this ,i am running a javabean on my application server inside the network ,this java gets requests from the apache web server on the DMZ ,my firewall admin has rules for my users to connect using defined ports numbers ,my … | |
I have this Code... ifsDAO.java [CODE]package source; import java.sql.*; import java.sql.SQLException; import java.util.*; public class ifsDAO { private Database database; public ifsDAO(Database database) { this.database = database; } public List<ifsBean> list() throws SQLException { Connection connection = null; PreparedStatement statement = null; ResultSet resultSet = null; List<ifsBean> ifs_array = new … | |
Hi, I'm building a battleship game that has multiple sessions over an apache server. It's a server/client containing servlets & jsp's. Let's say i have a jsp page that shows all the boards, for each session i want this page to be refreshed as soon another player makes a move. … | |
Hi, I am having trouble debugging this code.Please be kind enough to have a look.[CODE]<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Bogus Order Calculate</title> </head> <body> <H1>Bogus Order Calculate</H1> You ordered these items: <form action="FinalizeOrder.jsp" METHOD="POST"> <% if("Dictionary".equalsIgnoreCase(request.getParameter("book"))) { %><input type="hidden" name="book" value="10.00"> a Book<BR><% } if("Coffeecake".equalsIgnoreCase(request.getParameter("food"))) { %><input type="hidden" name="food" … | |
Hello, I am a beginner. I want to setup my local account in debug mode. My code is on the remote server. After setting up my local account in debug mode i want to use that code from a remote server . How should i do that? I am using … | |
I am writing a front end page on jboss 4.2 and in my main page there are some redirection links to other pages. Somehow, when a user clicks on a link the redirected page address is shown with IP. tag's src attribute is "./newPage.jsp" Can you help me please, am … |
The End.