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 How map the first servlet to second servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How map the first servlet to second servlet" Watch "How map the first servlet to second servlet" New topic
Author

How map the first servlet to second servlet

vijay kumar dahiya
Ranch Hand

Joined: Oct 19, 2008
Posts: 33
Hello,
How I want map the second servlet by first servlet.
I have a Jsp file. In Jsp have a function which define in second servlet.
and Jsp file map with first servlet.How that fuction which define in second servlet will be execute.
Please Help me..
-Vijay.


Vijay
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

Originally posted by vijay kumar dahiya:
How I want map the second servlet by first servlet.
It's not clear what you mean by "map" here.

I have a Jsp file. In Jsp have a function which define in second servlet.
and Jsp file map with first servlet.How that fuction which define in second servlet will be execute.
From this, I am guessing that you have a method in a servlet that you want to access from a JSP?

If so, I'd advise against this approach. Firstly, modern JSPs should not have any Java code within them. Secondly, servlets shouldn't have general methods that are callable from other code. A better practice would be to take any such code and refactor out into general utility classes that can be called from anywhere.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How map the first servlet to second servlet
 
Similar Threads
input file element
strange 404 problem
jsp/servlet/container relationships
how to define comparator myself?
Tracking the JSP translation time