This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

file not displaying on other LAN systems  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all..
here i am passing folder name as parameter and taking that path,am listing out all the files in that folder with theire name s in one frame(fileview..name of the frame) and if i click on that name it is dispalying in other frame (reportview..name of the frame).it is working fine in local host but not in lan systems..
what could be the problem?i used file: before path and also tried with http://localhost:8080/ranhill/webreports/rhreports....here is the code i've used...
plz advise me the best way to deal with it
thanks in advance..
..dev

<html>
<body bgcolor="#455667" text ="silver" alink=red vlink=silver >
<%@ page errorPage = "errorpage.jsp" %>
<%@ page language = "java" import ="java.util.*" %>
<%@ page import ="java.io.*" %>
<%@ page import ="java.util.Vector" %>
<%@ page import = "java.util.Iterator" %>
<%
String path="c:\\tomcat\\webapps\\ranhill\\RHReports\\"+request.getParameter("projects");
System.out.println("this is selected project report:"+path);

File dir = new File(path);
String[] files = dir.list();
for(int i =0 ; i<files.length; i++)
{
%>
<table cellpadding="1" cellspacing="1" bordercolor="pink">
<tr><td bgcolor="#455667" width="30"> <h4><b>
<a href=<%= path+"/"+files[i] %> target = "reportview"> <%= files[i] %> </a>
</h4></b></td></tr></table>
<%
}
%>
</body>
</html>
 
What are your superhero powers? Go ahead and try them on this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!