----------------------------------------------------------------
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!!!
----------------------------------------------------------------
Thanks. Now the session object is not null. But still calling 'encodeURL'
of HttpServletResponse object causes internal server error. What I could
gather from the log file is that calling 'encodeURL' causes exception
'java.lang.NoSuchMethod'. What could be wrong here? Any Idea? Also does
Tomcat Supports URLRewriting?
These are my configurations
Win'98,Apache 1.3.9, JDK 1.2, Jserv 1.1
Here is my code
Thanks
Sudheer
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class cc extends HttpServlet
{
public void service(HttpServletRequest oRequest,HttpServletResponse
oResponse) throws IOException
{
PrintWriter oWriter=oResponse.getWriter();
HttpSession oSession=oRequest.getSession(true);
String sTemp =null;
oWriter.print("<html>");
if(oSession!=null)
{
oWriter.print("Session!=null<br>");
oWriter.print("<a href='" +
oResponse.encodeURL("/servlets/cc?arg=1")+"'>Refresh</a><br>");
sTemp=(String)oSession.getValue("abc");
oSession.putValue("abc","1");
}
else
oWriter.print("Session=null");
oWriter.print("<br>"+ sTemp +"<br></html>");
oWriter.close();
}
}
--
--------------------------------------------------------------
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]