wood burning stoves 2.0*
The moose likes Servlets and the fly likes attribute in Page directives(jsp):confused: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "attribute in Page directives(jsp):confused:" Watch "attribute in Page directives(jsp):confused:" New topic
Author

attribute in Page directives(jsp):confused:

mahadevan raja
Ranch Hand

Joined: Apr 11, 2001
Posts: 96
When i try to use page directive in my jsp program i get an error called "Attribute page has no value",i have referred the concerned books,used the proper attributes that suit the page directive,still not able to rectify the error.


SPECIALIST-WCSV5.1 Implementation.<br />SYSTEMS EXPERT-WAS4.0 Administration
prabhatis
Greenhorn

Joined: Apr 07, 2001
Posts: 18
can u post the exact code and error what u get??
Prabhat kumar
prabhatis
Greenhorn

Joined: Apr 07, 2001
Posts: 18
can u post the exact code and error what u get??
Prabhat kumar
mahadevan raja
Ranch Hand

Joined: Apr 11, 2001
Posts: 96
Originally posted by prabhatis:
can u post the exact code and error what u get??
Prabhat kumar

the code is as follows
:
<html>
<head>
<title>
Demo of a jsp page
</title>
</head>
<%@ page language="java"%>
<body bgcolor=gray>
<%! char c;%>
<%for(int i=0;i<26;i++)
{
for(int j=0;j<26;j++)
{
c=(char)(0x41 + (26-i+j)%26);
%>
<%=c%>
<%}%>
<br>
<%}%>
</body>
</html>

the error is attribute page has no value
Thanx for the reply
prabhat kumar
Ranch Hand

Joined: Apr 11, 2001
Posts: 114
there is no error in ur code ...if u use tomcat3.2
but there is a possible error ..
u just have to mofe the @page directive to the very first line of ur jsp page
like this
<%@ page language="java"%>
<html>
<head>
<title>
Demo of a jsp page
</title>
</head>
<body bgcolor=gray>
<%! char c;%>
<% for(int i=0;i<26;i++)
{
for(int j=0;j<26;j++)
{
c=(char)(0x41 + (26-i+j)%26);
%>
<%=c%>
<%}%>
<br>
<%}%>
</body>
</html>

Prabhat kumar
[This message has been edited by prabhat kumat (edited April 11, 2001).]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: attribute in Page directives(jsp):confused: