• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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());
}
%>
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic