Re: JSP page that display 10 result...

2000-11-21 Thread Burr Sutter

In SQL Server you can use the TOP keyword to limit the number of rows
returned in a query.

select top 100 name,phone from customers where state like 'ga%'

I'm not sure how to do the between 10 and 20 bit but these things are all
unique per database engine. Your best bet is to limit the total number of
records returned from the database to the JSP/bean/servlet using something
like top for SQL Server or rowcount for Oracle. AltaVista and other search
engines limit the user to 200 total records and I think that is reasonable
for the average end-user of most applications. Once you have the 200 records
loaded into a Vector holding an array to represent the columns you can
create a UI that displays the first 10 records to the user and then offer
next 10 and prev 10 options that "page" through the vector.

Burr
[EMAIL PROTECTED]

- Original Message -
From: Marco <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 20, 2000 2:22 PM
Subject: Re: JSP page that display 10 result...


> Thanx but this SQL query can work with SQL Server or mySQL???
> i didn't find any help about rowcount in SQL Server.
> Thanx marco
>
>
>
> > In your query use "rowcount"
> >
> > i.e.
> >
> > 1st query "SELECT * FROM table rowcount < 11";
> > 2nd query "SELECT * FROM table rowcount > 10 AND rowcount < 21";
> > etc...
> >
> > --
> > Antonio W. Lagnada
> > Ecommerce Consultant
> > [EMAIL PROTECTED]
> >
> > This email address is specifically
> > for JSP-Interest email list.
> > Remove _NOSPAM for the actual email.
> >
> >
> >
> >  Marco <[EMAIL PROTECTED]> wrote:
> > > How to make a JSP page that display 10 result (from a DB) per time
> > > and after
> > > with a next and prev link going forward the result??
> > > Can anyone explain me to this??
> > > Ca i have a code that explain this???
> > > Thanx in advance...
> > > marks
> > >
> > >
>
===
> > > 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 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".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

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

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



Re: Help: Include a HTML file with image

2000-11-14 Thread Burr Sutter

Since you have included the HTML in a JSP the code src="myimage.jpg" will
ask the webserver to fetch this image from the directory in which the JSP
sits. So does the .jpg file, .jsp file and .html file all sit in the same
directory on your webserver's hard drive?  You could use a more explicit
path to the actual .jpg file.

Burr
[EMAIL PROTECTED]



- Original Message -
From: fred Java <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 14, 2000 2:10 PM
Subject: Help: Include a HTML file with image


> Dear All,
>  Could you give me some help on the following problem please?
> I have a jsp file include an html page. All worked well until I have a
image
> in the HTML page. I can not see the image (jpg file) from the JSP page (I
> only can see the document in the HTML page without the image). if I
display
> the HTML from outside of the JSP page, I can see everything (with the
> image). Could you give me some help please?
>
> Best Regards,
>
> Fred
>
> Some code I used:
>
> In JSP:
> <%@ include file="myhtml.html" %>
>
> In HTML:
> 
>   
>   
>height=151 src="myimage.jpg" width=144>
>   
> 
> ... other thing in HTML part, which can be seen from JSP page.
>
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
===
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

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

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



Re: State Management Questions...

2000-11-14 Thread Burr Sutter

I've tried to answer a few of these questions but one thing to keep in mind
is that app. server vendors are likely to implement this in different ways.

> I belive ive seen talk of a session object/layer.  How does this
> work?  non-persistent cookie?  does it rely on this cookie 100%.
>
The session is a server-side chunk of server memory that is dedicated a
particular user's browser session. Typically it uses a non-persistant cookie
to maintain a browser's identity. Some vendors rely 100% on the cookie.
Others allow you to also use url rewriting that adds the "cookie" to each
URL.  This does mean you'll need to programmatically handle this in your
code but its not that difficult.

> what about scaleability concerns?  can this scale on a web farm easily and
> properly?  (not redirecting user back to same machine in the farm - but
> being able to handle the request transparently across your entire
> farm).  Basically, where is this session information stored?  Server
memory
> where the session started, database or other shared storage medium on a
> per-user basis?
It uses server memory which means you don't want to store a few MBs of data
per user. For instance, storing large java.sql.Resultsets in the session
just so that the user can scroll through database records would be a bad
idea if you plan to have a lot of simultaneous users. There is a timeout
period that is set programmatically and/or by the server administrator to
determine when this thing will die if the user doesn't return to the site.
If you are using a server farm then this changes things a little. Again this
is vendor dependant but from what I've seen once a particular user has been
directed to a particular server in the cluster/farm then that user will
continue to interact with that particular server until they are finished
with the overall visit/transaction or until the server dies.  Should the
server fail then various app. server vendors have different ways of
replication session information across the members of the cluster. In some
cases they use RMI to push session information to a backup server so that
when the user gets reconnected through the dispatcher/load balancer they'll
be attached to the backup server.  In some cases they use the database to
persistent the session information so that each server knows to visit those
database records to see if the user has a session preestablished.


>
> How are the sessions identified?  some sort of GUID?  How is this
> generated, based on what criteria?

I'm not sure if there is a standard on this but from what I've seen the
cookie holds a GUID.

>
> What are the limitations of this?  That is, if we start loading this up,
> how bad will it be for server performance?  Anyone do any specific load
> testing?

Many of the major Internet websites use these types of technologies so it
seems that load can be handled.
Keep in mind that JSP is really just a Servlet and servlets can power very
big websites easily.


Burr
[EMAIL PROTECTED]

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

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



Re: Shopping Cart Apps/Sessions Across Multiple Servers

2000-11-14 Thread Burr Sutter

