Don Hill
Posts: 70
Nickname: ssswdon
Registered: Jul, 2002
|
|
Re: Jsp import my own class HELP
|
Posted: Aug 1, 2002 12:56 PM
|
|
I am not sure what you are trying to do, but if you want to call some code inside your jsp you should look at <jsp:usebean />
check out http://java.sun.com/products/jsp/html/jsptut.html for more info. HTH > I've tried to import my own java file in this jsp > file, so I can use the variables in the imported > file. But it doesn't work. Please pay attention in > theses lines. > > 1) <%@ page import="Assign5th.java" %> is this > right? and the varibles in the imported file are p1, > p2, p3, p4. > > 2) I've also tried to link the jsp file to another > one so I <FORM > ACTION="http://localhost/w10/Assign5th.jsp"> so when > users press a buttom, (which will be created) the > users are taken to another jsp file. I hope I am > doing it right, Please help. > > For the convenience I've included the first jsp > below > > > > > > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 > Transitional//EN"> > <HTML> > <HEAD> > <TITLE>Assign5th2</TITLE> > </HEAD> > <BODY BGCOLOR="#FDF5E6"> > <H1 ALIGN="CENTER">Cis3270--Student Records--</H1> > <%@ page language="java" %> > <%@ page import="Assign5th.java" %> > > <FORM ACTION="http://localhost/w10/Assign5th.jsp"> > > > Student ID : <% =p1 %> <BR> > Last Name : <% =p2 %> <BR> > First Name : <% =p3 %> <BR> > Final Grade: <% =p4 %> <BR>
|
|