File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSP problem. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP problem." Watch "JSP problem." New topic
Author

JSP problem.

T sandya
Ranch Hand

Joined: Aug 03, 2006
Posts: 64
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

Joined: Feb 02, 2006
Posts: 91
you are right..

So it will not compile by aplication server...


Nilesh Patel
SCJP 1.5 - 87%
T sandya
Ranch Hand

Joined: Aug 03, 2006
Posts: 64
so how?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Use declaration instead


Even better : don't use java in JSP !


[My Blog]
All roads lead to JavaRanch
T sandya
Ranch Hand

Joined: Aug 03, 2006
Posts: 64
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

Joined: Jan 10, 2002
Posts: 60057
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP problem.
 
Similar Threads
Question on page 87 of HFS
destroy() related question..
Doubt Reagrding inti() method
HFSJ Chapter 7 Page 341
why do we need JSP when we have servlet