Php vs Jsp

2001-02-09 Thread Irfan Mohammed

I had a question regarding the comparison of Jsp/ Php.  What are the
advantages of using Php for developing a complex web site in 5 weeks as
opposed to using Jsp/servlets.

Thanks
Irfan

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Java: make EXE

2000-11-17 Thread Irfan Mohammed

The sdk is free and is available at microsoft's web site.  You'll have to
search for it there.

The only way you can get rid of the deprecated API warning message is by not
using those API's

Irfan

-Original Message-
From: Maureen Chandra [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 16, 2000 7:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Java: make EXE


Hi,
this one sounds nice.. where I can get the sdk? is it freeware?

can pls you tell me how to get rid of 'deprecated API' warning message when
compiling java source?

Thanks  regards,
Muliawan

From: Irfan Mohammed [EMAIL PROTECTED]
Reply-To: A mailing list about Java Server Pages specification and
 reference [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Java: make EXE
Date: Thu, 16 Nov 2000 12:54:40 -0700

You can convert a .class file to an .exe file if you use a tool provided by
microsoft's now defunct sdk.  You need to install the sdk before you use it
though.

Heres some documentation from it.

Jexegen
The Java Win32® Executable Generator (jexegen) converts Java classes into a
fully executable Microsoft® Win32® application. The executable produced is
in the exegen format. Jexegen can also create COM DLLs with embedded type
libraries.

Use the following command to run jexegen:

jexegen [options] [@commandfile] files

Jexegen Command-Line Arguments
options One or more jexegen options.
@commandfile A command file listing options and file specifications to be
used by jexegen. For more information, see Command Files.
files Names of the files to be converted. You can specify class files and
arbitrary data files.


Jexegen Command-Line Options
/ba /base /bindto /cri /d /main /maxver /nologo /nomain /out /r /r- /raw
/reg /special:tlb[-] /special:pe[-] /special:all[-] /special:res /stack /v
/w /win32res /win32res- /?

See Also
Jexegen Options

Jexegen Usage Notes

Exegen Format

Irfan
-Original Message-
From: Maureen Chandra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 15, 2000 10:22 PM
To: [EMAIL PROTECTED]
Subject: Java: make EXE


Hi group,

Sorry to have posted this question. But I really wondered whether we can
compile .java to .exe or not. Or is there any compiler that can do that?

Thanks  regards,
Muliawan
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Java: make EXE

2000-11-16 Thread Irfan Mohammed

You can convert a .class file to an .exe file if you use a tool provided by
microsoft's now defunct sdk.  You need to install the sdk before you use it
though.

Heres some documentation from it.

Jexegen
The Java Win32® Executable Generator (jexegen) converts Java classes into a
fully executable Microsoft® Win32® application. The executable produced is
in the exegen format. Jexegen can also create COM DLLs with embedded type
libraries.

Use the following command to run jexegen:

jexegen [options] [@commandfile] files

Jexegen Command-Line Arguments
options One or more jexegen options.
@commandfile A command file listing options and file specifications to be
used by jexegen. For more information, see Command Files.
files Names of the files to be converted. You can specify class files and
arbitrary data files.


Jexegen Command-Line Options
/ba /base /bindto /cri /d /main /maxver /nologo /nomain /out /r /r- /raw
/reg /special:tlb[-] /special:pe[-] /special:all[-] /special:res /stack /v
/w /win32res /win32res- /?

See Also
Jexegen Options

Jexegen Usage Notes

Exegen Format

Irfan
-Original Message-
From: Maureen Chandra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 15, 2000 10:22 PM
To: [EMAIL PROTECTED]
Subject: Java: make EXE


Hi group,

Sorry to have posted this question. But I really wondered whether we can
compile .java to .exe or not. Or is there any compiler that can do that?

Thanks  regards,
Muliawan
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Capturing http at Browser( Client ) side

2000-10-27 Thread Irfan Mohammed

You could try something like this,

capture the time when the dialog asking the user for input was displayed.
After the specified time interval if the response is not received the you
could log the user out.  You'll have to figure if you'd do a busy wait for
the time interval or you could do it some other way.

Irfan

-Original Message-
From: Mathur, Manish (CAP, GEFA, Contractor)
[mailto:[EMAIL PROTECTED]]
Sent: Friday, October 27, 2000 6:53 AM
To: [EMAIL PROTECTED]
Subject: Capturing http at Browser( Client ) side


Hi,
I need to capture "no activity" happening at the Browser and proactively
display a dialog box after certain time( variable ).
The dialog box is supposed to ask user whether they want continue using the
application . If no response is received,
After certain time, user is logged out of the Application.

Is capturing "no activity" possible? Are there any API (Browser side )
available so we can capture whether any http request
Was made by user.

Thanks,
Manish

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: How to know the JSP Version

2000-09-28 Thread Irfan Mohammed

It means that you are working with version 2.1
Irfan

-Original Message-
From: Sushil Singh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 28, 2000 11:55 AM
To: [EMAIL PROTECTED]
Subject: Re: How to know the JSP Version


Thanks for your reply.

I executed the JSP with the code which you provided, and the output is:
Major Version:   2
Minor Version:   1
What does this mean? I could not understand what is the version? It should
be
something 1.1 or 1.0

Thanks,

Sushil


JSP Insider wrote:

 the application implicit object has methods for this:

 example of this is as follows:

 %
int li_major = application.getMajorVersion() ;
int li_minor = application.getMinorVersion() ;
 %

 Casey Kochmer
 [EMAIL PROTECTED]
 www.jspinsider.com

 From: Sushil Singh [EMAIL PROTECTED]
 Reply-To: A mailing list about Java Server Pages specification and
  reference [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: How to know the JSP Version
 Date: Thu, 28 Sep 2000 10:25:37 -0700
 
 Hi,
 Can anybody tell me how to know the JSP version, is there any method
 available just like to know the JVM version:
 System.out.println(System.getProperty("java.version"));
 Thanks.
 
 Sushil
 

 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

 Share information about yourself, create your own public profile at
 http://profiles.msn.com.


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
 Some relevant FAQs on JSP/Servlets can be found at:

  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Problem with if statement

2000-09-07 Thread Irfan Mohammed

Comparing String with == operator does not work.  In such a comparison only
the references are checked for equality rather than the values. In order to
check for equality based on value try
if(key.equals("AT")){
}

Irfan

-Original Message-
From: Aaron Prohaska [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 07, 2000 11:39 AM
To: [EMAIL PROTECTED]
Subject: Problem with if statement


I am trying to do something based on if key is equal to "AT", but I am not
getting any results. It acts as if key is not equal to "AT", but I can use
out.println(key) get "AT". Does anyone know why this might not be working?

if (key == "AT") {
..do something...
}

thanks,

Aaron

:::..:::...::: Aaron Prohaska :::..:::...:::
VerdeSoft Internet Services
mailto:[EMAIL PROTECTED]  http://www.verdesoft.net/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Need Help Urgent

2000-06-16 Thread Irfan Mohammed

The system.out.println would be displayed in the jvm_stdout file of the logs
of websphere. It should be under the log directory of Websphere

Irfan

-Original Message-
From: Vinay Kulkarni [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 16, 2000 12:18 PM
To: [EMAIL PROTECTED]
Subject: Need Help Urgent


Hi Guys,

I wma using Websphere  Jsp with beans. I have placed my beans on websphere.
How do I debug my beans. Suppose i give a System.out.println in my beans,
how can i see the message displayed ?

Please can anyone inform me asap.

Regards


Vinay

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Problem with cookies

2000-06-12 Thread Irfan Mohammed

I am setting some cookies in a servlet with default path and default domain.
When I try to view the cookie in a jsp page in a directory, the cookies are
not visible.  However when I try to view the cookies in the same directory
as the login page I can see them.

Any clues why I am be seeing this behaviour

Thanks
Irfan

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: JWS 2.0 : A Few Problems

2000-06-08 Thread Irfan Mohammed

Are there application servers that have a web server built in them ??? My
understanding is that both are different components and have to be installed
separately.

Irfan

Hi there,

Thanks Brevsville Administrator for your views. However, two doubts still
remain
unsolved. I repeat them here again:

 * Second problem relates to session time-out. We have not changed the
session
time-out interval (i.e. the time out is 30 mins, by  default). However, if
user
is inactive for some time ( 30 mins), *some times*, it throws the user out
of
session. What could be the  reason behind such inconsistent behavior? Should
we
explicitly set  the time-out interval? Is there any other way to  void it?
* I have read somewhere that we should not use Web Server for  deployment of
our
web applications, and instead use an application server, that has a Web
Server
in it. Is it really so? How it affects the application, in terms of
performance
and otherwise?

We are using JWS 2.0 with JDK 1.2.2 (not JDK 1.1.7) for Windows NT 4.0
Server
(SP 5) with SQL Server 7 as database.

Hope to get your views.

Rajneesh



Brevsville Administrator wrote:

 Hi Rajneesh

 I recently got rid of JWS 2.0 after a few years of poor reliabilty, in
 favour Apache/JServ, but we did experience exactly the what you are
 experiencing.

 The termination of the webservice was caused by three things.

 1) more than one or two unhandled exceptions on or servlet. Add some
 logging to your servlets and set your logging in the Admin tool to log
 errors to a largefile size and increase the buffer.

 2) Run JWS 2.0 0n JDK 1.2.2 or above not the 1.1.7b it ships with, it has
 memory leaks that kill the webpage service over time, and slows it own
 little by little.  It is interestng to run a test on your server at
 startup and then let it run a few days (if you can keep it runing that
 long) and then test it again.. dismall

 3) NT Sevice Pack 5 alowing the JREW to dominate the CPU hence starving
 the network. This was pretty intermittant but wa a problem. Service pack 6
 +resolved this issue.

 Also in Web Service Manage, Service tuning, double all the defaults for
 even a low traffic site.

 We gave up on JWS after Sun got into b4d with Netscape since there is no
 clear path to follow at this stage. Apache and JServ are unbelivebly more
 reliabe than JWS.. We stil hae one site on JWS 2.0 nd the others on
 apache. The serive intervals on JWS are about 10times that of Apache,
 simply no comparison.

 Well I hope that gives you some help.

 Chris

 On Wed, 7 Jun 2000 19:21:39 +0530, Rajneesh Garg wrote:

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: Invoking a servlet via a hyperlink

2000-06-08 Thread Irfan Mohammed

getParameters would return all the parameter Try getParameter() to get
individual parameters.  This would work in both cases of get as well as post

Irfan

-Original Message-
From: Scott Evans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 08, 2000 1:54 AM
To: [EMAIL PROTECTED]
Subject: Re: Invoking a servlet via a hyperlink


I believe that the problem with this approach is that POST/doPost()
parameters are not supposed to be in the url where they can be seen by the
client. They are intended to be sent as part of the header. If you want to
send parameters as part of a link you should use the GET/doGet() or
GET/service().

Scott

-Original Message-
From:   Ferghil O'Rourke [mailto:[EMAIL PROTECTED]]
Sent:   Thursday, June 08, 2000 3:47 AM
To: [EMAIL PROTECTED]
Subject:Re: Invoking a servlet via a hyperlink

Yes. I've just managed to get this working. I can now invoke
the servlet and pass in the parm values trailing it.

Just a Q since I have you though. When I use
req.getParameters()
to get the parameter string here it just comes back as one
big
string. So I'll have to parse the parameters out manually
right?

Thanks.
Ferghil

-Original Message-
From: A mailing list about Java Server Pages specification
and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Shrisha
Radhakrishna
Sent: Wednesday, June 07, 2000 7:37 PM
To: [EMAIL PROTECTED]
Subject: Re: Invoking a servlet via a hyperlink


I might be way off here (since I don't use this approach);
but, can't you
just say

a

href="servlet/controllerServlet?name=RetrieveVendors.doparam1=value1.."Hyp
erlink/a

This should definitely invoke the controller servlet with
all the right
parameters.

- Original Message -
From: "Ferghil O'Rourke" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 07, 2000 5:44 PM
Subject: Re: Invoking a servlet via a hyperlink


 Yes, I'm pretty sure that I can pass the values via the
href ok to the
 servlet
 and have it parse those parms when it gets them. But
that's not the
problem.

 The problem is how to get the servlet invoked from the
hyperlink. Right
now
 the hyperlink isn't even invoking my servlet.
 Also, I'd prefer not to use javascript if possible as I
don't want to run
 the risk of losing browsers that don't support it.

 -Ferghil

 -Original Message-
 From: A mailing list about Java Server Pages specification
and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Ian
 Sent: Wednesday, June 07, 2000 6:33 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Invoking a servlet via a hyperlink


 have you tried using

 a href="RetrieveVendors.do?name1=value1name2=value2"my
link/a

 I would think this would pass all the same info as a form.

 /Ian

 -Original Message-
 From: A mailing list about Java Server Pages specification
and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Ferghil
O'Rourke
 Sent: Wednesday, June 07, 2000 7:31 PM
 To: [EMAIL PROTECTED]
 Subject: Invoking a servlet via a hyperlink


 [sorry, not sure this got submitted earlier...]

 Anyone got any ideas on how handle hyperlinks in an MVC
controller
servlet?

 We've been in the process of developing a servlet based on
the MVC model 2
 architecture for the last few months now. And many thanks
to Craig for his
 key contributions here. I've implemented his action class
mechanism
 successfully to have a single "controller" servlet
interact with java
 business objects thru action objects.

 Each action object maps to the name attached to a FORM
SUBMIT in our JSP
 pages. So, for example, a pushbutton submits the name
"RetrieveVendors.do"
 to the controller servlet, the servlet uses this string as
a key to a
 hashtable of action class 

Re: Invoke a servlet from another servlet

2000-06-07 Thread Irfan Mohammed

Try servlet chaining

Irfan

-Original Message-
From: Alarcon Fabio [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 07, 2000 1:45 PM
To: [EMAIL PROTECTED]
Subject: Invoke a servlet from another servlet


Hi guys!
Help me please, how can I invoke a servlet from another servlet?
Thanks in advance for your answers
Best regards
Fabio
_

Fabio Alarcon Ortiz
Analista de Sistemas - Gerencia de Sistemas
Gerencia Central de Desarrollo e Informatica
EsSalud - Seguro Social de Salud
Lima, Peru
Telfs. : (51) (1) 265-6000, 265-7000 Anexos : 2356, 2357
Movil  : (51) (1) 855-1393
ICQ N° : 11002875

e-mail : [EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



Re: beanless connection problem

2000-06-05 Thread Irfan Mohammed

The strings that you have declared X1 and Y1 exist in the scope of the if
statement only.  once out of the if statement these variables no longer
exist.  if you did a println on those variables out of the if clause, you
wouldn't see them.

A solution is to define those strings as class variables. Read in the values
from the database and assign to those variables.  That way you should be
able to see them in the jsp

Irfan

-Original Message-
From: john doucette [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 03, 2000 3:04 AM
To: [EMAIL PROTECTED]
Subject: beanless connection problem


Does anyone see where I'm screwing this up?
I've tried several examples, to no avail.

Any help would be great!

Using:
Apache on Solaris 2.6
Oracle 8i(8.1.6)
Jdk 1.2.2
Jrun 2.3.3

Oracle is on the same machine as the webserver

//Begin Code
%@ page import="java.sql.*" %
%@ page import="java.io.*"%
%@ page import="java.util.*"%
%@ page import="java.sql.*"%
%@ page import="javax.servlet.*"%
%@ page import="javax.servlet.http.*"%

%
try{

Class.forName("oracle.jdbc.driver.OracleDriver");

String url = "jdbc:oracle:[EMAIL PROTECTED]:1521:ora1";
String query = "Select * from STATUS";

Connection con = DriverManager.getConnection(url, "usernm",
"paswd");
Statement stmt = con.createStatement();

ResultSet results = stmt.executeQuery(query);

if (results.next()){
String X1 = results.getString("sor_status");
String Y1 = results.getString("SDefinition");
}
String X1 = "OW";
String Y1 = "dat hurt";
con.close();
}

catch (ClassNotFoundException e) {
System.err.println("no driver");
}

catch (SQLException e) {
System.err.println("no db connection");
}

finally {
try { if (con != null) con.close(); }
catch (SQLException e) {}

}
%
HTML

BODY
type:%=X1%nbsp; Definied:%=Y1%BRBR
/BODY
/HTML




 John Doucette  -  818.865.1310
 
 internet development
 sdr technologies

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets