Go Back   Java Programming Forums > Java EE (Enterprise Edition) > Java Servlet


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 14-06-2009, 10:57 AM
Junior Member
 

Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
carelesslips is on a distinguished road
Exclamation Java Web Server

Hello Friends.
I am working on Java Web Server. Static contents are being returned by server. But I have to process Servlets. How can I do it?
I can get Servlet position from Web.xml and all other info of Servlets. But how can I process it?
Web server first call intit() method of servlet, then service(), then destroy(). I am unable to understand, how it can b done?
Please guide me.



Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 04-07-2009, 07:22 AM
Junior Member
 

Join Date: Jul 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Jimbooo is on a distinguished road
Default Re: Java Web Server

It's not completely cleare for me what you are tryin to say. Do you want to map URL's to certain controllers? Or do you want to implement your own servlet?

In the first case: Use the web.xml to define the servlet and map it to an URL pattern like *.htm. When this matches, the application server will use the [yourservletname]-servlet.xml to match a certain URL pattern to a controller.

In the second case: use the first case to understand the construct. Then use google to find out how a servlet works. I'm not quite sure because I always use the default one that comes with Spring.
Reply With Quote
  #3 (permalink)  
Old 07-07-2009, 07:34 PM
Json's Avatar
Super Moderator
 

Join Date: Jul 2009
Location: Manchester, United Kingdom
Posts: 1,157
Thanks: 54
Thanked 136 Times in 132 Posts
Json will become famous soon enoughJson will become famous soon enoughJson will become famous soon enough

I'm feeling Happy
Default Re: Java Web Server

I think he is actually writing a web server/servlet container.

You could try using reflection to create the servlet etc. Just look in the web.xml for the servlet definition and grab the class.

Use reflection to create an instance of that object -> Trail: The Reflection API (The Java™ Tutorials)


// Json
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Chat Server Help. illucidryan Java Networking 10 08-05-2009 03:49 PM
Java Server Chat, Help Needed PLEASE!! - NullPointerException Valtros Exceptions 1 08-05-2009 10:06 AM


100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming practice problems java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

All times are GMT. The time now is 01:59 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.