Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MAPPING MAPPING configuration error

843838Dec 10 2005 — edited Dec 11 2005
I am getting MAPPING configuration error while running this code using Tomcat 4.1 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

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>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2006
Added on Dec 10 2005
2 comments
194 views