Click to See Complete Forum and Search --> : Jsp


taps_annu
January 15th, 2003, 11:46 PM
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 !!

dlorde
January 16th, 2003, 04:22 AM
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...

Goodz13
January 16th, 2003, 09:42 AM
If you mean, how can you tell the current host, it's

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

String contextPath = request.getContextPath();


That will give you ie localhost:8080 or www.google.com