Re: Passing Connection Objects from servlets to JSP??

1999-09-02 Thread Rahul Dwivedi

Imam,
  your query remind me of the initial efforts we put in to solve similar
types of problem.
  i think, may not bea best solution , we can use  session object in a
servlet and
use put method of it to put values of user id and pswd if you want, through
a variable name in session object
in login servlet itself. which at later stage for db connection and query
can be retrieved by any other servlet in that session.
security might be a problem but i haven't get that far.
we can also use qookies as well to keep the values of userid and password
at the client side but that depends upon the browser settings. and keeping
any hing like passwd ext at client side makes me uncomfortable.

any  way i'm curious about other methods to keep user id and passwd. values
such that it can be used later in different servlets .

regards,
rahul




"Imam, Asim, CFCTR" [EMAIL PROTECTED] on 09/02/99 12:39:57 AM

Please respond to "Imam, Asim, CFCTR" [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Rahul Dwivedi/LTITLVSH)

Subject:  Re: Passing Connection Objects from servlets to JSP??




Hey All,

Due to my limited knowledge I think I kinda asked the wrong question. I
appologize...Let me try again:

Heres what I am trying to do and I want to know the BEST way to implement
it:

I have a login page(html/servlet or jsp??), a search page(html) and a
results page(JSP)

Login Page...username and password...from this I want to instantiate my
connection to DB
search page..has three fields that I want to query on.. the submit button
calls the result page
results page(jsp)...has a query bean which gets the params from search
page,
performs query and displays result

Now my question is how do I access the connection object I instantiated
when
I logged in... Do I have a bad design???

Simply what I want is the user logins in...is send to a search page where
he/she performs a query and the results are displayed???

What would be the best approach/design to do this using
JSP/Servlets? I need guidance desperately.

Many Many thanx to all for being such patient with me and helping me out.

Asim Imam
Application Developer
@ATT Tax Systems Group

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



JSP FAQ Resource Information

1999-09-02 Thread Anil K. Vijendran

This is a weekly informative posting to the jsp-interest list.



Before asking questions of a general nature, please check out the
resources available online to see if your question already has an
answer. The best place to start is our web site:

http://java.sun.com/products/jsp

This contains pointers to the specification, and to the JavaServer Web
Development Kit (JSWDK).

Some FAQs that may help you

http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html

JSWDK is the reference implementation for the latest JSP and Servlet
specs. You can download JSWDK at
http://java.sun.com/products/jsp/download.html. Please send
your feedback and bug reports on JSWDK to [EMAIL PROTECTED]



A few notes about the use of this list. We at Sun enjoy hosting this
list to give everyone a forum to discuss JSP, servlets and related
technology. There are a few things that we ask of you, the list
members:

Please don't engage in advertising. We like to hear when new
products are announced and a link for all the
information. What we don't like are lengthy press releases,
advertisements, and other material which falls under the
umbrella term "marketing". There is no problem in stating how
your product compares to another, but remember, this isn't run
by Sun to be an advertising forum -- but as a technical forum.

Please don't post attachments to the list. The use of VCards
and S/MIME is not really needed on a list like this and is
annoying to some whose readers don't support them. More
serious is the posting of .zip files and other larger
items. You might get flamed a little bit for S/MIME or posting
in HTML. You will be removed from the list for posting a .zip
or other archive file.

If you need technical support from a vendor, please contact
that vendor directly.



Now, back to regularly scheduled programming.

Anil Vijendran
for the JSP/JSWDK team

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: The JSWDK

1999-09-02 Thread Luc Saint-Elie

Patrick,

Try to

1) Copy the file tools.jar
2) Paste it in both C:\JDK\JRE\lib\ext and C:\Program
Files\Javasoft\Jre\lid\ext

(adapt the exact path to your settings)

Le 10:15 02/09/99 +0100, O'Keeffe Patrick a écrit:
Hi,

