I have written a java application that writes to a file. I want to call it using a button in my jsp web page.

This worked but it didn't write to the file. I think I have the jar file in the wrong place??

Please Please Help, this is really urgent and i'm a complete novice.

Thanks

If you are using the File IO, I should warn you that it does not work the same way in web applications as it does for a standalone application.


>> This worked but it didn't write to the file

I would rather say that your file has been written but not in the location you expected it to be. :|


>> I think I have the jar file in the wrong place??

Any reason to think so?


>> Please Please Help, this is really urgent

It's certainly not urgent to me. If it were really urgent to you, you would have taken some efforts in posting more relevant information, like the code which writes the IO, some details about how you deployed the application, which server you are using, if the logs have anything recorded (you should be logging something in the first place) ...

If I understand well you try write into text file which is part of JAR?

This is not possible you can only read from it check my question

aniseed

>>i'm a complete novice.
I'm sorry, did you miss this part, I asked for help not smart comments. The amount of information I post does not reflect the urgency of the issue; and further more if you re-read the post, I never said the issue was urgent to you.
In light of these facts I think I am well within my bounds to request that you refrain from your smarmy comments!

Peter,

Thank you for your help, fortunatly my txt files were external, I solved my problem by placing my jar file in the lib folder or in my case, 5 lib folders, in Tomcat.
Your response was very informative and I appreciate the help

Regards

The amount of information I post does not reflect the urgency of the issue; and further more if you re-read the post, I never said the issue was urgent to you.

You are free to hold your opinions on the issue while I stick to mine. I'm certainly not taking that when I read Please Please Help, this is really urgent in your post, it's not intimidating to anyone. You are trying to force your urgency into the post which would not help anymore than in the other way. When you post something that "urgent", you should be sure that you post some more information than I want to call it using a button in my jsp . There are a thousand things that could happen between that and all replies were nothing more than wild guesses. It's not the way a programmer would describe his problem, even a novice.

If you solved your "urgent" problem yourself, that's the best way for you to learn.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.