Re: sendRedirect() from within a ?

2002-05-20 Thread Bhushan_Bhangale
Before the forward call you should not write anything to the response object. If you will write anything to response object and then you will forward to some other URL then you will always get the error. -Original Message- From: Jay Burgess [mailto:[EMAIL PROTECTED]] Sent: Friday, May 1

Re: sendRedirect() from within a ?

2002-05-20 Thread Joseph Ottinger
Gah! The problem is that sendRedirects have to take place before any output is spooled to the client. It's a HEADER. One would hope your container would massage the output and cache the body content until it needs to send it down the line, but apparently it's not doing that. Thus, the is the pro

[no subject]

2002-05-20 Thread Sudhir Kumar
hi, i have a an application which runs when i click on a batch file. But my problem is, once i click on the batch file and the application starts running, the user can come back and click on this batch file again to create another instance of this application. How can i stop this ?? Than

Re: sendRedirect() from within a ?

2002-05-20 Thread Adrian Janssen
Also, does anyone know if this is possible within the context of servlets / JSP? As pointed out sendRedirect actually just sets a header in the response - as I then understand things this is then sent to the browser (the response with just the redirect header and nothing else) and the browser the

JSP & Servlets

2002-05-20 Thread GW
Hi All As far as possible JSP pages should only contain presentation data (html) and not embedded java code. Programmatical logic should be handled in beans and servlets and not in jsp pages. Can someone please be kind enough to tell my why this is important? Kind Regards GW ==

Re: JSP & Servlets

2002-05-20 Thread Ashwani Kalra
The key word here is role separation and avoiding mess when both programmer and web designer are working on the jsp. ~ Cheers Ashwani Kalra http://www.geocities.com/ashwani_kalra/ ~ - Original Message - From: "GW" <[EMAIL PROTECTED

Re: JSP & Servlets

2002-05-20 Thread Francisco Manuel Martínez Suárez
I have three answers: 1. If you have to change common code, you only have to do it in one place:in the bean or servlet, not in all the pages that excute that code. 2. The JSPs would handle the HTML code and/or JavaScript code making them more clear. 3. It is possible then, to have a java team wor

Re: JSP & Servlets

2002-05-20 Thread Zachary Roberts
Also, we should be able to change the look and feel as much as we want without having to worry about messing up the functionality of our program. Changing/Editing presentation layer code should not involve messing with the hard core java functionality code that is working on the back end. >>

Re: JSP & Servlets

2002-05-20 Thread GW
cool, thanx... 8-) - Original Message - From: "Francisco Manuel Martínez Suárez" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 2:25 PM Subject: Re: JSP & Servlets > I have three answers: > > 1. If you have to change common code, you only have to do it in one pla

Re: JSP & Servlets

2002-05-20 Thread Ashwani Kalra
> 1. If you have to change common code, you only have to do it in one place:in > the bean or servlet, not in all the pages that excute that code. This can be achieved by including a common jsp. 2 & 3 are more appropriate. Regds Ashwani - Original Message - From: "Francisco Manuel Martín

Re: JSP & Servlets

2002-05-20 Thread Jiri Chaloupka
Look at www.hyperqbs.org Jiri -- Jiri Chaloupka B2BExpander.com [EMAIL PROTECTED] ** Have you visited www.b2bexpander.com today? === To unsubscribe: mailto [EMAIL PROTECTED] with

Edit ans Save on browser/JSP

2002-05-20 Thread Chan Mal
In my web application …User needs to edit word document on browser which is residing in Server and user has to save the document in Server it self that means at same URL(not on Local PC)... Is there any mechanism for this to handle either Server side or client side if you people know any

Re: Edit ans Save on browser/JSP

2002-05-20 Thread Daniel Liu
Thanks please take a look my page http://members.rogers.com/liu8189/ Daniel - Original Message - From: "Chan Mal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 9:02 AM Subject: Edit ans Save on browser/JSP > In my web application .User needs to edit word > docume

Re: Edit ans Save on browser/JSP

2002-05-20 Thread Madhan M.Srinivasan
Hi daniel Do u have any solution for the question asked by Chal Mal in the page http://members.rogers.com/liu8189/ Imagination is More Important than Knowledge Cheers !!! MSM -Original Message- From: Daniel Liu [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 6:50 PM To: [EMAIL P

Re: sendRedirect() from within a ?

