Undefined variable error

815 byte By mpburke at 2007-9-26 2:24:47
I defined the two variables upper_limit and lower_limit in my bean but I get an undefined variable message when I try to use them in my jsp page. Can anyone see what the problem is? JSP code: I'm thinking of a number between <%=lower_limit%> and <%=upper_limit%>.<p>error ...

Multiple Session Beans ? Losing One Bean ?

2514 byte By bryanwclark at 2007-9-26 2:24:53
Hi,I'm trying to make a multiple page input form where the user clicks on a next button to get to each different page and enter the cooresponding information to that page.I have a JSP page acting as the controller for this currently here's what that code looks like: Controller.jsp --<%@ ...

Servlets and Cookies

2161 byte By srp15 at 2007-9-26 2:25:13
Hi I am trying to set a cookie in a servlet and redirecting the servlet to a static html page. In the html page I have javascript code which is unable to read the cookie set by the servlet. Quick help is appriciatedNote: Servlet is running on the WebSphere where webshpere on port 10200 and the ...

International Char. Sets

665 byte By PhilMcCartney at 2007-9-26 2:25:27
Hello, Does anyone know how to force the browserto use a particular charset with JSP?I am trying to write a page in Japanese,but the browser keeps switching tothe default ISO. I have alreadytried setting the contentType in thepage tag, but I can not find a listinganywhere of legal char sets.The ...

Passing reference for Stateless Session Bean from JSP to JSP

3365 byte By honestcox at 2007-9-26 2:25:45
I am trying to build a simple bookstore website as part of a school assignment. I am using EJB's, J2EE1.2.1 and JSP. I am not using any servlets at this point because I had trouble getting the deploy tool to work with them, but that is another story. Essentially, here is what I am doing ...

JSP and Swing

2692 byte By smt123 at 2007-9-26 2:26:19
HI,In JSP if i want to import a class file(java application) the i use<%@ page language="java" import="DrawTable" %><jsp:useBean id="select" class="DrawTable" scope="request" /> </jsp:useBean> <% select.displayTable();%> where displayTable will be my method of class ...

dateformat

400 byte By des_xu at 2007-9-26 2:26:20
Hi, I go a small prob, hope someone can help miString past = "30/12/01";java.text.SimpleDateFormat x = new java.text.SimpleDateFormat("dd/mm/yy");java.util.Date mypastDate = x.parse(past);out.println(mypastDate);by right, this output should be 30/12/01 but it give mi this output, how come?Tue ...

how to store a string containing single/double quotes

331 byte By baskibv at 2007-9-26 2:26:46
HI,When storing a string from a textarea into a access database i have problem when the string contains single quotes or double quotes. The value is not updated in the database. My insert query isinsert into tablename values('"+request.getParameter("desc")+"')");thanks in advance.baskar ...

Get Browser informations in JSP/Servlets

112 byte By LeBigornot at 2007-9-26 2:27:15
How can I get informations (name...) about the browser who call my servlet ?Please help me

How can i count number of active sessions ?

362 byte By nchhonker at 2007-9-26 2:27:21
Hi All, I am in great need to count number of active(valid which are not dead at given piont of time) sessions of my servlet.Actually i want to restrict login whenever more than specified(say 10) the number of person's logged into my system.How can i do this ? Please help me out .Thanks in ...

<%@page contentType="text/html;charset=utf-8"%>

898 byte By qinjiwy at 2007-9-26 2:27:33
<%@page contentType="text/html;charset=utf-8"%>This code is error?I put this code at the head of my jsp file,but error.Test.jsp<%@page contentType="text/html;charset=utf-8"%><HTML><HEAD><TITLE>HELLO WORLD</TITLE></HEAD><BODY><P>HELLO WORLD ...

opening a disk file with a button of jsp

317 byte By rohit29 at 2007-9-26 2:27:40
Hi !Can anyone suggest me as to how to open a file for ex a txt file with a specific name existing at a hardcoded location with a click of a jsp's button.I do not want to use the window.open function since it open the txt file in the browser window.... i would just like to open the file. ...

