Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to do Dynamic robots.txt using JSP

843840May 14 2009 — edited May 14 2009
Hello here :)
This is my first time posting, I guess...

Anyhow, the scenario is:
My web is using Apache Tomcat, MySQL as the database.
The web's content is dynamic, let's say the product is addedd dynamicallly and ocassionally.
Each product has its own dynamic generated page generated by JSP (for example: products.jsp?id=12)

It will be pain that I need to re-hardcode my robots.txt everytime I register a new product in my site.
So, I need a dynamic robots.txt generated by JSP if possible.
Printing out the robotstxt content is no prob, but how to make that request to url robots.txt is handled by JSP?

What is a good approach to do this?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2009
Added on May 14 2009
3 comments
677 views