Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

MAPPING configuration error for request URI /

Thread view: 
bunty.dev@gmail.com - 11 Dec 2005 12:33 GMT
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>
===========
小鱼儿 - 11 Dec 2005 13:48 GMT
new URL( args );
args MUST like protocol://... or there is error


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.