I'm an ASP developer who's evaluating JSP as an alternative, but am
stumbling at
the first hurdle. I'm running NT4.0 Enterprise Server with JDK1.2.2. I've
downloaded the JSWDK1.0 from Sun's web site, and tried to run the JavaServer
('startserver' at a DOS prompt and/or double clicking on the batch file in
Explorer). I always get the same error

  The following class is required by JSWDK but was not found:
sun.tools.javac.Main

My classpath includes (this is overkill, but I've tried all variations):
  c:\jdk1.2.2\lib\tools.jar
  c:\jdk1.2.2\bin
  c:\jdk1.2.2\src

The JSWDK documentation states that I only need the first of the above, but
whatever I try (including several reboots), nothing seems to work.

Any help would be greatly appreciated.

Thanks,

Patrick O'Keeffe
Consultant

++
| Luc Saint-Elie |
| Development and marketing manager  |
| Pictoris   - Paris   - France  |
| http://www.pictoris.com|
| email : [EMAIL PROTECTED]|
++
|  Java Server Side  Open Source technologies|
|   http://www.interpasnet.com/JSS   |
++

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: hellouser variation: is it possible??

1999-09-02 Thread Michael Hu

Evan Chua-Yap wrote:

 hi all!   i just downloaded the early JSP Tutorial chapters.  In the
 chapterfor handling forms, the hellouser example uses an include
 directiveto show the submitted name. i was wondering: is it
 possible to specify a 'submit' action that goesto a different .jsp
 page, and show the submitted name on that page?? here's what i have
 right now, but i get a Cannot Compile error for show.jspis there a way
 to get it to work?(Note: adding jsp:useBean id="myNameHandler"
 scope="session" class="myForm.NameHandler"/right before i do the
 getProperty doesnt help) getName.jsphtml

 body

 jsp:useBean id="myNameHandler" scope="session"
 class="myForm.NameHandler"/

jsp:useBean id="myNameHandler" scope="request"
class="myForm.NameHandler"/ is what you really want if you are just
forwarding/including requests.



 jsp:setProperty name="myNameHandler" property="*"/

 form method=get action=showName.jsp

form method="get" action="showName.jsp" is safer.



 Your Name: input type="text" name="username" size=25br

 input type="submit" value="Submit"

 input type="reset" value="Reset"

 /form

 /body

 /html

 showName.jsp

 

 html

 body

 Hello, jsp:getProperty name="myNameHandler" property="username" /!

 /body

 /html

You must specify a jsp:useBean before you use jsp:getProperty or
jsp:setProperty, (or suffer the compile error you are currently
getting).

So try:

html
   body
   jsp:useBean id="myNameHandler" scope="request"
class="myForm.NameHandler"/
  Hello, jsp:getProperty name="myNameHandler" property="username"
/!
   /body
/html

--
Michael Hu, Paradox Team, Corel Corporation

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Does FrontPage2000 supports JSP?

1999-09-02 Thread Eden Chan

Hi there,

FrontPage98 does not support JSP, and I wonder does FP2K support JSP?

Eden

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



SOLVED: hellouser variation: is it possible??

1999-09-02 Thread Evan Chua-Yap

thanks to every body who responded

- Original Message -
From: DAVE TOWNSEND [EMAIL PROTECTED]
To: 'Evan Chua-Yap' [EMAIL PROTECTED]
Sent: Thursday, September 02, 1999 8:11 AM
Subject: RE: hellouser variation: is it possible??


 Just to check, I am assuming that you have taken one JSP and split it into
 two? Thats what it looks like anyway. Heres a quick idea of what is going
on
 here.

 Your first JSP needs no beans or anything, doesn't even need to be a
jsp
 page, html will do fine. When the form is filled out, the information is
 sent in the request to the second page. It is in the second page that you
 can choose to have a bean (see why I say choose later). I've adapted your
 code here:

 getName.jsp (or .html)

 html
 body
 form method=get action=showName.jsp
 Your Name: input type="text" name="username" size=25br
 input type="submit" value="Submit"
 input type="reset" value="Reset"
 /form
 /body
 /html


 showName.jsp

 jsp:useBean id="myNameHandler" scope="session"
class="myForm.NameHandler"/
 jsp:setProperty name="myNameHandler" property="*"/
 html
 body
 Hello, jsp:getProperty name="myNameHandler" property="username" /!
 /body
 /html

 That should work for you. The trick is understanding the second line
of
 the second file. When you use the jsp:setProperty like that, it attempts
 to fill out the myNameHandler fields with information from the request
 header. Here you have one item in the request header - username, so it
will
 call myNameHandler.setUsername() to set it from whatever the user entered.

 There is another alternative, where you don't even need beans,
although
 this becomes pointless if you want to use the info in multiple pages:

 showName2.jsp

 html
 body
 Hello, %= request.getParameter("username") %!
 /body
 /html

 This simply pulls the info out of the request.


 Hope some of this helps.

 Dave

 -Original Message-
 From: Evan Chua-Yap [mailto:[EMAIL PROTECTED]]
 Sent: 01 September 1999 18:14
 To: [EMAIL PROTECTED]
 Subject: hellouser variation: is it possible??


 hi all!
i just downloaded the early JSP Tutorial chapters.  In the chapter
 for handling forms, the hellouser example uses an include directive
 to show the submitted name.

 i was wondering: is it possible to specify a 'submit' action that goes
 to a different .jsp page, and show the submitted name on that page??

 here's what i have right now, but i get a Cannot Compile error for
show.jsp

 is there a way to get it to work?
 (Note: adding jsp:useBean id="myNameHandler" scope="session"
 class="myForm.NameHandler"/
 right before i do the getProperty doesnt help)

 getName.jsp
 

 html

 body

 jsp:useBean id="myNameHandler" scope="session"
class="myForm.NameHandler"/

 jsp:setProperty name="myNameHandler" property="*"/

 form method=get action=showName.jsp

 Your Name: input type="text" name="username" size=25br

 input type="submit" value="Submit"

 input type="reset" value="Reset"

 /form

 /body

 /html





 showName.jsp

 

 html

 body

 Hello, jsp:getProperty name="myNameHandler" property="username" /!

 /body

 /html




===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: ? about JSWDK and welcomefiles

1999-09-02 Thread Craig R. McClanahan

Ted Neward wrote:

 Normally, in a web server, if a given file in a directory is marked
 "index.html" (or similarly-named, site-configurable filenames), that file
 will be used as the "default" HTML document sent back to the user when just
 the directory name is given (that is,
 http://www.javageeks.com/foo/bar/blah/index.html will be returned when
 http://www.javageeks.com/foo/bar/blah is requested).

 With JSWDK, this doesn't appear to be the case.

 The JSWDK (jswdk1_0-win.zip, file size 759,251) I downloaded and installed,
 when given a URL of

 www.javageeks.com:8080/webpages/

 doesn't display anything--it gives a 404 error. Now, "webpages", presumably
 the webapp for the "webpages" directory under the JSWDK-1.0 directory, also
 isn't defined in the webserver.xml file, either; perhaps this is an
 oversight, perhaps not. However, doing the same with the "examples" webapp,


That's because this is not a valid URL for the default setup.  "webpages" is
the document root directory of the default context, but it's mapped to the "/"
URL -- because it is the default.  The URL to try is:

http://www.javageeks.com:8080

or

http://www.javageeks.com:8080/

instead, which correctly displays the index.html page found in this directory.


 www.javageeks.com:8080/examples/

 yields a directory listing of the "examples" subdir under the JSWDK-1.0
 install directory.


That's the right answer -- in the "examples" directory (which is the document
root for the "examples" context), there is no index.html file, so a directory
listing is the usual response (this is also true of most web servers, unless
the administrator disables it).  Try this one instead:

http://www.javageeks.com:8080/examples/jsp/

and you will see the index.html page that is found there.


 What gives? The "webapp.properties" file has a setting, "welcomefiles", that
 would seem to indicate this functionality is doable, yet none of the samples
 seem to use it; the default JSWDK home page, for example, HREFs directly to
 examples/servlets/index.html or examples/jsp/index.html. Is this a bug, or a
 feature, or just an oversight, or what? Has anybody gotten this to work
 correctly?


Are you sure you're using the final relase version?  In the default index.html
page, the link to the JSP examples says:

a href="examples/jsp/"JSP Examples/a

which expands to an absolute URL like the second one quoted above.  However,
the feature is working correctly for me.

NOTE:  The early access version of JSWDK had a bug when you tried to use a
JSP page as your welcome file -- it would display the contexts of the JSP page
as text, instead of compiling and executing it.  It did the right thing on HTML
welcome pages, however.  I understand that this was fixed in the final release,
but haven't tried it myself.


 Ted Neward

Craig McClanahan

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Importance of other scripting languages [Was: Re: JSP Form]

1999-09-02 Thread Steve Odendahl

At 09:22 PM 8/27/99 +, Scott Ferguson wrote:
JSP 1.0 already allows other scripting languages.  That's what the
%@ page language=javascript % is for.  Resin (http://www.caucho.com)
supports
both Java
and JavaScript as valid JSP 1.0 languages.

I may have missed it, but I don't see "javascript" defined as a value for
the "language" attribute.  I'm looking at section 2.7.1.1 of the JSP1.1
spec.  There is some talk about other scripting languages being allowed,
and a discouraging disclaimer about how other values for "language" might
be defined in future specs.  That is, discouraging to vendors looking to
implement other languages now.  (Although perhaps the changes needed to
support some future syntax are pretty small compared to actually building
the scripting engine.  It doesn't seem to have discouraged your company :-)
 What I should have been trying to say is that I think it would be useful
for Sun to go ahead and define syntax and semantics for at least one
scripting language (and the most practical choice would probably be
JavaScript).  There's no need to wind up with a "Resin" flavor of
JavaScript support and a "JRun" flavor of JavaScript support.

Perhaps it's "easy and obvious" how JavaScript support should be defined.
In that case, Sun might as well go ahead and do it, instead of leaving it
to the vendors.  On the other hand, perhaps it is "difficult and complex"
to define JavaScript support.  In that case, Sun _should_ go ahead and do
it, as otherwise the vendor's implementations will probably diverge more
than in the "easy and obvious" case.


Of course, the real trick in implementing a scripting language in Java is
performance.

The approach that Resin and JPython have taken - compiling to bytecode, and
letting the JVM worry about performance - seems pretty reasonable.

Steve Odendahl
Vunetix, Inc.


Well, JavaSoft does have a vested interest in making Java the One True
Language.
:-)
So you're probably right about the intent.  Nevertheless, the hooks are
there for
other
scripting languages.

Scott Ferguson
Caucho Technology





===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



SQL Field Update

1999-09-02 Thread Michael Fuhrman

Hello all,

Well, I'm used to using Microsoft's Recordset to update the field contents,
but from what I can see that's not possible in Java's SQL.  (Not that I
can't use Microsoft's Recordset, but that I can't update a field in the
ResultSet returned by Java, and expect it to update the database.)

Anyway, I have a complex datatype that I need to put back  into the
database.  Which is why I used the Microsoft Recordset. However, times are
changing, and I need to encode that data for an SQL Update Command String.
Is there a command, a reference book, links or other material that will help
me encode this complex data for an SQL String?

Looking forward to your answers,


Michael J. Fuhrman
Reliable Business Computers
http://www.creliable.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: [Fwd: Proposal for standardized tags]

1999-09-02 Thread Foster Bob

Michael Hu wrote:

Connection attributes don't belong in the query tag, definitely.  I would
argue connections (and query select statements) also don't belong in JSP
pages. Sorta orthogonal.

Then how do you propose to implement commit and rollback in JSP pages?

Bob Foster
Symantec Internet Tools  http://www.visualcafe.com/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



How to get at the body in a custom tag...

1999-09-02 Thread Eduardo Pelegri-Llopart

Dave Navas asked:

=
A quick btw -- if someone can 'splain to me how this kind of tag:
setPageData  myCustomTag/  /setPageData
can capture its body, I'd sure appreciate it.  Maybe it's just the
engine I'm
using, but I'm not clear as to how that's accomplished.  It seems like
all I
have is a writer.  I can probably get the contents out of it, but how do
I
prevent the output from ending up on the page?
==

In the JSP 1.1 PR1, you (your tag handler) has to first indicate it is
interested in handling the body.  It does that by returning EVAL_BODY
from the doStartTag() method.  The JSP page implementation class will
then create a BodyJspWriter object and will pass it to the Tag class.
Then the methods doBeforeBody() will be evaluated; the BODY will be
evaluated into this new object, and finally doAfterBody() will be
evaluated [[in some cases the doBeforeBody() will be a noop]].  A
typical example will at this point take the BodyJspWriter (that got
passed in before) and extract from it whatever information it wants
(that is why it is a BodyJspWriter, not a plain JspWriter).  If you want
to reevaluate the body (say because something somewhere has changed),
just have doAfterBody() return EVAL_BODY; if not, make it return
SKIP_BODY.

Hope this helps.

- eduard/o

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: How to get at the body in a custom tag...

1999-09-02 Thread David Navas

Just fyi -- I think that was fairly clear, its just that the
implementation I was using lost content and I wanted to make sure I was
doing things correctly.  :)

By the way, I'm not sure what the doEndTag() exists for.  Are there places
where it should be called and release() should/might not?

-Dave

Eduardo Pelegri-Llopart wrote:

 Dave Navas asked:

 =
 A quick btw -- if someone can 'splain to me how this kind of tag:
 setPageData  myCustomTag/  /setPageData
 can capture its body, I'd sure appreciate it.  Maybe it's just the
 engine I'm
 using, but I'm not clear as to how that's accomplished.  It seems like
 all I
 have is a writer.  I can probably get the contents out of it, but how do
 I
 prevent the output from ending up on the page?
 ==

 In the JSP 1.1 PR1, you (your tag handler) has to first indicate it is
 interested in handling the body.  It does that by returning EVAL_BODY
 from the doStartTag() method.  The JSP page implementation class will
 then create a BodyJspWriter object and will pass it to the Tag class.
 Then the methods doBeforeBody() will be evaluated; the BODY will be
 evaluated into this new object, and finally doAfterBody() will be
 evaluated [[in some cases the doBeforeBody() will be a noop]].  A
 typical example will at this point take the BodyJspWriter (that got
 passed in before) and extract from it whatever information it wants
 (that is why it is a BodyJspWriter, not a plain JspWriter).  If you want
 to reevaluate the body (say because something somewhere has changed),
 just have doAfterBody() return EVAL_BODY; if not, make it return
 SKIP_BODY.

 Hope this helps.

 - eduard/o

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: How to get at the body in a custom tag...

1999-09-02 Thread Eduardo Pelegri-Llopart

doEndTag() returns an indication of whether you are done with this page
(e.g. because you just forwarded the request elsewhere, or whatever), or
not.  (EVAL_PAGE and SKIP_PAGE).  It should also release all local
resources.

release() is intended to release resources not defined locally in this
class and it should maintain invariants.  release() is provided because
that way it can be inherited from a superclass and most Tag handlers
need not do anything about that at all.  It is symetric to the
initialize() method.  Initialize is easier to argue: initialize
maintains one (perhaps later more) global invariant: the parent link,
which can be used by a nested tag.  I felt uncomfortable letting a
quick-and-dirty Tag handler manage this invariant as failure to do it
correctly would lead to tags that used to work stop doing so.  Some
people have accused me of being paranoid on this one.

Hope this helps,
- eduard/o

David Navas wrote:

 Just fyi -- I think that was fairly clear, its just that the
 implementation I was using lost content and I wanted to make sure I was
 doing things correctly.  :)

 By the way, I'm not sure what the doEndTag() exists for.  Are there places
 where it should be called and release() should/might not?

 -Dave

 Eduardo Pelegri-Llopart wrote:
 
  Dave Navas asked:
 
  =
  A quick btw -- if someone can 'splain to me how this kind of tag:
  setPageData  myCustomTag/  /setPageData
  can capture its body, I'd sure appreciate it.  Maybe it's just the
  engine I'm
  using, but I'm not clear as to how that's accomplished.  It seems like
  all I
  have is a writer.  I can probably get the contents out of it, but how do
  I
  prevent the output from ending up on the page?
  ==
 
  In the JSP 1.1 PR1, you (your tag handler) has to first indicate it is
  interested in handling the body.  It does that by returning EVAL_BODY
  from the doStartTag() method.  The JSP page implementation class will
  then create a BodyJspWriter object and will pass it to the Tag class.
  Then the methods doBeforeBody() will be evaluated; the BODY will be
  evaluated into this new object, and finally doAfterBody() will be
  evaluated [[in some cases the doBeforeBody() will be a noop]].  A
  typical example will at this point take the BodyJspWriter (that got
  passed in before) and extract from it whatever information it wants
  (that is why it is a BodyJspWriter, not a plain JspWriter).  If you want
  to reevaluate the body (say because something somewhere has changed),
  just have doAfterBody() return EVAL_BODY; if not, make it return
  SKIP_BODY.
 
  Hope this helps.
 
  - eduard/o

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: [Fwd: Proposal for standardized tags]

