|
Hello everyone,
Here's my problem.... Can someone tell me why this
<servlet> tag works in IE and not Netscape. The 'ssiexample.shtml' example
that came with ServletExec works fine in both IE and Netscape. The 'login'
servlet is registered in ServletExec admin. Therefore I do not need the 'code'
or 'codebase' in the <servlet> tag.
When 'test.shtml' is opened in Netscape, it just
displays the HTML codes on the page. INCLUDING the response generated
by the 'login' servlet.
Here is the 'test.shtml' snippet:
<HTML><HEAD><title>TEST
PAGE</title></HEAD>
<p>my .shtml test</p> <BODY> <SERVLET NAME="login"> </SERVLET></BODY></HTML> Here is the 'login' snippet:
try {
String name = null; con = DriverManager.getConnection("jdbc:oracle:thin:@mail:1521:ora", "vahps", "manager"); stmt = con.createStatement(); rs = stmt.executeQuery ("select username from user_pass where userclass = 'test'"); out.println("<FORM>"); out.println("<SELECT NAME=selname>"); out.println("<OPTION SELECTED VALUE=0> --Choose a Name--"); int i = 1; while (rs.next()) { name = (rs.getString("username")); out.println("<OPTION VALUE=" + name + ">" + name); } out.println("</SELECT></FORM>"); } catch (SQLException e) { out.println("SQLException caught: " + e.getMessage()); } catch (Exception e) { out.println("<HTML><HEAD><TITLE>Connection Failure</TITLE></HEAD>"); out.println("<BODY>Cannot connect to db.Bad connection script<BR>"); out.println(e.getMessage() + "<BR>"); out.println("</BODY></HTML>"); } Here is what get displayed in
Netscape:
<HTML><HEAD><title>TEST
PAGE</title></HEAD>
<p>my .shtml test</p> <BODY> <FORM> <SELECT NAME=m1> <OPTION SELECTED VALUE=0> --Choose a Name-- <OPTION VALUE=ray>ray <OPTION VALUE=birnie>birnie </SELECT></FORM> </BODY></HTML> Antonio A. Villafana
Systems Analyst Parikh Advanced Systems (804) 559-1035 |
- Re: Simple .shtml test Antonio Villafana
- Re: Simple .shtml test George Ter-Saakov
- Re: Simple .shtml test Antonio Villafana