I assume both servers are under your adminstrative and programmatic control
so here are some ideas:
- Use the database to store the information and pass the secured server a
cookie, hidden field or URL argument with a key to the database record.
This trick is very popular in that "state" can persist for a few days if
needed.  The major disadvantage is that you need a scheduled job that will
clean up old transactions that were never completed.  One advantage to this
trick is that you are protected from the server going down and all the
in-memory stuff being lost.
- Use something like RMI or JMS to "push" the data to the other servers.
This trick has been popular for app. server vendors who give you session
replication or session level fail over.

Burr
[EMAIL PROTECTED]

- Original Message -
From: Donnell Hughes <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 14, 2000 10:23 AM
Subject: Shopping Cart Apps/Sessions Across Multiple Servers


> Hi.
>
> I'm currently working on the checkout portion of a shopping cart
> application.  The shopping cart information is kept in a session.  When
the
> user wants to checkout, he will be redirected to a physically separate
> secure server to handle the input of account information.  I'm looking for
> suggestions on how to send the cart information to the secure server.  Is
> anyone utilizing such an architecture, or are you using one physical
machine
> with one instance of JRun and two webserver instances--one secure and one
> unsecure?
>
> Thanks.
>
>
===
> 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: Tools in JSP

2000-11-13 Thread Burr Sutter

Webgain Studio (www.webgain.com) has included and tweaked Macromedia's
Dreamweaver product so that it will render the JSP components inside the
WYSISWYG HTML editor.  Once you see the results of the dynamic components
you can then make design changes like placement and fonts. I've tested it
with all the basic JSP elements including custom tags and beans using a
Weblogic server (a single user version of the server comes with Studio) and
it worked well.
Studio also includes a copy of Cafe Enterprise Edition (the webgain folks
purchased Cafe from Symantec) which can be used as a Java source editor and
can stay sync'd up with Dreamweaver over the same JSP source code.  Another
neat trick.  My experience was only as an evaluator so I've not seen this
product under the heavy load created by tough project on a tight deadline.

Burr
[EMAIL PROTECTED]

- Original Message -
From: Walker, Chris <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 10, 2000 7:47 AM
Subject: Re: Tools in JSP


> No one of the things you list is essential on its own.  There are several
> Java IDEs that are good for developing beans and servlets.  The ability to
> debug server code is important here.
>
> But the big issue in server development is decoupling the design job from
> the programming job.  My view is that the real need is for a web
designer's
> tool that can make some effort at representing the output of JSP code and
> custom tags, so that the final appearance of the page can be designed.
>
> This is obviously a very difficult thing to do - in many cases it's
> impossible.  Maybe there should be some protocol whereby programs embedded
> in HTML can tell an editor what the output might look like.
>
> Chris Walker
> Brainbench MVP for ASP
> http://www.brainbench.com
>
>
>
> > -Original Message-
> > From: Raj [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 09, 2000 11:11 PM
> > To: [EMAIL PROTECTED]
> > Subject: Tools in JSP
> >
> >
> > Hi all,
> >
> > I have been seeing recently lot of mails on JSP tools. Can
> > you please let me
> > know what exactly
> > you are looking for from a JSP tool.
> >
> > 1. Debugger which helps you in identifying errors at the time of
> > translation.
> > 2. Version control & Team development
> > 3. Modeling (!?) or Design
> > 4. Costs
> > 5. Light Web Test Server Environment like VisualAge.
> > 6. Multiple colors to identify different tags at source-level.
> > 7. Compatibility with differnt web/ app servers.
> > 8. Formatting of source code
> > 9. Database access support
> >
> > Let me know how these JSP tools really justify these issues. Also
> > which feature of the JSP tool is more important.
> >
> > Thank you
> >
> > Rajan
> >
> > ==
> > =
> > 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: MessageDigest and the database

2000-10-27 Thread Burr Sutter

Oracle's NUMBER field maps to a java.math.BigDecimal.
A byte aray typically maps to a RAW field.
I suspect with Oracle 8 it makes to a BLOB.

Burr
[EMAIL PROTECTED]

- Original Message -
From: Hernandez, Rey <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 27, 2000 9:27 PM
Subject: MessageDigest and the database


> Hi all,
>
> How are people using the MessageDigest object to encrypt values before
> sending them to the database?
>
> Maybe I'm using it in the wrong way, but I am trying to do something
> like this:
>
> Get a value from the user, across SSL, like a password.
> Encrypt that password with MessageDigest(using MD5).
> Put the resulting byte array into the database.
>
> I can't seem to find a way to get a byte array into the database,
Oracle
> in this case.  I figured I could use a NUMBER datatype, but then how do
you
> convert a byte array to a java datatype that you can use with one of the
> setXXX functions provided with PreparedStatement that will go into a
NUMBER?
>
> Hope I didn't confuse everyone with this question, I'd be happy to
clarify.
>
> Thanks in advance,
> Rey
>
>
===
> 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: Modal Window

2000-10-27 Thread Burr Sutter

var retVal = showModalDialog('ModalDialog.html');

Where "ModalDialog.html" can be a JSP file or any URL.
This trick only works in IE 4 or better, I'm not sure if there is a Netscape
equivalent.

Burr
[EMAIL PROTECTED]

- Original Message -
From: vivek tiwari <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 27, 2000 9:54 AM
Subject: Modal Window


> Hi All ,
>
> In my JSP page , I do a
> var
> popupwin=window.open("1.htm","newwin","width=200,height=300");
>
> I would like to make this window modal i.e. unless
> someone clicks a button or closes this window it will
> stay on focus .
>
> Is this possible ? If yes , then how ?
>
>
> Thanks
> Vivek
>
> __
> Do You Yahoo!?
> Yahoo! Messenger - Talk while you surf!  It's FREE.
> http://im.yahoo.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