2002-05-20 Thread Elango Palani
Hai Joseph Ottinger, You shall try with > syntax. Hope this will solve your issue. .--- -. (),,,() ( (. .) .-'

Re: sendRedirect() from within a ?

2002-05-20 Thread Jay Burgess
Gah!? You seem to imply that I don't understand the how the redirect actually works. I do. But my understanding from the JSP spec is that the container is supposed to provide an 8kb buffer by default (Section JSP.2.10.1), so the six bytes that make up the string "" should not be sent down the li

off topic ( javascript question ??

2002-05-20 Thread sufi malak
How to call a function in a function in javascripts : Here is what I did, but it does not work : function gotoFunction() { var parameter = form.emplyee.options[form.employee.selectedIndex].value; return parameter; } function faction(target) { if(target == 0) documen

Re: off topic ( javascript question ??

2002-05-20 Thread Emmanuel Eze
Rewrite the faction function as follows: function faction(target) { if(target == 0) document.form.action="insertOutdate.jsp?" + gotoFunction(); if(target == 1) document.form.action="insertIndate.jsp?" + gotoFunction()"; } OR function faction(target) { var employee=gotoFunction(); if(targ

newbie

2002-05-20 Thread Sagine E.Ferrus
I'm trying to have my jsp page connect to a postgresql database. But when i try to view the page it stalls basically time's out, at this line Connection myConn=DriverManager.getConnection("jdbc:postgresql://192.168.1.30:8080/databaseName?user=postgres&password=postgres"); is it the port? cause

Re: newbie

2002-05-20 Thread Isidoros Vacropoulos
the default port for oracle database is 1521. -Original Message- From: Sagine E.Ferrus [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 5:16 PM To: [EMAIL PROTECTED] Subject: newbie I'm trying to have my jsp page connect to a postgresql database. But when i try to view the pa

Re: newbie

2002-05-20 Thread Madhan M.Srinivasan
U can change the tomcat port no in the server.xml file Imagination is More Important than Knowledge Cheers !!! MSM -Original Message- From: Sagine E.Ferrus [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 7:46 PM To: [EMAIL PROTECTED] Subject: newbie I'm trying to have my jsp pa

Re: sendRedirect() from within a ?

2002-05-20 Thread Joseph Ottinger
It wouldn't surprise me to see a bug in Tomcat, since I run up against a few of them all the time. :) Anyway, it's easy to figure out what's happening: telnet to the server/port, do a simple GET on your page that has the redirect, and read the headers. You'd expect the buffering to work, yes. (I

Re: sendRedirect() from within a ?

2002-05-20 Thread Joseph Ottinger
I shall? Why? I don't have any problems with redirects... :) >From: Elango Palani <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and >reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: sendRedirect() from within a ? >Date: Mon, 20 May 2002 19:

Re: sendRedirect() from within a ?

2002-05-20 Thread Jay Burgess
The mystery thickens. I just added "res.isCommitted()" right before my sendRedirect(), and it returns false. So it appears that the response is not being committed (which is what we expect), yet the sendRedirect() is simply being ignored. I'll try your Telnet suggestion now and see what comes ba

Still the Newbie

2002-05-20 Thread Sagine E.Ferrus
Thanks for trying to help but 1. I am not using Oracle, I am using PostgreSQL. 2. Changing the tomcat port from 8080 to something else has nothing to do with Tomcat not beeing able to connect to the database. I need to connect tomcat to PostgreSQL database, i have to write Jdbc driver and in th

Re: sendRedirect() from within a ?

2002-05-20 Thread Jay Burgess
O.K., I'm off to the Tomcat list to pursue this further. I found the following function in the Tomcat source, and am wondering whether it's the root of my problem, and if so, why it's written this way. /** * Disallow sendRedirect() calls on an included response. * * @param

Please help with email an attachment

2002-05-20 Thread Roland Dong
On 4/16/02 3:14 PM, "Richard Yee" <[EMAIL PROTECTED]> wrote: > SC, > Look at the web.xml file in your Apache Tomcat 4.0 conf directory. > The 'listings' init-param of the default servlet entry controls whether > directory listing is allowed. The welcome-file-list parameter entry > controls what f

Please help with email attachment

2002-05-20 Thread Roland Dong
I am using two taglibs to handle sending an email attachment. One taglib handles uploading the file to the server. The other handles sending out the file as email attachment. So I need first upload the file from local disk to the server. My problem is that with new clustered server configurati

Re: sendRedirect() from within a ?

2002-05-20 Thread Hans Bergsten
Sorry if I'm missing something, but I believe this thread started with a quetsion about why of a page that does a redirect doesn't cause the request to be redirected. The answer to this is that an included page (using or pageContext.include()) is not allowed to set headers. If it does, the heade

Re: Please help with email attachment

2002-05-20 Thread Richard Yee
RD, Do you know why you can't upload files anymore? Are you uploading and sending on two different JSP pages? If that is the case, the requests might be going to different servers in the cluster and the uploaded temporary file is not on the same machine as the request for sending the mail. One thi

Problem with session variable

2002-05-20 Thread David Cate
Normally I don't keep sensitive data inside of session variables but in this case it was just simple. I needed a way of trapping the user name and some statitistical information for the duration of the session. So I started placing variables in the session object like this: session.putValue("StTi

Re: Problem with session variable

2002-05-20 Thread Haseltine, Celeste
David, The putValue and getValue methods of the session object have been deprecated as of JSP standard 1.2 (if my memory serves me correctly). If you are using a JSP 1.2 or greater compliant container (servelet/JSP compiler), try the session.getAttribute() and Session.setAttribute methods. Cele

Re: Problem with session variable

2002-05-20 Thread Dasti, Hassan
I don't know how that is going to make a difference, But the current version of JSP , JSP 1.2 uses setAttribute and getAttribute instead of putValue and getValue So, try using the following To set the information: session.setAttribute("StTime", time); and to get the information on differ

Re: sendRedirect() from within a ?

2002-05-20 Thread Jay Burgess
Thank you! Your explanation about setting headers is exactly what I was running up against. I went back to the spec, and section JSP.4.4 calls it out very clearly: "An included page only has access to the JspWriter object and it cannot set headers. This precludes invoking methods like setCookie

Re: sendRedirect() from within a ?

2002-05-20 Thread Joseph Ottinger
Ah, good deal. Not only did I not realise it was in an included page (for some reason, the relevance just didn't sink in), but I didn't know that about the spec, partly because I've not tried to include pages that redirect, so had no need to know. :) Good call, Hans. >From: Jay Burgess <[EMAIL P

Re: Please help with email attachment

2002-05-20 Thread Roland Dong
Richard, Thanks for your reply. Actually, it is ONE jsp handles both upload and email attachment. //upload.jsp .. .. //upload file  File is: <% name="test/test1/"+A; %> . . //attache file <%=name%> . . I was told by our IT department user will not be able to up

showing a looping in JSP with arrays

2002-05-20 Thread Richard Diaz
in my JSP page I get a NULL POINTER EXCEPTION... <%=MyBookmarkArray[1].getpk() %> I have verified there are 3 bookmarks created in my servlet they are session variables using: session.setAttribute("MyBookmarkArray[" + i + "]", MyBookmarkArray[i]); also I can see all my non array session variab

Re: showing a looping in JSP with arrays

2002-05-20 Thread Peter Dolukhanov
You have to use session.getVariable to initialize the said variable on a different page. Also, can anyone verify that you can save arrays this way? Regards, Pete Dolukhanov -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTE

Re: JDBC Connection!

2002-05-20 Thread Mark Stray
Hi, Can anyone explain this intermittent error please. regards, Mark Root cause: java.lang.NullPointerException at mesgmgr._0002fmesgmgr_0002fmsglist_0002ejspmsglist_jsp_0._jspService(_0002fm esgmgr_0002fmsglist_0002ejspmsglist_jsp_0.java, Compiled Code) at org.apache.jasper.ru

Re: showing a looping in JSP with arrays

2002-05-20 Thread Pete Freitag
When you do it that way your not storing it as an array, you just storing one element of the array. You probably want to store the Entire bookmark array in the session variable not just one element in it. session.setAttribute("myBookmarkArray", MyBookMarkArray); And to loop through your array tr

[no subject]

2002-05-20 Thread [Vaishali S. Pandya]
sudhir i can not get ur que axactly where is your bat file? on web page? and where your application will run? i mean if u r using jsp or what? can u write me something more? Vaishali RIL Ahm'd hi, i have a an application which runs when i click on a batch file. But my problem is, once

Re: newbie

2002-05-20 Thread Adrian Janssen
you need to connect to the postgresql port 5432 NOT 8080 (the tomcat port). > -Original Message- > From: Sagine E.Ferrus [SMTP:[EMAIL PROTECTED]] > Sent: 20 May 2002 04:16 > To: [EMAIL PROTECTED] > Subject: newbie > > I'm trying to have my jsp page connect to a postgresql

Re: Problem with session variable

2002-05-20 Thread Adrian Janssen
The problem would seem to be that the IE6 users are not sending the session ID through with every request, check by dumping out the seesion id. It should stay the same for every page for the 5.5 users and differ for every page for the 6 users (and even accross different requests of the same page).