Hi, I have 2 servlets. Servlet A in computer A and Servlet B in computer B runnng on tomcat 7. In servlet A i have a link <a href="http://computerB:8080/Servlet B">link</a> that calls Servlet B Giving to it some parameters.
Servlet B takes these parameters and creates an xml string.
My first question is how the servlet B will the xml string automaticly back to Servlet A? I tried the response.sendredirect("http://computerA:8080/ServletA") but it doesn't work.
Do you have any idea?
My secod question: is there any tool that calculate the time between request and response? I want to compare web services and servlets. Which is more fast?
My second question remains.
is there any tool that calculate the time between request and response? I want to compare my code with web services implementation and servlets implementation. Which is more fast, etc?
I'm sure you could write a simple servlet filter which did that calculation for all requests.
Joined: Oct 18, 2010
I read a little bit about the filters and i have some questions that i couldn't found any answer.
The FilterChain.doFilter(request,response) method is used to invoke the next filter in the chain. How it knows which is the next filter?
Where i am going to write the filter code? Inside the code of servlet A?
The Servlet A calls the filter-> the filter calls Servlet B -> Servlet B returns result to Filter and filter return the results to Servlet A?
If eclipse is not creating the web.xml for you then you have wrong kind of project. Is your project "Dynamic web project", "Jsp" or "Servlet" project? Or some other?
In any case if Eclipse is not creating the web.xml for you then what is? Are you creating it manually with a text editor? You should have a web.xml file in your application. I do not say it is required since for example tomcat provides a default web.xml
Joined: Oct 18, 2010
I will take a look the link you sent me.
all my projects in eclipse are web dynamic projects.
in one of my projects i have created 10 servlets that works perfectly but there is no web xml in my whole workspace that maps my servlets.