Response.End()

2000-11-16 Thread Cogley, Jonathan

Hi,

What is the neatest way to an ASP-like Response.End() ?
I have an if statement which can cause a redirect and then I want to stop
all further processing of the my JSP ...

Is it feasible to just call "return null;" since this will return on
the service method of the generated servlet - or is there something nicer?

Thanks!
Jonathan

===
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: JSP/GIF Util

2000-10-30 Thread Cogley, Jonathan

Antonio,

Take a look at:
com.sun.image.codec.* in your standard jdk
for classes that can work with jpegs ... I am not sure whether
they can determine resolution but they are nice and easy to use.

Cheers,
Jonathan



-Original Message-
From: Antonio W. Lagnada [mailto:[EMAIL PROTECTED]]
Sent: 26 October, 2000 11:20 AM
To: [EMAIL PROTECTED]
Subject: JSP/GIF Util


Hi All,

I'm currently developing a JSP/Servlet for uploading GIF/JPG files.
Does the JDK or JSDK come with a JPG/GIF util that will allow me to query
the properties of the image data being uploaded.
Things that I want to be able to do:
given: maximum resolution

1. upload and read the gif/jpg binary data and figure out whether it
falls below the max resolution criteria?


--
Antonio W. Lagnada
Ecommerce Consultant
[EMAIL PROTECTED]

This email address is specifically
for JSP-Interest email list.
Remove _NOSPAM for the actual email.



___
To get your own FREE ZDNet Onebox - FREE voicemail, email, and fax,
all in one place - sign up today at http://www.zdnetonebox.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: Applet and javascript...HELP

2000-10-27 Thread Cogley, Jonathan

Henry,

If it is sensitive information, I think the user would feel happier using
SSL ?
(in which case you don't have to worry about the encoding ...)

If you insist on using the applet approach then ...
1) why not hide the form and make the applet call a javascript function to
unhide
everything when it has loaded?
OR
2) Put all the fields on the applet and do a POST from the applet when they
hit
the applets submit (probably the most work cos you eliminate the HTML form
but
definitely do-able)

Think carefully about your architecture and which approach fits the
situation best
and will be the easiest to maintain.

Hope that helps! :)

Jonathan



-Original Message-
From: Henry Hooi Tak Keong [mailto:[EMAIL PROTECTED]]
Sent: 26 October, 2000 8:38 PM
To: [EMAIL PROTECTED]
Subject: Applet and javascript...HELP


Hi all,

I'm need to encode certain form fields on my jsp page before submitting it
for processing because the information keyed in by the user is sensitive.
Does anyone have any recommendations on how I could go about it?

To resolve this issue, I have employed using an applet to encode the user's
information. The textfields used is still of a html form, and I used
javascript to invoke a method in the applet class on the textfields of the
form to help resolve this issue. However, that has led me to several
problems...

1) I can't seem determine when the applet has fully loaded on the html page
because if I press the submit button and the applet is still loading, then
the data in the forms will be posted without being encrypted first.

2) I realised that when I use this applet on form fields in a page with
frames , it somehow doesn't get loaded properly no matter how long I wait
for it to load. When I apply this applet to a page without frames, it loads
up almost instantaniously. Any suggestions on how I could resolve this data?

I have tried using the  tag to help download the applet but I'm
confused on how to reference it as an object, in terms of the DOM.
Initially, I can reference the html applet tag via
document.appletname.methodname.

This problem has been eluding me for days already and I really need help. I
realised that this may not be a the proper mailing list but I'm sure someone
here must have come across these issues before. I couldn't find an applet
mailing list from SUN, and if any of you found it, I would be glad if you
could pass it on. Thanks everyone.

Cheers'
Henry

===
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: redirecting servlet page

2000-10-10 Thread Cogley, Jonathan

Deniz,

Doing a sendRedirect would not work since the applet is doing a
URLConnection
to get the data returned. It will just receive the redirect headers - it
is not a browser so will not react to the headers ...

Why don't you try putting the applet hosting page in the same context so
that
the user gets the same session id when the applet first loads - then do your
login process via the applet and then do a showDocument ...
That should work.

Cheers,
Jonathan

-Original Message-
From: Deniz Demir [mailto:[EMAIL PROTECTED]]
Sent: 08 October, 2000 7:56 AM
To: [EMAIL PROTECTED]
Subject: redirecting servlet page


Hi,

I have written a servlet and applet for login process. they communicate
with each other by URLConnection. I want to get a new page after
conversation. I have read so many archived mails of this mail list. I
orginaly wanted to use sendRedirect() after communication, since the
URLConnection is made in doPost method, I tried to sendRedirect in
doPost method. But it didn't work. And then I gave up and I tried to use

applet's showDocument() method. But in this case the following page (a
jsp) had a different session ID, so I could not get the objects which I
put into session in servlet.

I could not find any solution, what can I do?

Deniz...

===
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: escape

2000-10-03 Thread Cogley, Jonathan

java.net.URLEncoder.encode(String s)


-Original Message-
From: sudha [mailto:[EMAIL PROTECTED]]
Sent: 03 October, 2000 6:45 AM
To: [EMAIL PROTECTED]
Subject: escape


hi all
 is there any function or method in jsp which removes the spaces from
the url
 like the escape method in javascript
if yes how to use it
sudha

===
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: off-topic

2000-10-02 Thread Cogley, Jonathan

Check your browser VM supports all the objects and methods you are
calling ... I have seen similar error messages when calling 1.2 methods
in a 1.1 virtual machine.


-Original Message-
From: Ugur Karakaya [mailto:[EMAIL PROTECTED]]
Sent: 02 October, 2000 11:43 AM
To: [EMAIL PROTECTED]
Subject: off-topic


 Sorry,

We have a problem,and it is important for us.

We take this exception on Netscape Browser status Bar,

Applet LoginApllet CAN't init: NEW

and in Java consol we take these message. We can't understand the problem

Can anybody help us?

Thank you.

Copyright (C) 1996-97 Symantec Corporation
java.lang.NullPointerException

  at java.lang.StringBuffer.append(Compiled Code)

* at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled
Code)

  at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)


  at java.awt.EventDispatchThread.run(Compiled Code)

  at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)

java.lang.NullPointerException

  at java.lang.StringBuffer.append(Compiled Code)

* at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled
Code)

  at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)


  at java.awt.EventDispatchThread.run(Compiled Code)

  at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)

===
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 Do I display Java Gui Objects on a browser with JSP?

2000-10-02 Thread Cogley, Jonathan

Charbel,

The only way to run Java code on the client browser is in the form of an
applet.
So you will need to create an applet and you will also need to ensure that
the
swing classes are installed on the client... You may want to look at running
the Sun VM or getting the user to download the JRE 1.3 from Sun which (I
believe)
includes the swing classes.
http://java.sun.com/products/plugin/index.html

