Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why is the method not getting executed??

 
J radolf
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am not getting any error.

i put a out.println in the scripllet to check..
 
Sujai Kaarthik
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
remove the space between <, %, and @ and then try
 
J radolf
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




in this example what is the issue.
it says First cannot resolved to a type.
 
Sujai Kaarthik
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try declaring class First as public
 
J radolf
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya.. after making it public it worked.

 
J radolf
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cant get you
 
J radolf
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic