:) So I've bought my hosting finally, and I am trying to deploy my tomcat project on it. Server is mochahost.com, JSP and Tomcat support is enabled. My project runs fine on local machine, however when I deploy it on web-server it says:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Exception in JSP: /List/index.jsp:38
35: <br>
36: <%
37: String file = application.getRealPath("/") + "default_list.txt";
38: FileReader filereader = new FileReader(file);
39: BufferedReader br = new BufferedReader(filereader);
40: String eachLine = br.readLine();
41: while (eachLine != null) {
What can be wrong? My guess is that it cant access the file, but how do I fix it? Thanks!
Update: problem was caused by server pathing, solved by using Server.MapPath method.