Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How will i pass the SubjectofIssuePath in File fin=new File();  RSS feed

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir,
I am reading this file from properties file and now SubjectofIssuePath
display the correct path.
SubjectofIssuePath = bundle.getString("SubjectofIssue");
out.println("SubjectofIssuePath"+SubjectofIssuePath);//http://127.0.0.1:81/help/Subject of Issue.txt

Sir my doubt is when i pass SubjectofIssuePath here is it is not displaying any value.But if i hardcoded the value here it is working properly.Kindly please rectify my code how i will pass "SubjectofIssuePath"
in File fin=new File();


File fin=new File("SubjectofIssuePath")

File fin=new File("http://127.0.0.1:81/help/Subject of Issue.txt");

Thanks a lot in Advance.

Regards
Sumanta Panda
x.jsp
<%
String SubjectofIssuePath = null;
ResourceBundle bundle = null;

if(Config.serverType != null && "NT".equals(Config.serverType))
{
bundle = PropertyResourceBundle.getBundle("ItsPropertiesNT");

}

if(bundle != null)
{
SubjectofIssuePath = bundle.getString("SubjectofIssue");
out.println("SubjectofIssuePath"+SubjectofIssuePath)//http://127.0.0.1:81/help/Subject of Issue.txt
}
%>
<%
try{
String theBR;
File fin=new File("SubjectofIssuePath");
FileReader fr=new FileReader(fin);
BufferedReader br=new BufferedReader(fr);
theBR=br.readLine();
String[] theSplit=theBR.split(",");
for(int i=0;i<theSplit.length;i++)
out.print("<option value=\"" + theSplit[i] +
"\">" + theSplit[i] + "</option>");
// out.print("</select>");

}catch(Exception Ex){
System.out.println("exception in getting connection"+Ex.getMessage());
}
%>
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like something which would sit better on another forum . . . moving.
 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
Please guide me how i will pass "SubjectofIssuePath" in File fin=new File();

I am getting stuck to resolve this issue.I am finding null value when i
pass the "SubjectofIssuePath" in File fin=new File();

Please advise me for the needful.

Thanks a lot in advance.

I wish you Happy new Year@2009 in Advance to all of my JavaRanch Team..


Regards
Sumanta Panda
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!