Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Debugging Java/JSP  RSS feed

 
Benita Perkins
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I wasn't sure where to put this post so if I have put it in the wrong section I'm really sorry.

What I'm trying to do is just eluding me completely.
I have a jsp file that calls a function in another jsp file. As far as I can establish, each component works OK on it's own but I need to check if the control of the program is being passed to the function.

This is the calling code:



This is the code for the function that I am calling:


I need to know if the function is being run and if the the parameter is being passed successfully to the function so that it can be passed to the external bash script.

Any help is greatly appreciated.

Thanks
Ben
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First: I don't see any call to "Delete_File" in your first code extract, so I'm not sure I understand what you're asking. But secondly: JSPs are compiled into Java classes whose names are generally unknown to you; there's no way to define a function in one JSP and reference it in another. Instead, define the function in a utility class, import that class, and call the function from both JSPs.
 
Benita Perkins
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Sorry, this is the correct code....



I have been changing the code so that I don't get errors.

I'll try the utility class solution.

[edit]Newlines to keep width of display on screen. CR[/edit]
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't write lines which are very wide, otherwise you can't see the whole text without scrolling left and right. Fred and I have edited your posts to add newlines.
This question is too difficult for the beginners' forum. Moving.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really, you shouldn't be using Java code in a JSP to begin with. Factor out the Java code to Java classes and things are a lot easier to arrange and to deal with.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!