How can I create a "Resultset Browser" ?

495 byte By jshamann at 2007-9-26 2:27:59
Hi all, I'm a beginner in java tech who want to create a "Resultset Browser" : I mean a resultset containing result from sql query, I want to display only 5 (or whatever u want) result in a html array. Behind this array two button (linK) next and previous to go throught the 5 other (more) ...

Tomcat running in the back end

143 byte By mrlai at 2007-9-26 2:28:02
Hi gurus, I'm running Tomcat on Win2k. Is there a way to hide the command window when starting the Tomcat? (beside a NT service)

JSP page dinamic refresh

239 byte By florins1 at 2007-9-26 2:28:36
Hi.My ServletController gets data from a MS Access database and send it to a jsp for displaying.Another user modify my database.How do I refresh my jsp page for displaying the new data from the database ?

File Transfer b/w Client - Server using JSP

573 byte By coffeejava at 2007-9-26 2:28:53
Hi,I need to implement a file transfer between the client and the server using JSP / Beans. The files can be XML Documents, Images (.gif,.jpeg) or even MS Word documents. The user has a set directory on his file system where the files are to be saved upon download and retrieved upon upload. ...

session.putValue("userid",userid) --> how to expire after 40mins of no acti

129 byte By adamrau at 2007-9-26 2:28:58
Using the above session attribute, how do i expire it after 40 mins of no activity. Thanks adam

JSP trouble on iPlanet webserver

295 byte By peirlinc at 2007-9-26 2:29:19
Hi,I'm having trouble getting some jsp files to work in a subdirectory.The same files in the root are working fine. The moment I put them in a subdirectory, the files refuse to compile and I get a server error.Can any-one help me out?Thanks.Yves

How to get HTML form values in the same JSP

482 byte By killC at 2007-9-26 2:29:52
Hi all!For example, I have a "newuser.jsp" and I use an "addUser(...)" method there which needs some textfield values from the form being generated by itself (newuser.jsp). To migrate to the JSP Page I came from ("next.jsp"), I use an additional JSP Page which receives hidden values from ...

How to import API classes in JSP?

362 byte By ggiam77 at 2007-9-26 2:29:58
hi,What is the syntax for importing Java API classes in JSP (like in .java files)?I've tried,<% import java.util.*; %><%! import java.util.*; %><%@ import java.util.*; %><%@ page import java.util.*; %>...all don't compile!Please help. Thanks very much!Gerald. ...

Accessing an existing JavaBean from a servlet

369 byte By rajbhaskar at 2007-9-26 2:30:00
Hi folks,I have created a JavaBean with session scope in a JSP and now want to pass this to an existing servlet where several of the methods will be needed, but I don't know how to make the servlet see the Bean. I know that in a JSP you would just use jsp:useBean, but what is the corresponding ...

How to unload a JSP app

235 byte By peterbarry2002 at 2007-9-26 2:30:22
Folks,I was wondering can anyone suggest how to unload a JSP application? Is there a command that I could useto allow a user to exit the application?I would be grateful for any help Peter

Date problem

196 byte By geetuR at 2007-9-26 2:30:28
Hi all, I want to create a Calendar in jsp. I want to find out on what "day" would the "first" of a month occur. Also, is there any way of finding number of weeks in a month ?

I have two dates that are oracle DATE type. How to subtract and get days/hr

252 byte By adamrau at 2007-9-26 2:30:35
How to subtract two oracle dates and get the result in days/hours/minutes/seconds.Oracle keeps telling me that i need to do PL/SQL but i dont know it. They will not give me an example in JAVA so i came here.ThanksAdam

How to make the Open/Save dialogue download the text file instead of JSP

4872 byte By huangjjing at 2007-9-26 2:30:39
I am currently coding on a JSP program, which searches the database and writes the resultset into a file on the server, and then allows the client to download this tab delimited text file onto their local machine. But I met a problem, when the default Open or Save dialogue appears, it shows ...

using bean to insert data into database from jsp

