I'd probably do a User-Agent header check ...

Now, I've got a Filter already doing some things for the site - so I know how to configure web.xml and such, what do I need to do to use HttpServletResponseWrapper?

Brice

Kris Schneider wrote:

First, check out a tutorial on Servlet 2.3 filters. One at:

http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets8.html

Essentially, it'll boil down to creating two classes: a filter (implements
javax.servlet.Filter) and a response wrapper (extends
javax.servlet.http.HttpServletResponseWrapper). Then, you'll need to add
<filter> and <filter-mapping> elements to web.xml.

How would you determine if a request originated from your search engine?
User-Agent header? Specific request parameter?

Quoting Brice Ruth <[EMAIL PROTECTED]>:



Kris,

Thanks for the response. I saw that I could do the opposite :) - no help there. I'd be really interested in pursuing your second suggestion. Ideally, I'd see setting up a filter that processes every incoming request and determines if its originating from our search engine, if so, then no-op those methods, otherwise leave everything as is ...

How exactly would I go about doing what you suggest? I've only been doing Java/Servlet stuff for about a year or so, and that mostly via JSP/Struts/etc. - so I'm no expert when it comes to this.

Kris Schneider wrote:



NAFAIK, but that's by no means definitive. I *do* know that you can


configure a


TC context (or default context) to do the opposite. In other words, turn


off


cookies and only use rewriting.

Hm, what if you create a filter to wrap the response with an
HttpServletResponseWrapper that no-ops encodeUrl and encodeURL?

Quoting Brice Ruth <[EMAIL PROTECTED]>:





Is there any way to disable URL rewriting (with jsessionid) in Tomcat or via struts-config.xml or anything? I'm about at my wits end with this jsessionid thing - now our search engine which indexes by crawling the site (and doesn't support cookies) can't index properly because of the jsessionid property ... and frankly, I'm not really caring at this point if the 3-5% of visitors to our site can't use sessions (there's practically no functionality that depends on it anyway - mainly a performance improvement, where it is being used). I'd like to leave sessions via cookies enabled, but disable URL rewriting for sessions.

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.








--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.






-- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to