Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Jsp / class file path issue

  • 15-04-2008 10:40am
    #1
    Registered Users, Registered Users 2 Posts: 2,032 ✭✭✭


    My java is a little rusty but working :rolleyes:

    I'm trying to read a simple text file, and save it to a string for use it later within the app.

    So I can read the file using FileReader and BufferedReader and get it into the string and output it wherever I need and the path I'm using works fine.

    However I want to extract the piece of code to a class so I can reuse it.

    So I've copied the code to a class at the top of my jsp file (where all the classes are for now), and when I call it I get a java.io.filenotfoundexception even though it worked in my main jsp code.

    Any thoughts on how the filepath got screwed up? I've even tried hard coding the correct path as a test and it still threw an error - even with the full '/tomcat/bla/bla/bla'.

    If I add in a try and catch statement I don't get the error but I get the org.apache.jspfile@j1234 where j1234 is a memory buffer.

    Any ideas helpful.


Advertisement