Results 1 to 4 of 4
Thread: Specific Functions for URL's
- 03-31-2010, 12:10 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 2
- Rep Power
- 0
Specific Functions for URL's
Hi,
I would like to create servlets that are stored in a class w/ similar functions (say, meetings) and different functions are called based on the URL.
For example:
<server>/meeting/getMeetings calls getMeetings()
<server>/meeting/joinMeeting?id=1 calls joinMeeting(1)
Rather than having a different class for each URL and only being able to make changes based on GET/POST/etc.
How would I do this?
Thanks,
Chris
- 03-31-2010, 09:07 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Sounds like you're drifting towards a god class...:)
Why are you opposed to different actions involving different servlets?
- 04-03-2010, 03:00 AM #3
Member
- Join Date
- Mar 2010
- Posts
- 2
- Rep Power
- 0
I feel like it would be easier to create multiple files to perform basic actions...say one class which simply handles information about meetings, one class which handles friends list, things like that.
Is this the way to handle it, or is best practice to put everything under a doGet/doPost, then parse it out from there?
Thanks for the help,
Chris
- 04-06-2010, 12:34 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Similar Threads
-
How to write URL's to a file
By DuceDuceExplorer in forum New To JavaReplies: 3Last Post: 03-10-2010, 02:02 PM -
2 functions
By baze7 in forum New To JavaReplies: 3Last Post: 08-14-2009, 04:41 AM -
Functions in jsp
By samson in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 03-25-2009, 10:04 PM -
how do i print a specific txt file on a specific printer
By nikhilbhat in forum New To JavaReplies: 2Last Post: 11-08-2008, 10:40 AM -
Looking to create an alarm clock with specific functions
By fishscale in forum New To JavaReplies: 2Last Post: 10-29-2008, 10:22 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks