Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP problem.

 
T sandya
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In jsp , in scriptlets if we write any java code that will goes to service method of the servlet.
but if i write one method in scriptlet which will be placed in to service method of the servlet.
that means service is one method , inside of that method one more method right?

how it is possible, method inside method(this concept is not there in java).
 
Nilesh Patel
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right..

So it will not compile by aplication server...
 
T sandya
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so how?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use declaration instead


Even better : don't use java in JSP !
 
T sandya
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
writing in scriptlet is also not wrong right?
why it is not limitation?
if we didn't write java code in jsp , what is the use of jsp then?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64700
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are new means to effect what used to be done with scriptlets and scriptlet expressions: namely the JSTL (along with other custom actions) and the EL, in addition to proper structuring of the application such that complicated processing takes place elsewhere in the application than the JSP pages.

Scriptlets are a thing of the past.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic