90 Topics

Member Avatar for
Member Avatar for shilu2

Hi All, Can you please help me how to create user defined function for database connectivity and return values to anather servlet. I have tried following code but it indicates error can not find symbol package controller; import java.io.IOException; import java.io.PrintWriter; import java.sql.*; import java.util.*; import java.util.ArrayList; import javax.servlet.RequestDispatcher; import …

0
83
Member Avatar for manish250

Hi All, I am not been able to understand "What is application context" even after trying a lot on google.Can anybody make be understand the application context concept and how it is different from servlet context. Thanks

0
122
Member Avatar for bcwoodz
0
99
Member Avatar for alanborder

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 …

0
213
Member Avatar for Pravinrasal

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 …

0
105
Member Avatar for james chaco

Hello, I was looking for a way to post multipart/form data to a servlet using java standalone application. Any information would be helpful.

Member Avatar for james chaco
0
151
Member Avatar for aman rathi

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 …

Member Avatar for anand01
0
184
Member Avatar for mits28

i am making a simple bike site using servlets.i have a hyperlink toh a productServlet in menubar..but when i click dat hyperlink.it keep on showing connecting.and page do not load..anyone can tell what could be the reason..i can't show code here..

Member Avatar for peter_budo
0
135
Member Avatar for Niittii

Here is the Login.jsp: [ICODE]<!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=UTF-8"> <title>Login</title> <script type="text/javascript"> </script> </head> <body bgcolor="#999966"> <p>&nbsp;</p> <form method="get" action="http://localhost:8080/WebApplication1/Login"> <% if (request.getAttribute("error")!=null) { %> Login failed. Please try again <BR><HR> <% } %> <p> &nbsp;&nbsp;&nbsp;&nbsp;Username: <input type="text" name="uname" size="20"></p> <p> …

Member Avatar for vtm
0
473
Member Avatar for jimmyabhinav28

I am parsing a file and populating a static array of objets in a servlet. Then i pass the static array and try to access the array in the jsp by using the JSTL <c:forEach> tag in the loop i want to populate a table. I am perfectly able to …

Member Avatar for ejosiah
0
142
Member Avatar for slasherpunk

I'm trying to run a simple servlet that counts the number of times a user visits the page using cookies but I'm getting the following error. I thought that NullPointerException was because there were no cookies at all in the browser. But after checking I found a couple of cookies …

Member Avatar for NormR1
0
327
Member Avatar for jsawant85

Hello everyone! I am new to this forum and a beginner programmer. I wish to develop a small social networking site using JSP/Servlet and other useful java technologies. Your help is needed a s I am not much aware of the SDLC process. Need your help starting from the basics …

Member Avatar for jsawant85
0
403
Member Avatar for warlord902

I am new to JSP/Servlets, so here is what I am trying to do: suppose my url is [url]http://mywebsite.com/[/url] and user come on this and it shows a login form, after submitting the form I want to keep the url the same as before that is [url]http://mywebsite.com/[/url] means it should …

Member Avatar for bkd
0
472
Member Avatar for divsok

how can i add values of each registered name to a combo box in a servlet dynamically and get each values from it ? i have an ArrayList of each registered name.

Member Avatar for divsok
0
106
Member Avatar for divsok

i have Register page and Login page.And for save usernames and passwords i used arraylists in a servlet.how can i forward these arraylists to another servlet for validate username and passwords..?

Member Avatar for divsok
0
167
Member Avatar for deepdon

I am getting java.lang.nullpointer exception for this code plzz help me out all database linked programs are creating same error [code]import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; public class retser extends HttpServlet { Connection c; Statement st; ResultSet rs; ServletConfig config; public void init() { config = getServletConfig(); try …

Member Avatar for stultuske
0
140
Member Avatar for begueradj

Hello people I create a simple Hello World project (servlet) o Netbeans. I configured it so as to run under Tomcat, but when I click on Run to execute the project it says this meassage: [COLOR="Red"] /home/begueradj/NetBeansProjects/projet1/nbproject/build-impl.xml:721: The module has not been deployed.[/COLOR] Why is that ?

Member Avatar for peter_budo
0
158
Member Avatar for jeraldmuthu

[CODE] import java.sql.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import java.io.*; import javax.servlet.ServletException; import javax.servlet.ServletConfig; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletRequest; public class MySer extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); } public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,java.io.IOException { String xml; Connection conn …

Member Avatar for hfx642
0
234
Member Avatar for SomeNewGuy

[CODE]<%-- Document : index Created on : Dec 5, 2011, 10:44:50 PM Author : Orange --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>The Collection</title> </head> <body> <center> <%------------------Search-------------------------%> <form method="post" action="search.jsp">Please select the search parameter you want: <select name="SearchDB"> <option>Please select one</option> <option>Collectable</option> <option>Item Owned</option> …

0
90
Member Avatar for warlord902

I'm looking for a good book about Servlets and JSP for beginners. So far, the only book I know and have read is Head First Servlets & JSP, but it's focused more on the SCWCD exam rather than the specifics on building stuff. I'm looking for a book that has …

Member Avatar for warlord902
0
177
Member Avatar for warlord902

I have got everything right and my project is compiling. But I am experiencing problem with servlets, when I right click on a servlet and click on run in netbeans then I get following two error: 1) Class "Servlet1" neither has a main method not it a servlet specified in …

Member Avatar for warlord902
0
2K
Member Avatar for rushi3311

As we know [LIST] [*]ServletContext [*]HttpSession [*]HttpServletRequest [/LIST] are interface in JSP SERVLET api of Java..! We repeatedly use it in our code for different purposes, but i am still confused where and in which class all abstract method for given interfaces are implemented ? Like setAttribute, getAttribute , removeAttribute …

Member Avatar for JamesCherrill
0
162
Member Avatar for rushi3311

[CODE]RequestDispature red = request.getRequestDispature("xyz"); red.forward(req,res);[/CODE] in this simple example RequestDispature is INTERFACE..! "red" is reference for that , but whose instance it actually holds ??? "forward" and "include" methods are of RequestDispature interface...but where they are implemented ??? in which class ?? which class implement this interface ??? Can anyone …

Member Avatar for JamesCherrill
0
216
Member Avatar for jaykool74

Using NetBeans IDE 7.0.1 with Java SDK 1.7.1 and Glassfish 3.x: I am trying to load an ArrayList from a database in the Servlet to be used on the JSP page in a dropdown box that would show stock symbol and company name. I get the following message when trying …

Member Avatar for jaykool74
0
5K
Member Avatar for shivarocks

hello friends i am new to ejb and i tried to create a session bean for obtaining JDBC Connection,and i called it from a servlet the session bean was a remote session bean but connection is not getting established.. EJB CODE : ConnectionBean.java [CODE] package com.ejb; import java.sql.Connection; import java.sql.DriverManager; …

0
115
Member Avatar for manish250

Hi all I am calling a function from my servlet but getting following exception SEVERE: Servlet.service() for servlet In_Servlet threw exception javax.servlet.ServletException: Servlet execution threw an exception at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445) at …

Member Avatar for javaAddict
0
227
Member Avatar for abhinavM

I have a jsp page where I am accessing data from the database and showing the data in table on the browser with radio buttons in between.And then there is a submit button on whose click the control is transferred to a servlet where I reading the status of the …

0
74
Member Avatar for bluerabbit

for my web application I am needed to reply short code SMS queries over HTTP. how can i integrate the service provider API with jsp and servlets. I am using jboss, Tomcat and MySql. Developers API are given below : Bulk SMS API Documentation (Single/multiple SMS via HTTP) for website/software …

0
118
Member Avatar for cmaheshwari16

Hi All, I am using JSP and servlet technology for making graphs. Below please find my jsps, Display.jsp [CODE]<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ page import="java.awt.*" %> <%@ page import="java.io.*" %> <%@ page import="org.jfree.chart.*" %> <%@ page import="org.jfree.chart.axis.*" %> <%@ page import="org.jfree.chart.entity.*" %> <%@ …

0
129
Member Avatar for JoshKumar87

Hello, Can anyone please tell me how to get the arraylist in servlet? Using dao layer, I have connected to database and got the arraylist values. Now I need to pass it to Servlet through service layer. How to use that request.setAttribute in Servlet and how to redirect that arraylist …

0
69

The End.