R
Robert Kattke
Need a little help on the Architecture of this WebApp!
I am building a website, in which I wanted to track stats on the
Referer.
String refString = req.getHeader("Referer");
I also need a particular variable "Metro Code" or "mcod", set before
any of the data-driven pages start to do queries and display
information. "mcod" can be set, stored and retrieved via either a
Cookie or Session variable.
Since I was doing some processing, I chose a Servlet as Entry point
(actually wrapped in a jsp).
<jsp:include page="servlet/ReffServ" flush="true" />
However, if "mcod" is not set, I need to direct the user to a pageform
to let them choose one, otherwise proceed to the main page. Any
attempt to Forward or Include either in Serlvet or JSP is giving me
errors like:
StackTrace java.io.IOException: Error: Attempt to clear a buffer
that's already been flushed
StackTrace java.lang.IllegalStateException: Cannot forward after
response has been committed
Suggestions ? Is there an Elegant Solution ? or not so Elegant one ?
TIA
I am building a website, in which I wanted to track stats on the
Referer.
String refString = req.getHeader("Referer");
I also need a particular variable "Metro Code" or "mcod", set before
any of the data-driven pages start to do queries and display
information. "mcod" can be set, stored and retrieved via either a
Cookie or Session variable.
Since I was doing some processing, I chose a Servlet as Entry point
(actually wrapped in a jsp).
<jsp:include page="servlet/ReffServ" flush="true" />
However, if "mcod" is not set, I need to direct the user to a pageform
to let them choose one, otherwise proceed to the main page. Any
attempt to Forward or Include either in Serlvet or JSP is giving me
errors like:
StackTrace java.io.IOException: Error: Attempt to clear a buffer
that's already been flushed
StackTrace java.lang.IllegalStateException: Cannot forward after
response has been committed
Suggestions ? Is there an Elegant Solution ? or not so Elegant one ?
TIA