MAPPING configuration error for request URI /

B

bunty.dev

i am getting MAPPING configuration error while running this code using
Tomcat 4.1 (Plesk 7.5.2 Cp) on my website whereas it is running at my
local webserver
Please HELP

ERROR LOG
StandardHost[site.winwinhosting.net]:MAPPING configuration error for
request URI /

NewsFile read: java.lang.NullPointerException:name can:+t be null
NewsFile read: java.lang.NullPointerException: name can:+t be null
NewsFile read:
java.lang.NullPointerException: name can:+t be null

Then i try to print the File Variable it is returning NULL

Please Help

Bunty
==========================

<%@ page import = "java.io.*, java.util.*,java.net.URL,java.awt.*" %>
<HTML>
<head></head>
<body>

<%
// Read in the text file newsfile.txt
ServletContext context = getServletContext();

String file = (context.getRealPath("news.txt"));
//String file = "news.txt";


StringBuffer stringbuffer = new StringBuffer("");

FontMetrics fm;
Font f1;
String str;
String s;
String tmp;
String param;
int i;
int disp;
int tot;
int pos;
int pos1;
int ImageDepth;
int TextDepth;
int fmW;
int dd;
int width;
int height;
int j;
char ch;


str = new String(" * Online : News * Ticker * ");
tmp = new String("");
param = new String("");

String s3,s2,s1, news = new String();

try {

DataInputStream in = new DataInputStream(new BufferedInputStream(new
FileInputStream(file)));
//DataInputStream in = new DataInputStream((new URL(
file)).openStream());

//stringbuffer.append(in.readLine());
//stringbuffer.append(" * ");
//s1 = stringbuffer.toString();

//out.println(s1);

while((in.readLine())!= null)
{
s2=in.readLine()+ "\r";
stringbuffer.append(s2);
stringbuffer.append(" * ");

//news += s2 + "\n";

//out.println(s2);

}
in.close();
}

catch(Exception e) {

System.out.println("NewsFile read: " + e);
}

%>

<%
news=stringbuffer.toString();
//out.println(news);
%>

<marquee><%=news%></marquee>

</body>
</html>
===========
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top