aspose file tools*
The moose likes JSP and the fly likes why is the method not getting executed?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "why is the method not getting executed??" Watch "why is the method not getting executed??" New topic
Author

why is the method not getting executed??

J radolf
Ranch Hand

Joined: Jan 08, 2009
Posts: 121


now i have a program logic which has executeMethods inside which i have a "insert into table values logic"

now why is that method not getting excuted??

i have kept the programs ".CLASS " files in the WEB-INF/classes/packageName/.class

why is the jsp not excuting that method??
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

january radolf wrote:
now why is that method not getting excuted??


check the syntax of your page directive should not gap between % and @ . also what error your getting? can you post the stack trace ?
J radolf
Ranch Hand

Joined: Jan 08, 2009
Posts: 121
am not getting any error.

i put a out.println in the scripllet to check..
Sujai Kaarthik
Ranch Hand

Joined: Dec 29, 2008
Posts: 162
remove the space between <, %, and @ and then try


The greater danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it
J radolf
Ranch Hand

Joined: Jan 08, 2009
Posts: 121




in this example what is the issue.
it says First cannot resolved to a type.
Sujai Kaarthik
Ranch Hand

Joined: Dec 29, 2008
Posts: 162
try declaring class First as public
J radolf
Ranch Hand

Joined: Jan 08, 2009
Posts: 121
ya.. after making it public it worked.

J radolf
Ranch Hand

Joined: Jan 08, 2009
Posts: 121
in the above class if we say fs.done().

so fs.done() method would have been executed i guess.. how to verify??
Sujai Kaarthik
Ranch Hand

Joined: Dec 29, 2008
Posts: 162
I cant get you
J radolf
Ranch Hand

Joined: Jan 08, 2009
Posts: 121
suppose my code is



and the jsp is same
how can display "HI" message in the browser when i excute the jsp??
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

january radolf wrote:
how can display "HI" message in the browser when i excute the jsp??


discourage scriptlet. set like below in your servlet



and then display like below in your jsp

J radolf
Ranch Hand

Joined: Jan 08, 2009
Posts: 121
i dont have any servlets in my logic.

just a jsp and a java file

cant the same thing be done without servlet logic??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61772
    
  67

Yes, but scriptlets (Java code in JSPs) are a thing of the past that are strongly discouraged. You are setting out to learn some bad habits.

You might want to read this article regarding modern web app structuring.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why is the method not getting executed??