-
Jsp
hi!
i am a software professional and working in JSP , i've one problem that is how can i Know that the JSP page is coming from the server or anybodies harddisk , i mean to say that nobody download it and didn't modify it...please give me the code so i Could work ahead !!
-
I don't quite understand - how can someone download a JSP page from your server?
Can you explain what you mean more clearly?
I don't want to achieve immortality through my work, I want to achieve it by not dying...
-
If you mean, how can you tell the current host, it's
Code:
request.getRemoteHost();
if you want to be able to tell what the previous page was, I beleve you would have to set a cookie. But I could be rong (Often am;) )
To get the Context Path it's
Code:
String contextPath = request.getContextPath();
That will give you ie localhost:8080 or www.google.com