----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Here is the solution (check the referer)
public void doPost( HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
PrintWriter out;
res.setContentType("text/html");
out = res.getWriter();
String urlReferer = req.getHeader("Referer");
String hasToComeFrom = "www.x.com";
if (urlReferer.indexOf (hasToComeFrom) == -1) {
// executes your code
}
else {
// prints access denied
}
}
This is not a jserv problem.
Cheers
G
> Hi all,
> I am using Jserv with Apache 1.3.9 and it all works pretty good.
The
> problem is that how to configure the JServ engine to execute the servlets
> only on the request of the local webserver. I mean right now any tom,dick
> or harry can type in
>
> http://www.x.com/servlets/Hello
>
> and execute the servlet , how do i change this so that only a page on the
> webserver can execute/post/get from the servlet and all else it ignored ?
>
> thanks to all
>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]