You may also want to have a good read thru a JSP book to make sure you
understand
the difference between client (e.g. JavaScript) and server code.

Regards,
Jonathan


-Original Message-
From: charbel achkar [mailto:[EMAIL PROTECTED]]
Sent: 30 September, 2000 8:10 AM
To: [EMAIL PROTECTED]
Subject: How Do I display Java Gui Objects on a browser with JSP?


Hi everyone,

New to this list. I am trying to incorporate javax.swing and awt gui object
with HTML fields in a JSP form. I am able to instantiate these objects but
failed to show them on the browser frame. I tried to get contentpane for the
frame but I failed. does anyone know how to show these instantiated GUI
objects in my browser?

Many Thanks in Advance

===
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: Encrypt and Decrypt Password

2000-09-19 Thread Cogley, Jonathan

Read the bottom of any email in the list.


-Original Message-
From: Shen, Tony [mailto:[EMAIL PROTECTED]]
Sent: 19 September, 2000 12:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Encrypt and Decrypt Password


Would anyone out there kindly remind me how to unsubscribe and re-subscribe
again. I'll be out of town for about 3 weeks.
Thanks


> --
> From: Raj S[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list about Java Server Pages specification and
> reference
> Sent: Tuesday, September 19, 2000 10:36 AM
> To:   [EMAIL PROTECTED]
> Subject:  Re: Encrypt and Decrypt Password
>
> Hi,
>   Iam trying Sessions.Pls let me know if this is correct.
>
> <%HttpSession Hsession= request.getSession(true);
>
> <%
> Hsession.putValue(slog,Ologin);
> Hsession.putValue(spwd,Opassword);
>
> Object Ologin1 = Hsession.getValue("slog");
> Object Opassword1  = Hsession.getValue("spwd");
>
> String slog=(String)Ologin1;
> String spasswd= (String)Opassword1;
> out.println("SESSION VALUE OF LOGIN  IS ,: "+slog);
> out.println("SESSION VALUE OF PASSWORD IS : "+spasswd);
> %>
>
> But when I use getVaue(),it returns null.
>
> Thanks,
> Raj
>
>
>
>
>
>
>
> >From: Stefan Bushev <[EMAIL PROTECTED]>
> >Reply-To: A mailing list about Java Server Pages specification and
> > reference <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: Encrypt and Decrypt Password
> >Date: Tue, 19 Sep 2000 11:09:01 EEST
> >
> >do you use request.getParameter() to get it's value?
> >just like:
> >  
> >  ...
> >
> >so in the jsp:
> >  <%=request.getParameter("blah")%>
> >should return:
> >  Directory Manager
> >
> >s.b.
> >
> >>From: Raj S <[EMAIL PROTECTED]>
> >>Reply-To: A mailing list about Java Server Pages specification and
> >> reference <[EMAIL PROTECTED]>
> >>To: [EMAIL PROTECTED]
> >>Subject: Re: Encrypt and Decrypt Password
> >>Date: Mon, 18 Sep 2000 16:49:35 GMT
> >>
> >>Hi,
> >>   Thanks for this.But actually I have to transfer it through an
> >> link.Because I have a table displaying vlues from LDAP, and
> next
> >>to each record I have a text written as  "Del".
> >>By clicking on it,the user can delete that record.
> >>But the value will be visible in the  link which is what I want
> to
> >>avoid.So I wish to encrypt the password and then decrypt it back.
> >>
> >>One another problem that I am facing,is passign values which have  space
> >>in
> >>between.Through  it is fine,but when I transfer it through
>  >>type =Hidden> the value after space is removed.
> >>
> >>Like the name  Directory Manager.
> >>In the new JSP I receive only Directory and not Directory Manager
> >>
> >>Any particular reason for this??
> >>
> >>>
> >>>hi raj..
> >>>you may do something like:
> >>>
> >>>  
> >>>
> >>>blabla
> >>>
> >>>
> >>>  function myFunct() {
> >>>myForm.submit();
> >>>  }
> >>>
> >>>
> >>>i hope this will help you
> >>>
> >>>regards,
> >>>stefan bushev
> >>>
> >>>
> From: Raj S <[EMAIL PROTECTED]>
> Reply-To: A mailing list about Java Server Pages specification and
>  reference <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Encrypt and Decrypt Password
> Date: Mon, 18 Sep 2000 01:36:05 GMT
> 
> Hi,
>    How can I pass the value of a password without it being visible to
> the
> user on the browser?
> I will be passing it through  link,but the value of the
> password
> will be visible.
> Is it possible to encrypt while passing and decrypt back to original
> value
> in the othe JSP?
> If someone has written a code in this,it would be really helpful if
> you
> could share it.
> 
> Thanks,
> Raj
> 
> __
> ___
> 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
> >>>
> >>>___
> __
> >>>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/fa

Re: how to detect a browser closing

2000-07-13 Thread Cogley, Jonathan

Something to remember with this strategy is that the onunload event
is fired when the user goes to another page too NOT only when they close
the browser ... it is fired when the page "unloads" which can happen
in either of those ways.

I still think it would  be relevant to know what the developer was trying
to achieve by detecting this closing of the browser ... as this would help
in identifying an appropriate solution 

Cheers,
Jonathan


-Original Message-
From: M. Simms [mailto:[EMAIL PROTECTED]]
Sent: 12 July, 2000 5:54 PM
To: [EMAIL PROTECTED]
Subject: Re: how to detect a browser closing


You could place a Javascript function reference that calls a servlet in
every page's "onunload" event handler.

The trick would be to be sure to keep track of the number of open browser
windows the user has.
if there is only 1 and the "onunload" is triggered, then the session with
that site has effectively ended.


> -Original Message-
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Shane Duan
> Sent: Monday, July 10, 2000 12:19 PM
> To: [EMAIL PROTECTED]
> Subject: Re: how to detect a browser closing
>
>
> Since a server is a program that takes request and send response, and
> that the Internet connection is stateless, I don't think you can use the
> server to detect when the browser is closed.
>
> The only way I know would be to set a time out on the session and do the
> logic when the session time out occurs.
>
> Hope that helps.
>
> Shane Duan
> [EMAIL PROTECTED]
>
>  -Original Message-
> From:   Ionel Condor [mailto:[EMAIL PROTECTED]]
> Sent:   Monday, July 10, 2000 7:22 AM
> To: [EMAIL PROTECTED]
> Subject:how to detect a browser closing
>
> Hi,
> I have the following problem:
> I want to detect on the server side when a user (which has an open
> session on the server) has closed his browser by pressing the "X" close
> button of the window.
> I know that using http sessions is probably the unique way, but I don't
> know how, as I
> don't know if the server can't initiate by itself such a check ?
>
> Many thanks for any suggestions,
> Ionel C.
>
> 
> ===
> 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

===
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: JSP and UML - or: Modeling a JSP application

2000-07-11 Thread Cogley, Jonathan

Bill,

Just to check a small detail with you ...

A search on bookpool.com and amazon.com revealed a book called

Building Web Applications With Uml (Addison Wesley Object Technology Series)
By Conallen Jim
http://www.bookpool.com/.x/r9izdwzvmn/sm/0201615770

Is this the one you are recommending?? Or is there another book titled
"Designing Web Applications with the UML"?

Thanks!
Jonathan


-Original Message-
From: Hines, Bill [mailto:[EMAIL PROTECTED]]
Sent: 07 July, 2000 3:59 PM
To: [EMAIL PROTECTED]
Subject: Re: JSP and UML - or: Modeling a JSP application


Heiko,

I went to a week-long Rational OOA&D class and couldn't figure out how to
apply the UML to my web app. So I had a design session with Rational on my
web app and I noticed that the consultants were all peeking in this book. I
asked to see what it was and it was the book that Bill mentioned by Jim
Conallen of Rational ("Designing Web Applications with the UML"). It is an
excellent book. You will also need the Web Application Extensions (WAE) from
Rational's web site for some artifacts to use for server pages, client
pages, etc. Web apps are tough because a servlet for example can manifest
itself as a boundary object by the HTML that it generates (and becomes a
whole different object) and a controller object by nature of it's handling
of HTTP traffic, parameters, and other servlet-type jobs. Conallen provides
a model to handle that nicely. The book also has one of the best tutorials
on the whole web paradigm that I've seen.

Bill Hines
Hershey Foods

-Original Message-
From: Heiko Gottschling [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 29, 2000 12:12 PM
To: [EMAIL PROTECTED]
Subject: JSP and UML - or: Modeling a JSP application


Hi,

has anybody ever tried to model a JSP application in UML? I have not
worked very much with UML so far, but I would like to have a means to be
able to design my JSP applications before programming begins.

I think a big modeling problem would be the parameter passing between
servlets and JSPs, which works by storing key/value pairs in request
objects, sessions etc. BTW: I think this kind of parameter passing sucks
anyway, because it is neither type-safe nor is it noticed (by the
compiler!) if you simply don't pass any parameters at all :-( Wasn't
Java said to be a type-safe language? We might as well be programming
Basic...

So, how do you all design you applications? Or are you just hacking away
:-)?

cu
Heiko

===
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: Good ASP book?

2000-07-11 Thread Cogley, Jonathan

Wrox is definitely the way to go for ASP books ...
steer clear of the O'Reilly ASP books (but their Perl/UNIX/Java books are
superb!)



