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
  #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: 861
Thanks: 31
Thanked 112 Times in 108 Posts
Json 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 actionlistener java actionlistener jbutton addactionlistener addactionlistener java avatar hardware id convert double to integer java double format java double to int java double to integer in java double to integer java eclipse shortcut keys eclipse tutorial for beginners exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.outofmemoryerror: java heap space format double java get mouse position java hardware id avatar java 2 dimensional arraylist java 2d arraylist java actionlistener java addactionlistener java button actionlistener java convert double to int java double format java double to int java double to integer java for beginner eclippse java format double java forum java forums java get mouse position java jbutton java list to map java mouse position java programming forum java programming forums java sendkeys java.lang.reflect.invocationtargetexception java.util.arraylist jbutton actionlistener jbutton java jtextarea font size programming forums string to int java two dimensional arraylist java writing apps for ipod touch

All times are GMT. The time now is 05:30 PM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.