I don't see how you can use servlet chaining here.
The URL's I want to count the clicks for are on another server. They're not
mine.
To which call would I chain this servlet you gave????

Geert 'Darling' Van Damme

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jonathan Hager
> Sent: woensdag 3 mei 2000 2:08
> To: [EMAIL PROTECTED]
> Subject: Re: urgent: how to sense url click
>
>
> Servlet Chaining may be more appropriate...I guess it's just a
> design issue.
> I might argue that servlet chaining allows for regular uri's to be used,
> which are more search-server friendly.
>
> public doGet (HttpServletRequest req, HttpServletResponse res) throws
> ServletException, IOException {
>   String contentType = req.contentType();
>   if (contentType == null) return;
>   res.setContentType(contentType);
>
>   String URI = getURI();
>
>   //update database for the give URI
>
>   //output content identical to the input
>   PrintWriter out = res.getWriter();
>   BufferedReader in = req.Reader();
>   String line = null;
>   while ((line = in.readLine()) != null)
>         out.println(line);
> }
>
> Don't forget to turn servlet chaining on for text/html files (or whatever
> type of files you are counting).  You'll have to refer to your servers
> document on how to do this.
>
> Sincerely
> Jonathan Hager
>
> -----Original Message-----
> From: Geert Van Damme [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, May 02, 2000 1:50 AM
> To: [EMAIL PROTECTED]
> Subject: Re: urgent: how to sense url click
>
>
> I just tried to send you this, but the mail server doesn't seem
> to find your
> address immediately, so I copy it to the list.
> Others might be interested as well.
>
> I use a servlet that does something like this
>
> public void doGet (HttpServletRequest req, HttpServletResponse res) throws
> ServletException, IOException {
>
>         String url = req.getQueryString();
>         //String url = req.getParameter(url);
>
>         if (url != null){
>                 url = url.substring(url.indexOf("url=")+4);
>                 //log(url);
>                 try{
>                         Integer id = new Integer(req.getParameter("id"));
>                         if (url !=
> l){
>                                 res.sendRedirect(url);
>                                 synchronized (this){
>                                         // update your db here
>                                 }
>                         }
>                 }
>         }
>
> instead of a normal hyperlink I use a link to
> /servlet/counter?url=http://www.reallink.com
>
> Geert 'Darling' Van Damme
>
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Nagaprakash C S
> > Sent: dinsdag 2 mei 2000 10:19
> > To: [EMAIL PROTECTED]
> > Subject: Re: urgent: how to sense url click
> >
> >
> > can u pls brief me, i'm not clear how to write
> >
> >
> > thanks in advance
> > prakash
> >
> > K Ramesh wrote:
> >
> > > write a onclick() handler for the hyperlink.
> > >
> > > Nagaprakash C S <[EMAIL PROTECTED]> on 05/02/2000 12:09:12
> > >
> > > Please respond to A mailing list about Java Server Pages
> > specification and
> > >       reference <[EMAIL PROTECTED]>
> > >
> > > To:   [EMAIL PROTECTED]
> > > cc:    (bcc: K Ramesh/Chennai/HCLDELUXE)
> > >
> > > Subject:  urgent: how to sense url click
> > >
> > > hi all,
> > >
> > > i 'v an urgent requirement of sensing the clicking of hyperlink and
> > > upadating the database, any suggestions and solutions are greatly
> > > welcome
> > >
> > > thanks in advance
> > > prakash
> > >
> > >
> > ==================================================================
> > =========
> > > 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
>
>

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

Reply via email to