-Original Message-
From: Robert Nicholson [mailto:[EMAIL PROTECTED]]
Sent: 11 July, 2000 6:31 AM
To: [EMAIL PROTECTED]
Subject: Good ASP book?


Now that I understand JSP and the concepts of the Web application paradigm
I'd like to read up on ASP. In particular I'd like to know if there are any
books that focus on keeping business logic out of the presentation layer. I
know there's a chapter in WROX's Professional JSP , which I'm currently
reading but given that this is microsoft technology and the fact that
there's a derth of books out there on ASP I'd like to hear peoples thoughts
on good books for ASP of a similar standard to the Manning book.

Cheers.

Repeating. I don't want to read an ASP book that encourages VBScript in the
.asp pages.

Something that focuses on the ASP equivalent to Module2 architecture.

===
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 detect a browser closing

2000-07-10 Thread Cogley, Jonathan

Jeff,

What you described sounds similar to Response.IsClientConnected() in ASP
which returns whether or not the client is still connected (JSP has
something similar??)
but I think the poster wants to determine if/when the user closes the
browser once
the page has already downloaded

I think some more info from the poster on what he is trying to achieve
would help ... Ionel ??

Cheers,
Jonathan


-Original Message-
From: Steiner, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 10 July, 2000 2:02 PM
To: [EMAIL PROTECTED]
Subject: Re: how to detect a browser closing


There is a way to do this, but I am at a loss as to the actual package that
does it.  Basically, you would use the call if doing a vary hard processing
page and want to make sure before trying to send it back to make sure they
are still present.  It does some sort of a ping of the client machine to
make sure it is responding and then sends out the information.

I hope this helps to clarify for someone else thatcan remember the package.

Jeff Steiner