1396 byte By reddy94 at 2007-9-26 2:30:51
hai,i am trying this i am getting null pointer exception at Db.insertData();<jsp:useBean id="Db" scope="session" class="DataBaseConnect"></jsp:useBean><% String sql=null; sql="insert into employee(job_desc,emp_name) values ('manager','xxxx')"; Db.openConn(); ...

Tomcat as add on server with Apache

240 byte By BRoberto at 2007-9-26 2:30:55
I have to install Tomcat 4 on a linux machine (Debian) as an application server (that is Apache serves the static content (html) and Tomcat serves jsp file)How can I do ?ThanksRoberto(caaib@tin.it)

how to pass object to JSP

1023 byte By chiranjp at 2007-9-26 2:30:56
Once I've created a Connection Pool how can I pass that pool object to another JSP?I am able to create a ConnectionPool successfully like so//Suppose this is: "welcome.jsp"<%DBConnectionPool myPool = new ...

Alias for column names : Urgent

434 byte By Priyam at 2007-9-26 2:31:02
Hi ,I want alias names for my columns.I'm writing query like thisinquiryBean.setQueryStatement("SELECT CDE AS "New Code", TXT AS "New Text" FROM TNR004_PY_METH");But it is giving me an error because there is space between New and Code also double quote problem is there.In short I don't know ...

BUG!

7091 byte By skywalker0110 at 2007-9-26 2:32:56
I am designing a portal application. There are only 3 pages: #1 Login page that submits a form to #2. a main jsp page that includes #3. Another jsp which defines a class. The application works fine (you can put your login info in and it will search a database and do other stuff) it even givs ...

How do I limit length of a dropdown menu?

593 byte By moined_mogul at 2007-9-26 2:32:58
I have a drop down menu that represents a field in my database table that is several hunfred characters long. How could I limit the size of the text box on my JSP page so that it doesn't represent the entire length of the string? Either cutting it off at a certain point and not being able to ...

Limiting length of entered string in text box

469 byte By moined_mogul at 2007-9-26 2:33:01
In my JSP page I have a text box where the user enters a string. I want to send the user an alert using javascript if the length of the string is greater than 7 characters.Does anyone know how I could go about doing this? Would something similar to what I have below work?Thank ...

servlet-jdbc (error:500) help

1231 byte By raghav21 at 2007-9-26 2:33:04
hi,i am trying a small program on interaction with jdbc and servlet , I am having a html page with a button , which when pressed invokes a servlet through post method which prints out a list of book in the database with its author,isbn etc. when i load the html page and click the button , i get ...

JAVASCRIPT

384 byte By manohar2 at 2007-9-26 2:33:09
Friends I am now familiar with JSP pages,and wondering how JAVASCRIPT will be useful for me.I am zero in JAVASCRIPT and I am not sure wether I will ever be needing it.Well I know that JAVASCRIPT can be used to build pages dynamically at the CLIENT site.Right ? Can some one tell me wether it is ...

null pointer exception

1427 byte By reddy94 at 2007-9-26 2:33:21
hai, i am trying this i am getting null pointer exception at Db.insertData(); <jsp:useBean id="Db" scope="session" class="DataBaseConnect"> </jsp:useBean> <% String sql=null; sql="insert into employee(job_desc,emp_name) values ('manager','xxxx')"; Db.openConn(); ...

Old pages keep reloading after database info is changed

736 byte By JeffMcLean at 2007-9-26 2:33:40
Hey everyone:I'm having a problem here...I have this database management thing done in pure servlet. There is a list of DB stuff, and then a button u can push to add info/delete an entry. So you add the new line or delete an entry, some DB updates are made, and then you are returned to the ...

xsl:include and WAR Files

733 byte By ksreenivas at 2007-9-26 2:33:53
We are trying to deploy our application using WAR file approach. All our JSP and servlets are working fine.We have our reports generated based on XSL files. XSl files are put into the war file.In my transformation servlet, I am loading the original xsl file by calling ...

Which submit button was pressed?