1999-09-02 Thread Taylor Gautier

You should commit or rollback BEFORE the JSP page.  The JSP page is only
your display, all logic should have been performed before going to the JSP
page.  Thus you have seperation of business logic and presentation. (i.e.
your JSP page should only show the results of committing or rolling back, it
should not actually be performing those operations)

I fully agree that SQL and CONNECTION tags don't make any sense in a JSP
page.  Looping, conditional constructs and the like (only for display
purposes, not for actually coding logic) would be good standard tags.

The rule would be: do most if not all JSP applications need these tags?

For database tags, I think the answer to that question is definitely NO!

-taylor
- Original Message -
From: Foster Bob [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 02, 1999 12:28 PM
Subject: Re: [Fwd: Proposal for standardized tags]


 Michael Hu wrote:

 Connection attributes don't belong in the query tag, definitely.  I would
 argue connections (and query select statements) also don't belong in JSP
 pages. Sorta orthogonal.

 Then how do you propose to implement commit and rollback in JSP pages?

 Bob Foster
 Symantec Internet Tools  http://www.visualcafe.com/


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: How to get at the body in a custom tag...

1999-09-02 Thread David Navas

Eduardo Pelegri-Llopart wrote:
 doEndTag() returns an indication of whether you are done with this page
 (e.g. because you just forwarded the request elsewhere, or whatever), or
 not.  (EVAL_PAGE and SKIP_PAGE).  It should also release all local
 resources.

Err, did this change recently?  The version I have returns void.  That would
certainly make a lot more sense

-Dave

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: [Fwd: Proposal for standardized tags]

1999-09-02 Thread Foster Bob

David Navas [EMAIL PROTECTED] (I'm pretty sure this time) wrote:
That said, I think commit and rollback don't belong in JSP pages.

Wherever they belong, the issue is ensuring that all database actions
involved in a commit use the same connection reference.

Bob Foster
Symantec Internet Tools http://www.visualcafe.com/

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Setting and Reading Cookies in JSP

1999-09-02 Thread Mahesh Yadav

 Hai
   All,

Can some body tell me how to set  retrieve Cookies in JSP.

iam using iis 4.0, Websphere Application Server 2.02 se as Servlet Plugin for
iis web server.

Thanks a lot in Advc

Mahesh






Get free email and a permanent address at http://www.netaddress.com/?N=1

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Setting and Reading Cookies in JSP

1999-09-02 Thread LEONG MUN WAI, CUSD

This looks like a good candidate for standardized tags discussion.

 -Original Message-
 From: John Dixon [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, September 03, 1999 6:50 AM
 To:   [EMAIL PROTECTED]
 Subject:  Re: Setting and Reading Cookies in JSP

  html
  head
  /head
  body
%
//adds a cookie
Cookie c = new Cookie("foo","foobar");
response.addCookie(c);

//gets the cookies
Cookie[] cookies = request.getCookies();
out.print("# of cookies found = " + cookies.length);
if (cookies != null)
{
  for (int i = 0; icookies.length; i++)
  {

  out.print("name: " + cookies[i].getName()+"P");
  out.print("value: " + cookies[i].getValue()+"P");
  }
}
%
  /body
  /html



 __ Reply Separator
 _
 Subject: Setting and Reading Cookies in JSP
 Author:  Mahesh Yadav [EMAIL PROTECTED] at Internet
 Date:9/2/99 4:33 PM


  Hai
All,

 Can some body tell me how to set  retrieve Cookies in JSP.

 iam using iis 4.0, Websphere Application Server 2.02 se as Servlet Plugin
 for
 iis web server.

 Thanks a lot in Advc

 Mahesh





 
 Get free email and a permanent address at http://www.netaddress.com/?N=1

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: java.sql.SQLException: Error !!!!

1999-09-02 Thread Chandrasekhar Naidu

Hi,

You can use AS400 Toolbox for Java, supplied by IBM.  I am working with
AS400 Toolbox for Java since one year.  I can help you, ask me your doubts.


Take the following example:





import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.io.*;
import com.ibm.as400.access.*;

public class as400db extends HttpServlet{

 public void service (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{

 res.setContentType("text/html");
 PrintWriter out = res.getWriter();



Connection con = null;
Statement st = null;
ResultSet rs = null;

out.println("htmlbody");
out.println("Hello");



try


java.sql.DriverManager.registerDriver(new
com.ibm.as400.access.AS400JDBCDriver());// registers the driver which will
be used for the jdbc operation
 Class.forName("com.ibm.as400.access.AS400JDBCDriver");//an entry
for the class is made

con=DriverManager.getConnection("Jdbc:as400://10.100.11.20");//connection
with the database is done

  }
  catch(Exception e)
{System.out.println("excep :"+e);
 out.println("error :"+e);
}
 try{
st = con.createStatement();
rs = st.executeQuery("select * from qgpl.temp");
rs.next();
out.println("from bd2 :"+rs.getObject(1).toString());

 }catch(Exception e)
{System.out.println("excep st:"+e);
 out.println("error st:"+e);
}

out.println("/body/html");

}//service
}//class




Yours,

Chandrasekhar Naidu,
Sr. Software Engineer,
Oasys Technologies,
Bangalore,
India.
Phone : 91 80 2280523/4/5/6





- Original Message -
From: Rahul Dwivedi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 02, 1999 8:59 AM
Subject: Re: java.sql.SQLException: Error 


 even i was getting this problem when i was trying to run a pgm which uses
 jdbc-odbc connection. i don't know the exact sol. for it but  for as400 i
 think as400 toolbox specific classes can be used by creating a as400
object
 and acess jdbc-db2 connection.

 i still want to know why this error ... while using jdbc odbc connection.

 Rahul





 Hiten Shah [EMAIL PROTECTED] on 09/01/99 06:42:27 PM

 Please respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:(bcc: Rahul Dwivedi/LTITLVSH)

 Subject:  java.sql.SQLException:  Error 




 dear all,

 i am getting this error when i trying to connect to backhand.
 i am using db2 as back hand. ODBC is working fine.
 but JDBC-ODBC connectivity is creating problem.

 i am getting the following error :
 "java.sql.SQLException: Specified driver could not be loaded due to system
 error 126 (IBM DB2 ODBC DRIVER). "

 if anyone could figure out, do reply asap...
 this is on highest priority...

 TIA

 regards
 hiten

 
 Get free email and a permanent address at http://www.netaddress.com/?N=1


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



JSP Parse Error

1999-09-02 Thread Biju

Hello
JSP examples which came with the JRun are working fine. But when I run
downloaded examples from the JAVA SUN the following error page is
shown.
(Please excuse if these are answered elsewhere.)

500 Internal Server Error
JSP Parse Error
JSP Directive  infois not recognized.

Any help is appreciated and please excuse if this is answered elsewhere.

Biju

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html