-Original Message-
From: Shane Duan [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 10, 2000 10:19 AM
To: [EMAIL PROTECTED]
Subject: Re: how to detect a browser closing


Since a server is a program that takes request and send response, and
that the Internet connection is stateless, I don't think you can use the
server to detect when the browser is closed.

The only way I know would be to set a time out on the session and do the
logic when the session time out occurs.

Hope that helps.

Shane Duan
[EMAIL PROTECTED]

 -Original Message-
From:   Ionel Condor [mailto:[EMAIL PROTECTED]]
Sent:   Monday, July 10, 2000 7:22 AM
To: [EMAIL PROTECTED]
Subject:how to detect a browser closing

Hi,
I have the following problem:
I want to detect on the server side when a user (which has an open
session on the server) has closed his browser by pressing the "X" close
button of the window.
I know that using http sessions is probably the unique way, but I don't
know how, as I
don't know if the server can't initiate by itself such a check ?

Many thanks for any suggestions,
Ionel C.


===
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

===
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 detect a browser closing

2000-07-10 Thread Cogley, Jonathan

As far I know this is not possible ... the best you could get would be
to use the window_onunload event on the browser to trigger something on
the server using say a document.location in clientside Javascript to direct
to a server page that just registers that the browser has closed.
This is still not fool proof since the window_onunload is not always
guaranteed (e.g. if network goes down, or client crashes etc)

Remember that HTTP is stateless and there is no communication between
the client and server unless the client makes a request.

Cheers,
Jonathan

-Original Message-
From: Ionel Condor [mailto:[EMAIL PROTECTED]]
Sent: 10 July, 2000 8:22 AM
To: [EMAIL PROTECTED]
Subject: how to detect a browser closing


Hi,
I have the following problem:
I want to detect on the server side when a user (which has an open
session on the server) has closed his browser by pressing the "X" close
button of the window.
I know that using http sessions is probably the unique way, but I don't
know how, as I
don't know if the server can't initiate by itself such a check ?

Many thanks for any suggestions,
Ionel C.

===
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: Passing Session values between ASP and JSP

2000-07-06 Thread Cogley, Jonathan

Daryani,

If you are just saving simple values in the session why not just use
a temporary cookie? Save the values to the cookie from ASP and then
read the values in from JSP. Your session id in ASP depends on the client
having cookies enabled anyway ... so why not?
If there are many values .. then use a cookie dictionary ...

I think this is the simplest solution ...

Cheers,
Jonathan


-Original Message-
From: Daryani Santosh [mailto:[EMAIL PROTECTED]]
Sent: 30 June, 2000 3:16 PM
To: [EMAIL PROTECTED]
Subject: Passing Session values between ASP and JSP


Hi All,
  I am working on JSPs that interact with another website , where
the
pages are ASPs , I need to get the session values set in a ASP into a JSP.
Session variables work fine between ASP-ASP and JSP-JSP but inter ASP-JSP
communication results in null session variables. I am not sure though , but
I
believe that there should'nt be any problem in doing so.
 Can anyone throw some light on this. Your response is appreciated

ASP code
<%
Session("cono")="7719"
%>

JSP code
<%
 String cono= (String)session.getValue("cono")
out.println("Value returned from session ="+cono);//results in a null
%>

Thanks in advance
Santosh

===
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: JavaScripts : Wanna disable viewing source of the page...

2000-06-30 Thread Cogley, Jonathan

This whole thread seems very silly ... if you need to hide your HTML then
you are putting something in there that you shouldn't be ... it is only
the presentation layer and will be sent to the client over the network ...
if the HTML content reaches their PC (which it must do to be seen) then
the unrendered source can be viewed in some way or other no matter what
you do.

If you really don't want to have your presentation layer made public then:
use a compiled form (e.g. applets or activex)



-Original Message-
From: Mark Mascolino [mailto:[EMAIL PROTECTED]]
Sent: 30 June, 2000 2:57 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaScripts : Wanna disable viewing source of the page...


this can be problematic when framesets are involved



 Internet Mail Message
 Received from host: mail.javasoft.com
 [204.160.241.28]



Envelope Sender:[EMAIL PROTECTED]

From: Mutahar Qayum <[EMAIL PROTECTED]> on 06/30/2000 02:44 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Mark Mascolino-MR/PGI)
Subject:  Re: [JSP-INTEREST] JavaScripts : Wanna disable viewing source of
  the page...




Above all, you can go in view source from menu to view the code.

-Original Message-
From: Mark Mascolino [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 30, 2000 11:28 AM
To: [EMAIL PROTECTED]
Subject: Re: JavaScripts : Wanna disable viewing source of the page...


-or- utilizing the view-source: protocol  or I have found that on IE4 that
if
you left click and hold and then right click you can get around this.


I might add that disabling right clicking is highly annoying to users (like
me)
who use the context sensitive menu to navigate backwards and forwards.

mark



 Internet Mail Message
 Received from host: mail2.javasoft.com
 [204.160.241.38]



Envelope Sender:[EMAIL PROTECTED]

From: Jim Preston <[EMAIL PROTECTED]> on 06/30/2000 02:24 PM

Please respond to A mailing list about Java Server Pages specification and
  reference <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:(bcc: Mark Mascolino-MR/PGI)
Subject:  Re: [JSP-INTEREST] JavaScripts : Wanna disable viewing source of
  the page...




Disabling right click only protects you from incredibly ignorant people.
There's also a menu item for viewing the page source.

--Jim Preston

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Maureen
Sent: Thursday, June 29, 2000 10:03 PM
To: [EMAIL PROTECTED]
Subject: Re: JavaScripts : Wanna disable viewing source of the page...


You could use JavaScript for this purpose...a no right click function can be
found at

www.javascripts.com

type in 'right click' in their search box and you will get a list of sample
code for the purpose of disabling right click altogether.

Maureen


beware the fish in the sea...
www.sharkfishcity.com

- Original Message -
From: Vivek Vijapure <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 29, 2000 11:33 PM
Subject: JavaScripts : Wanna disable viewing source of the page...


> Hey JavaGurus there,
>
> Can anybody tell me how to disable the mouse click, view source of
> the HTML page in Netscape and IE. I tried to use
> 'document.captureEvents' but it doesn't fit to my purpose. Also the menu
> option 'view/Page Source' should be handled.
>
> -Vivek
>
>
===
> 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

===
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://ww

Re: WebServer Source Code

2000-06-28 Thread Cogley, Jonathan

A search on any popular search engine would not go amiss! :)
http://www.geocities.com/SiliconValley/Bridge/8617/jad.html



-Original Message-
From: Ritesh_Srivastava [mailto:[EMAIL PROTECTED]]
Sent: 28 June, 2000 8:56 AM
To: [EMAIL PROTECTED]
Subject: Re: WebServer Source Code


where is this decompiler available.

> --
> From: Prabhakar Vardhan Ojha[SMTP:[EMAIL PROTECTED]]
> Reply To: A mailing list about Java Server Pages specification and
> reference
> Sent: Saturday, January 02, 1999 2:56 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: WebServer Source Code
>
> use decompiler  "jad".
>
> You can download it for free.
>
> Regards,
> prabhakar
>
> - Original Message -
> From: Khem Chand Sachdeva <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 28, 2000 2:39 PM
> Subject: Re: WebServer Source Code
>
>
> > use any decompiler
> > - Original Message -
> > From: V.Vasant <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 28, 2000 3:05 PM
> > Subject: WebServer Source Code
> >
> >
> > > hi,
> > > I would like to have a look at the source of the JavaWebServer
> > > Can someone tell me where I can find these. I have got the
> jswdk-1.0.1,
> > > but I am unable to find it's source . All I see is only .class files.
> > > Can someone please help me?
> > >
> > > -V.Vasant
> > >
> > >
> >
> ==
> =
> > > 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
>

===
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 Post Data IN JSP

2000-06-27 Thread Cogley, Jonathan

It seems that it actually depends entirely on the server implementation.
http://x65.deja.com/getdoc.xp?AN=631726939&search=thread&CONTEXT=962117058.1
73080628&HIT_CONTEXT=962117058.173080628&HIT_NUM=2&hitnum=4

I guess the best rule of thumb is that if the querystring is gonna get long
rather use post.

J


-Original Message-
From: Veena [mailto:[EMAIL PROTECTED]]
Sent: 16 February, 2000 9:44 AM
To: [EMAIL PROTECTED]
Subject: Re: How to Post Data IN JSP


But that's the exact number they gave in Jason Hunter's ServletProgramming
Book (FYI : page 16)   :-)))

- Original Message -
From: Cogley, Jonathan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2000 6:19 PM
Subject: Re: How to Post Data IN JSP