311 byte By natanfw at 2007-9-26 2:34:18
I have a form with several submit button that go to the same servlet. To define the next JSP to redirect I need to know which button was pressed. In ASP i'll use button.x as a parameter name. I tried both .x and .X - the servlet doesn't recognize neither one. What is the correct way to do ...

newbie quesiotn: What do I need to run JSP

176 byte By priyanka12 at 2007-9-26 2:34:22
What do I need to run JSP. Is there any extension for running JSP with Apache.I could not find much documentation on set up of JSP except at J2EE tutrial.

problem compiling servlet

913 byte By wdewerff at 2007-9-26 2:34:55
I have IIS5 and Jrun and jdk1.3.1. Im trying to compile a basic servlet for the first time.... I get errors regarding the Http....here is the code..... import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class HelloWorld extends HttpServlet {public void doGet ...

How to set / get Cookie value for JSP

162 byte By erwinba at 2007-9-26 2:35:08
I know that servlet can set some cookies value by responese.addCookie(myCookie), but how to set orget the cookie value for JSP.Thanks.

passing values in jsp.

1908 byte By mingsenjiang at 2007-9-26 2:35:12
String[] numbername ={"1","2","3"}; String numval[] = new String[3]; for(int j=0; j<names.length; j++){ %> <TR><TD BGCOLOR=666699 ALIGN=CENTER><b><%=j+1%>.</b></TD> <TD BGCOLOR=AAAAAA ALIGN=CENTER> <font ...

format text

385 byte By des_xu at 2007-9-26 2:35:15
Hi, I have got a paragraph of words that i retrieve from my database, I wanted to convert this paragraph to a single sentence, for example, i got ABCD EFGHIJKL from my database into a String call first, then I like to reorganise the paragraph into ABCD EFGH IJKL and put in into String second, ...

Submitting Array to server in JSP! URGENT!

284 byte By franierhose at 2007-9-26 2:35:31
Hi! I hope you can help me with this one ... I've got difficulty submitting a set of array from my JSP page to the server. How can I do this? How can I submit those arrays and post it first to my HTTP Request in URL and then submitted to the server? Thanks in advance..

Error in updating record - Please help

746 byte By s29763 at 2007-9-26 2:35:33
Can anyone please help to explain why there's such error message? (I copy this code from the textbook.)******Root cause: java.lang.ArrayIndexOutOfBoundsException*****<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con = ...

HOW TO CREATE WAR FILES

383 byte By JackoJaver at 2007-9-26 2:37:34
hello,i can't seem to get the build all and build dist commands to wrok so that i can create a WAR file for my application. I try at all levels in the /tomcat/ hierarchy.On the same note.. if i have a .properties file in the WAR, can that properties file be changed, given that it is in some ...

jsp/beans files invoking problem in JWS2.0

2313 byte By Abhi325 at 2007-9-26 2:37:35
My jsp files are invoked when I open them in the browserusing both jswdk and JWS. But the links or Submit buttons of the files don't work in JWS only, displaying an error -Error during JSP page processingjava.lang.NoSuchMethodError: java.lang.System: method ...

Going on my nerf with Invalid cursor state

953 byte By LearningSTF at 2007-9-26 2:37:38
Hi all, It's going to make me mad : i can't retrieve value from resultset for(int t=0;t<Integer.parseInt(request.getParameter("ResList"));t++){ran=(int)(Math.random()*(maximum-minimum))+(minimum+1);System.out.println("Voici le chiffre randomiser : " + ...

Parseing a Float from a string.

251 byte By markrob4 at 2007-9-26 2:38:11
Does anyone know how to parse a float from a string variable? The documentation says there is a method for it, it doesn't say what it is(?).I.e. the equavilent of int this_num.parseint(this_string) only for a float.Thanks.

File Upload using MultipartRequest.

1954 byte By rakeshahuja at 2007-9-26 2:38:27
Although file gets uploaded successfully, I get the following WARNING message in my log file when ran on NT/2000 which is okay.The message says:"One of the getParameter family of methods called after reading from the ServletInputStream, not merging post parameters".But when I run the same code ...