1.      In a jsp you can use response.sendRedirect("<URL>") to send the browser
an instruction to open another page.  Forward does like you say - totally a
server thing.

2.      I believe it is request.getContextPath

3.      Go to the Java site (www.javasoft.com) and go to their tutorial or search
on google for Java Tutorial and you will find a wealth of tutorial info.

-----Original Message-----
From: Winnie Cheung [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 18, 2000 12:18 AM
To: [EMAIL PROTECTED]
Subject: [Basic] JSP help!


1. How do you "redirect" a page? I have code that

if string == a then
     forward to page 1
else
    forward to page 2

Unlike ASP, the forward tag just sort of INCLUDES the file! The file name in
the browser is the same..not that of the file that I am forwarding to! What
is the command to really REDIRECT the page by changing the URL of the
current browser window?

2. How can I get the current path of the script? I mean something like
     REQUEST.SERVERVARIABLES("SCRIPT_NAME")
or  REQUEST.SERVERVARIABLES("PATH_INFO")

3. I need to know some string manipulation functions like substr etc...most
JSP books assume you know Java, where can I find a good beginner's reference
to all these functions?

I would really appreciate if someone can help! Thanks!

Winniw


Reply via email to