Get a
debugger, open the page in Mozilla, and step through it line by
line.
-----Original Message-----
From: Chua Eng Huang, Cecil [mailto:[EMAIL PROTECTED]] Sent: 27 July, 2002 7:58 AM To: Tomcat Users List Subject: RE: Website does not appear on Macintosh/IE *sigh* that would be extremely complex. As you might note from
looking at the URLs which don't change (except for the occassional HTML get
arguments), the code is actually being summoned from a database based on state
information in the hidden form fields. Thus, all of the web pages are
summoned from the same set of class files, the sum total of which are rather
large.
Here's the main class file. As you can see it doesn't follow the
traditional servlet->form->new servlet->new form. Also, I just
don't expect people to have to wade through a whole bunch of class libraries
that I created myself.
import java.io.*;
import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import ini; import rcrunner; import htmlform; import tagStream; public class isbib extends HttpServlet {
public void doPost(HttpServletRequest
request,
HttpServletResponse response) throws IOException, ServletException { searchme(request,response); } public void doGet(HttpServletRequest
request,
HttpServletResponse response) throws IOException, ServletException { searchme(request,response); } public void searchme(HttpServletRequest
request,
HttpServletResponse response) throws IOException, ServletException { PrintWriter out=null; try { readcore s=new readcore("isbib.ini","FILE"); s.addServletRequest(request); String command=s.getModule(); Class myclass; boolean userStop=false; rc_error vserror=new rc_error(s); rcrunner runModule; response.setContentType("text/html"); out=response.getWriter(); if (command==null || command.length()==0) s.changeModule("DEFAULT"); while (!userStop) { if (s.value("DEBUG").toUpperCase().compareTo("ON")==0) System.out.println("Changing module from command "+command+" "+s.value("command")); s.changeModule(); command=s.getModule(); if (s.value("DEBUG").toUpperCase().compareTo("ON")==0) System.out.println("Module changed gracefully to "+command+" "+s.value("command")); if (s.checkCommand()) { userStop=true; System.out.println("Something wrong with arguments to "+command); s.fixerrors(out); } else { if (command.toUpperCase().compareTo("END")==0) userStop=true; else { userStop=s.stopProc(); if (s.value("DEBUG").toUpperCase().compareTo("ON")==0) System.out.println("Current Command is "+command+" class "+s.value("command")); myclass=Class.forName(s.getCurClass()); runModule=(rcrunner) myclass.newInstance(); s=runModule.run(out,s); if (s.value("DEBUG").toUpperCase().compareTo("ON")==0) System.out.println("Exited gracefully from command "+command+" class "+s.value("command")); if (s.value("ERROR").length()>0) { userStop=true; myclass=Class.forName(s.value("ERRORAT")); runModule=(rcrunner) myclass.newInstance(); s=runModule.run(out,s); vserror=new rc_error(s); } } //end not END } //end not checkcommand } // End While not userstop s.close(); out.close(); } //End Try catch (IOException io) { out=response.getWriter(); htmlform.doerror(out,"IOError: "+io.getMessage()); } catch (ClassNotFoundException cnfe) { out=response.getWriter(); htmlform.doerror(out,"ClassNotFoundError: "+cnfe.getMessage()); } catch (SQLException sq) { out=response.getWriter(); htmlform.doerror(out,"SQLError: "+sq.getMessage()); } catch (InstantiationException insta) { out=response.getWriter(); htmlform.doerror(out,"InstantiationError: "+insta.getMessage()); } catch (IllegalAccessException illga) { out=response.getWriter(); htmlform.doerror(out,"IllegalAccessError: "+illga.getMessage()); } }
}
Thanks anyway
Cecil Chua
|
<<attachment: winmail.dat>>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>