> Veena,
>
> I think the number is actually 255 - I am guessing it has something to do
> with only one byte of storage since we have that all too common 2^8 thing
> happening there! :)
>
> BTW to anyone interested - I got the POST thing working from Java ...
>
> Here is my working code for a POST() method:
>
> Regards,
> Jonathan
>
> ==Snip===
>
>   /**
>  * Opens a connection to the given URL using the POST method
>  */
> public boolean POST () {
> // clear the contents
> m_strContents = "";
> // creates URL
> URL urlFile = null;
> try {
> urlFile = new URL (m_strURL);
> } catch (MalformedURLException e) {
> urlFile = null;
> System.out.println("Could not create URL. " +
> e.getMessage());
> return false;
> }
> // Open the URL connection
> URLConnection uc;
> try {
> uc = urlFile.openConnection();
> uc.setDoOutput(true);
> uc.setUseCaches(false);
>
> uc.setRequestProperty("content-type","application/x-www-form-urlencoded");
> DataOutputStream dos = new
> DataOutputStream(uc.getOutputStream());
> dos.writeBytes(getPostString());
> dos.flush();
> dos.close();
> m_inpstmFile = null;//
> clear input stream
> m_inpstmFile = uc.getInputStream(); //
> open input stream
> } catch (IOException e) {
> System.out.println("IO error opening
> connection. " + (e.getMessage()));
> return false;
> }
> // read the data from the InputStream
> String strLine = "";
> StringBuffer strbufFileContents = new
> StringBuffer(0); // create empty buffer
> if (m_inpstmFile != null) { // then try and get
the
> file contents
> try {
> // Deprecated
> // DataInputStream buffFile = new
> DataInputStream(m_inpstmFile);
> BufferedReader buffFile = new
> BufferedReader(new InputStreamReader(m_inpstmFile));
> while ( (strLine =
> buffFile.readLine()) != null) {
> strbufFileContents.append
> (strLine);  // add each line of the file to buf.
> }
> buffFile.close();
> } catch (IOException e) {
> System.out.println("IO error
reading
> from connection. " + (e.getMessage()));
> strbufFileContents.setLength (0);
//
> empty the buffer
> return false;
> }
> }
> // Save the contents of the buffer.
> m_strContents = strbufFileContents.toString ();
> return true;
> }
>
> ==Snip===
>
>
> -Original Message-
> From: Veena [mailto:[EMAIL PROTECTED]]
> Sent: 15 February, 2000 10:25 AM

Re: Session timeout

2000-06-27 Thread Cogley, Jonathan

FYI

I have heard of connection managers using something like
"SELECT '1'" to keep the connections open and prevent them
from timing out.



-Original Message-
From: Thomas Preston [mailto:[EMAIL PROTECTED]]
Sent: 27 June, 2000 10:09 AM
To: [EMAIL PROTECTED]
Subject: Re: Session timeout


You probably need to have your Oracle timeout taken out.  When you bring up
the server, the server grabs 50 connections.  When the connections go unused
in the pool they will be timing out on you.  There is probably some work
around for this with your app server.  Probably you should review doc for
your app server with regard to Oracle and connection pooling.


>From: "Aggarwal, Pawan" <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Session timeout
>Date: Tue, 27 Jun 2000 18:30:41 +0530
>
>There is a problem faced while using the connection pool class in Oracle..
>I dont know how to tacke it..
>
>What i have is a pool of 50 connection...
>The moment the server is started and the first user logins then the 50
>connections are acquired..
>
>Now the time out for oracle session is 15 minutes and web server session
>time out is 30 min..
>
>If a user connects and then leave the screen for more than 15 mins then the
>oracle kills session
>and the number of connection from pool decrease from 50 to 49
>Even if i open a new browser window and try to login then i get exceptions
>that connection time out
>which means i am not getting any of the 49 connections??
>I restart the web server problem is solved
>
>What i am confused about is whether if there is no other user for at least
>lets say 2 hours
>then will all the connections (49) also die out as time out for session for
>oracle is 15 mins
>Then what is the use of connection pool...
>is there any difference between session and connection ??
>There must be some way out?
>Does increasing the web server session time out > oracle session time out
>will help??
>
>Please advice\
>
>===
>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

===
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 Post Data IN JSP

2000-06-27 Thread Cogley, Jonathan

Veena,

I think the number is actually 255 - I am guessing it has something to do
with only one byte of storage since we have that all too common 2^8 thing
happening there! :)

BTW to anyone interested - I got the POST thing working from Java ...

Here is my working code for a POST() method:

Regards,
Jonathan

==Snip===

  /**
 * Opens a connection to the given URL using the POST method
 */
public boolean POST () {
// clear the contents
m_strContents = "";
// creates URL
URL urlFile = null;
try {
urlFile = new URL (m_strURL);
} catch (MalformedURLException e) {
urlFile = null;
System.out.println("Could not create URL. " +
e.getMessage());
return false;
}
// Open the URL connection
URLConnection uc;
try {
uc = urlFile.openConnection();
uc.setDoOutput(true);
uc.setUseCaches(false);

uc.setRequestProperty("content-type","application/x-www-form-urlencoded");
DataOutputStream dos = new
DataOutputStream(uc.getOutputStream());
dos.writeBytes(getPostString());
dos.flush();
dos.close();
m_inpstmFile = null;//
clear input stream
m_inpstmFile = uc.getInputStream(); //
open input stream
} catch (IOException e) {
System.out.println("IO error opening
connection. " + (e.getMessage()));
return false;
}
// read the data from the InputStream
String strLine = "";
StringBuffer strbufFileContents = new
StringBuffer(0); // create empty buffer
if (m_inpstmFile != null) { // then try and get the
file contents
try {
// Deprecated
// DataInputStream buffFile = new
DataInputStream(m_inpstmFile);
BufferedReader buffFile = new
BufferedReader(new InputStreamReader(m_inpstmFile));
while ( (strLine =
buffFile.readLine()) != null) {
strbufFileContents.append
(strLine);  // add each line of the file to buf.
}
buffFile.close();
} catch (IOException e) {
System.out.println("IO error reading
from connection. " + (e.getMessage()));
strbufFileContents.setLength (0); //
empty the buffer
return false;
}
}
// Save the contents of the buffer.
m_strContents = strbufFileContents.toString ();
return true;
}

==Snip===


-Original Message-
From: Veena [mailto:[EMAIL PROTECTED]]
Sent: 15 February, 2000 10:25 AM
To: [EMAIL PROTECTED]
Subject: Re: How to Post Data IN JSP


FYI

i have heard that some servers limit the length of the URLS' and Query
strings to just 240 Characters .


- Original Message -
From: Pratik <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 23, 2000 5:34 PM
Subject: Re: How to Post Data IN JSP


> Yes sumit you are right.
> But as I am developing a freamework.
> I don't know how may form elements a entry screen have.
>
> If the size of querystring exceeds 1000 char thare is a good chance for
> misbehaviour.
> So I can't use query string.
> Same way this is framework so event I can't use session variables for each
> elements in form.
>
> any suggestion?
>
>
> Thanks
> Pratik
> - Original Message -
> From: Sumeet Aggarwal , Gurgaon <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 23, 2000 3:50 PM
> Subject: Re: How to Post Data IN JSP
>
>
> > Hi Pratik,
> >
> > The department information u passed to the frames page and not to the
> > navigation or results page
> > While defining your frame in frame.jsp, just write the following code
> >  > %>">
> >
> > Also, u can try passing the department value using session objects, and
> > reinitialise the session object to blank in results.jsp aftegetting the
> > value in local 

Re: How to Post Data IN JSP

2000-06-23 Thread Cogley, Jonathan

I want to do the same thing and I found this message on deja news.
Let me know if it works! :)

http://x55.deja.com/getdoc.xp?AN=631543114&search=thread&CONTEXT=961768925.8
41613415&HIT_CONTEXT=961768925.841613415&HIT_NUM=9&hitnum=2




-Original Message-
From: ralhan [mailto:[EMAIL PROTECTED]]
Sent: 18 May, 2000 9:29 PM
To: [EMAIL PROTECTED]
Subject: Re: How to Post Data IN JSP


check out url class
ralhan

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Pratik
Sent: Friday, June 23, 2000 1:52 PM
To: [EMAIL PROTECTED]
Subject: Re: How to Post Data IN JSP


 I wnat to open a URL Connection and writing the data into
the output stream of the connection.
But How that I don't know. I don't know the exect http protocol to to this
 thing in java.

Thanks
Pratik
- Original Message -
From: Tamanna Kher <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 23, 2000 11:36 AM
Subject: Re: How to Post Data IN JSP


> What do u exactly mean by manually posting data to some url?
> will the data  be dynamically created , i.e. on some conditions etc.
>
>
>
>
> Pratik <[EMAIL PROTECTED]> on 06/23/2000 12:03:20 PM
>
> Please respond to A mailing list about Java Server Pages specification and
>   reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:(bcc: Kher Tamanna-SWD-ITIL-UB/Itilmail)
>
> Subject:  How to Post Data IN JSP
>
>
>
>
> Hi
> I want to manually post data to some URL
> Can Somebody tell me how to do this
> I searched Mailing list but not found satisfactory Answer.
>
> Thanks in Advance
>
>
===
> 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

===
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: Design choices: JSP & Javascript

2000-06-23 Thread Cogley, Jonathan

Why not use some of Javascript's OO features for example ...

// This javascript client side code should be generated from server side
code
// from your data source

var myData = new Array();

myData[0] = new Array();
var myData[0].name = 'Fred';
var myData[0].dob  = '05/07/1950';

myData[1] = new Array();
var myData[1].name = 'Susan';
var myData[1].dob  = '05/09/1950';

myData[2] = new Array();
var myData[2].name = 'Joe';
var myData[2].dob  = '05/08/1950';


You now have a Javascript object (really just an array) with records
containing properties relating to your data.

You can then use a client-side function to populate a drop-down for example
...

function populateDropDown() {
for (var n=0; n < myData.length; n++) {
var newOption = new Option(myData[n].name);
newOption.value = n;
newOption.dob = myData[n].dob;
mySELECTBOX.add(newOption);
}
}


I like this way of doing this and with a small amount of records being
displayed the
amount of content downloaded to the browser is not excessive.

Cheers,
J



-Original Message-
From: rohit [mailto:[EMAIL PROTECTED]]
Sent: 23 June, 2000 12:51 AM
To: [EMAIL PROTECTED]
Subject: Re: Design choices: JSP & Javascript


M. Simms wrote:
> Lots of considerations here...JavaScript can keep your server requests
> lower
> however, when databases are involved.unless you can generate
> JavaScript arrays of small size (<200 items) and "pre-load" the HTML with
> the data needed to process the screen, you are talking several server-side
> trips.
>
> JavaScript's only real data repository with any usefulness is arrays.

Could someone please tell me how to "pre-load" HTML files.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.157 / Virus Database: 73 - Release Date: 05/31/2000

===
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: return the ASCII

2000-06-12 Thread Cogley, Jonathan

Liart,

Try this...

int intUnicodeVal =
Character.getNumericValue(strTheString.charAt(0));

Cheers,
J


-Original Message-
From: Liart Junior [mailto:[EMAIL PROTECTED]]
Sent: 03 June, 2000 4:41 AM
To: [EMAIL PROTECTED]
Subject: return the ASCII


I need a method to return the ASCII value of the first character of string

Liart Junior

===
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: Good IDE for JSP?

2000-05-26 Thread Cogley, Jonathan

Forte from Sun ... it's nice and free (the CE version)

-Original Message-
From: Ben Joyce [mailto:[EMAIL PROTECTED]]
Sent: 26 May, 2000 7:01 AM
To: [EMAIL PROTECTED]
Subject: Good IDE for JSP?


Hi.  what are we all using for building JSP scripts?  Is there anything
available similar to MS Interdev (ASP) ?  Notepad's good but...

Cheers,

 .b

--
The opinions expressed herein are not necessarily those of my employer, not
necessarily mine, and probably not necessary.

===
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: CGI variables

2000-05-24 Thread Cogley, Jonathan

RoBo,

I had this same problem a while back ...

The problem is based on the fact that CGI is platform specific and
java is not so it does not care about environment variables ...

This is what I found that helped me at the time.
http://forum2.java.sun.com/forum?14@@.ee7780f

I have tried the code and it works ... on WinNT anyway ... it seems to use
cmd
somehow ... dont think it can be very efficient.

Hope this helps you too!

Cheers,
Jon



-Original Message-
From: Robo Zilka [mailto:[EMAIL PROTECTED]]
Sent: 24 May, 2000 5:30 AM
To: [EMAIL PROTECTED]
Subject: Re: CGI variables


Thanks, but I red API and don't found method, which can read all CGI
variables,
not only some of them :(
(In ASP there is a request.ServerVariables(name_of_variable) function, so
I need to do something like:
for each item in Request.ServerVariables
Response.Write item & "=" & Request(item) & ""
next
)

RoBo Zilka
   
  /EuroWeb a.s.
 /www.euroweb.sk
/mailto:[EMAIL PROTECTED]

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 23, 2000 6:40 PM
To: [EMAIL PROTECTED]
Subject: Re: CGI variables


Robo Zilka wrote:

> Know anybody, how to get(read) CGI variables in JSP or Servlet?

Most of the CGI environment values that you will be interested in are
represented
by properties of the "request" object that is passed to your servlet (it it
an
implicit variable in JSP pages).  For example, the QUERY_STRING value can be
retrieved by calling request.getQueryString().  Check the API documentation
for the
ServletRequest and HttpServletRequest classes.

>
> Thanks
>
> RoBo Zilka
>

Craig McClanahan

===
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: refreshing a frame

2000-05-02 Thread Cogley, Jonathan

Why don't you just do it in JavaScript on the client? ... generate some
JavaScript from
your server side code, something like:


parent.parent.YourFramesName.document.location =
parent.parent.YourFramesName.document.location;


That way any frame could call another frame to refresh when it is
downloaded.

Since refreshing is a client-side thing, I dont see a problem with a
solution like this?

J



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 02 May, 2000 9:56 AM
To: [EMAIL PROTECTED]
Subject: Re: refreshing a frame


Be careful with using meta tags for refreshing. They work in Netscape,
but not IE.

-Original Message-
From: akaushik
Sent: Wednesday, March 03, 1999 10:48 PM
To: JSP-INTEREST
Subject: Re: refreshing a frame


U can referesh the fram by the help of META tags
The code is...



bye..
[EMAIL PROTECTED]

- Original Message -
From: Kent Symanzik <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 01, 2000 6:48 PM
Subject: refreshing a frame


> I have a servlet that adds a row to the database as a result of a form
post
> in frame A.  The rows in the db are displayed in a list in frame B.
How
can
> I tell frame B to refresh itself so it updates the list from the db?
>
> Kent
>
>

===
> 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


This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.

===
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: DB connection problem with NES/Jrun

2000-04-24 Thread Cogley, Jonathan

Visakh,

The user that you have the web server running as probably does not have the
CLASSPATH set correctly else it would be able to find the jdbc drivers.

Regards,
Jonathan

BTW - You didn't mention what platform you are on (NT/Unix?) ...


-Original Message-
From: Visakh Menon [mailto:[EMAIL PROTECTED]]
Sent: 24 April, 2000 12:16 PM
To: [EMAIL PROTECTED]
Subject: DB connection problem with NES/Jrun


Hi folks

I'm using NES 3.6 webserver and Jrun 2.3.3 servlet engine.
I'm trying to connect to a oracle database in a remote machine
using JDBC (using Oracle thin driver). I can connect if I run the
program from command prompt. but If I try to run as a servlet
I get an error.

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
[oracle.jdbc.driver.OracleDriver] java.sql.SQLException: No suitable driver

Code :
Class.forName ("oracle.jdbc.driver.OracleDriver");
DriverManager.getConnection("jdbc:oracle:thin:@server-ip:1521:orcl",
"username", "pwd");

I have set oracle.jar (driver)  file in my Class path.

Do I need to make some changes in NES/Jrun setup for accessing Oracle DB?

Thanks

Vis..


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



Re: How to access environment variables such as "QUERY_STRING"?

2000-04-14 Thread Cogley, Jonathan

Hans,

*** SOLVED!!! ***

Thanks for your advice... I realise it is inefficient to run Java as a CGI
...
it is taking about 8MB of mem a pop (cos of the JVM as you pointed out) ...

Anyway, we have redone it as a J++ COM component (.dll) and are calling it
from ASP which is working far better. (We had to install the MS Java SDK on
the server to get that to work though? - I think it was the WFC that was
needed)

But I did get it working as a CGI (.exe) so I thought I would post the class
I found for getting the environment variables!

I found it here ... all credits to "liquid_isotope" for posting it! :)
http://forum2.java.sun.com/forum?14@@.ee7780f
I have extended it with a parseQueryString method to give me what I needed.

Thanks,
Jonathan

===
Snip here!
===
Use it like this ...
// get environment variables
clsEnvironmentVariables ev  = new
clsEnvironmentVariables();
String l_strBDGT_DPT_ID =
ev.querystring("BDGT_DPT_ID");
String l_strBDGT_ACT_CELL_REV_NO= ev.querystring("REV_NO");

===

import java.util.*;
import java.io.*;

class clsEnvironmentVariables extends Hashtable {
private Hashtable m_htQueryString;

public clsEnvironmentVariables() {
//You probably have to do something different in Unix or Mac
//but I don't know those yet, so this will only work in Windows
//--- liquid_isotope *->!

String[] cmd = {"cmd", "/c", "SET"};

try {
Process proc = Runtime.getRuntime().exec(cmd);
BufferedReader inp = new BufferedReader(new
InputStreamReader(proc.getInputStream()));
String LINE = inp.readLine();
while (LINE != null) {
int eqPos = LINE.indexOf("=");
if (eqPos >= 0) {
String name = LINE.substring(0, eqPos);
String value = LINE.substring(eqPos + 1);
put(name.toUpperCase(), value);
// Call the private method to parse
the querystring
if (name.equals("QUERY_STRING")) {
this.parseQueryString(value); }
}
LINE = inp.readLine();
}
inp.close();
} catch (IOException e) {
System.out.println("Weird I/O error");
}
}
public synchronized Object get(Object name) {
// this case-desensitizes the name, overriding Hashtable.get()
String theName = name.toString().toUpperCase();
return super.get(theName);
}
public synchronized Object put(Object name, Object value) {
String theName = name.toString().toUpperCase();
String theValue = value.toString();
Object result = super.get(theName);

// this is windows specific
String[] cmd = {"cmd", "/c", "SET " + theName + "=" + theValue};

try {
Process proc = Runtime.getRuntime().exec(cmd);
BufferedReader inp = new BufferedReader(new
InputStreamReader(proc.getInputStream()));
String LINE = inp.readLine();
while (LINE != null) {}
super.put(name.toString().toUpperCase(), value.toString());
return result;
} catch (IOException e) {
System.out.println("Weird I/O error");
return null;
}

}
public synchronized String querystring(Object pstrKey) {
// Returns items from the m_htQueryString HashTable
String l_strKey = pstrKey.toString().toUpperCase();
return (m_htQueryString.get(l_strKey)).toString();
}
private void parseQueryString(String pstrQueryString) {
// Parse the QUERY_STRING string into the m_htQueryString HashTable
m_htQueryString = new Hashtable();
StringTokenizer l_stPairs = new StringTokenizer(
pstrQueryString, "&", false );
while (l_stPairs.hasMoreTokens()) { // chop up on &
String l_strPair = l_stPairs.nextToken();
StringTokenizer l_stKeyValue = new StringTokenizer(
l_strPair, "=", false );// chop up on =
// Get the key
String l_strKey = l_stKeyValue.nextToken();
// Get the value
String l_strValue = "";
int l_intCount = 0;
while (l_stKeyValue.hasMoreTokens()) {
if (l_intCount > 1)  { l_strValue += "="; }
l_strValue += l_stKeyValue.nextToken();
l_intCount++;
}

Re: How to access environment variables such as "QUERY_STRING"?

2000-04-14 Thread Cogley, Jonathan

Tom,

I just found this.
http://forum2.java.sun.com/forum?14@@.ee7780f

The code given as the EnvVars class:
I have tried it and it works ... on WinNT anyway ... it seems to use cmd
somehow ... dont think it can be very efficient.

I am still going to write a method to parse out the QUERY_STRING properly
etc ...

Our situation is an NT intranet without servlet support yet and we need to
do some multithreaded work hence Java! :)

Hope this helps you too!

Cheers,
Jon



-Original Message-
From: Tom Eugelink [mailto:[EMAIL PROTECTED]]
Sent: 14 April, 2000 8:48 AM
To: [EMAIL PROTECTED]
Subject: AW: How to access environment variables such as "QUERY_STRING"?


I tried using environment variables because the webserver that hosts my
website doesn't feature servlets yet. But I have not succeeded. It seems
that by deprecating the getenv() calls and suggesting property files, SUN
wants to prevent the usage of environment variables completely: either type
it in a property file or specify it as commandline parameters.

As I said: I have not found a solution.

Tom



-Ursprüngliche Nachricht-----
Von: Cogley, Jonathan [mailto:[EMAIL PROTECTED]]
Gesendet am: Freitag, 14. April 2000 14:30
An: [EMAIL PROTECTED]
Betreff: Re: How to access environment variables such as "QUERY_STRING"?

Hans,

I am actually trying to access them from a Java Console app compiled
to an .exe and run as a CGI in IIS. - Dont ask why?! :)
(servlets or JSP are not an option for us right now ... but will be in the
future!!)

I think that I may need to read the System.in and parse it in a similar
way to a Perl program does ... however I think I still need CONTENT_LENGTH
in
order to do the read successfully.

Anyone done anything like this before??

Perhaps my question is best suited to a Java forum ...

Thanks
Jonathan



-Original Message-
From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
Sent: 13 April, 2000 5:53 PM
To: [EMAIL PROTECTED]
Subject: Re: How to access environment variables such as "QUERY_STRING"?


"Cogley, Jonathan" wrote:
>
> Hi,
>
> Anyone know how to access environment variables?
> such as "QUERY_STRING" WITHOUT using request.getParameter,etc
>
> There is a method System.getenv() but it is deprecated ...
> The error mentions using "use properties and -D instead"
> but how do you achieve this?

Look at the Servlet API, <http://java.sun.com/products/servlet/>.
It contains explicit methods to get all info you get through environment
variables in a GCI script. Since a JSP page is actually a servlet, you
can use the complete Servlet API in your JSP pages.

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.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

===
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 access environment variables such as "QUERY_STRING"?

2000-04-14 Thread Cogley, Jonathan

Hans,

I am actually trying to access them from a Java Console app compiled
to an .exe and run as a CGI in IIS. - Dont ask why?! :)
(servlets or JSP are not an option for us right now ... but will be in the
future!!)

I think that I may need to read the System.in and parse it in a similar
way to a Perl program does ... however I think I still need CONTENT_LENGTH
in
order to do the read successfully.

Anyone done anything like this before??

Perhaps my question is best suited to a Java forum ...

Thanks
Jonathan



-Original Message-
From: Hans Bergsten [mailto:[EMAIL PROTECTED]]
Sent: 13 April, 2000 5:53 PM
To: [EMAIL PROTECTED]
Subject: Re: How to access environment variables such as "QUERY_STRING"?


"Cogley, Jonathan" wrote:
>
> Hi,
>
> Anyone know how to access environment variables?
> such as "QUERY_STRING" WITHOUT using request.getParameter,etc
>
> There is a method System.getenv() but it is deprecated ...
> The error mentions using "use properties and -D instead"
> but how do you achieve this?

Look at the Servlet API, <http://java.sun.com/products/servlet/>.
It contains explicit methods to get all info you get through environment
variables in a GCI script. Since a JSP page is actually a servlet, you
can use the complete Servlet API in your JSP pages.

Hans
--
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.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



How to access environment variables such as "QUERY_STRING"?

2000-04-13 Thread Cogley, Jonathan

Hi,

Anyone know how to access environment variables?
such as "QUERY_STRING" WITHOUT using request.getParameter,etc

There is a method System.getenv() but it is deprecated ...
The error mentions using "use properties and -D instead"
but how do you achieve this?

Many thanks,
Jonathan

===
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 do I link Tomcat to IIS

2000-04-12 Thread Cogley, Jonathan

See

http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat/etc/tomcat-iis-how
to.html

Select the "as text" option!

Regards,
Jonathan



-Original Message-
From: David Kao [mailto:[EMAIL PROTECTED]]
Sent: 12 April, 2000 12:38 PM
To: [EMAIL PROTECTED]
Subject: How do I link Tomcat to IIS


I saw the instructions to link Tomcat to Apache server, but I am wondering
if I can link Tomcat to IIS and am desperate to learn how.

David Kao

===
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: JSP and Javascript

2000-04-12 Thread Cogley, Jonathan

Hi,

Try using the JSP expression syntax ... <%= %>

e.g.

document.location = '<%= response.encodeURL("yourURLwithParamsHere!") %>';


You could probably even add the params you want afterwards ... just use
the JavaScript escape() function to watch out for bad characters.

e.g.

document.location = '<%= response.encodeURL("yourURL") %>&myParam=' +
escape(document.myParam.value);


I don't actually know but I assume the encodeURL adds some Session/URL token
to the URL
that you need to maintain session ... ?

Hope that helps!
Jonathan




-Original Message-
From: Joachim Schaaf [mailto:[EMAIL PROTECTED]]
Sent: 11 April, 2000 1:07 PM
To: [EMAIL PROTECTED]
Subject: JSP and Javascript


Hi,

is there an intelligent way to combine JSP and Javascript? I want to use
some
entry fields (choices etc.) to specify search parameters in the JSP page;
the
question is: how do I get the values? I have tried to reload the page
with onChange and appended "?param=value", but then I loose my session,
because
I can not use response.encodeUrl from Javascript.
Any ideas?


Joachim
--
IoS - Gesellschaft fuer innovative Softwareentwicklung mbH
Web: http://IoS.PZwo.de/, http://IoS.PZwo.de/team/js/
Tel/Fax: +49-2234-983590/986433, Mobile: +49-170-4861253
Email:   [EMAIL PROTECTED] - PGP mails welcome.
Linux-Kontor: http://www.Linux-Kontor.de/

===
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