Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Questions about HttpServletResponse-API  RSS feed

 
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello community,

I have a question about the HttpServletResponse-API.

I'm trying to find out where is noticed the instance-variable of HttpServletResponse.

For Example: final PrintWriter out = response.getWriter();ยด
According to the code above. the instance-variable of HttpServletResponse is "respond".
But where can I find the instance-variable?

At the oracle's api-page, there is nothing noticed, except the return value and methods of HttpServletResponse-class/interface.


I hope you can help me. Thanks a lot.

greetz
 
Ralf Coby
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for Dubbleposting:

Here ist the oracle's api-website: https://docs.oracle.com/javaee/6/api/javax/servlet/ServletResponse.html
 
Saloon Keeper
Posts: 5035
134
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That code might be part of an HttpServlet's doGet method - in which case the request and response are passed into the method as parameters: javax.servlet.http.HttpServlet
 
Ralf Coby
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi and thank's for your help!

At oracle's api-website, there isn't noticed the instance-variable

My english isnt the best, so I try to explain in code:
For example: --> so, the variable "d" is the instance-variable of the Dog's object.
Example 2:  --> the instance-variable of HttpServletResponse is "response", because if you write an abstract-method, you can wirte this:

final PrintWriter out = HttpServletRequest.getWriter();  



I dont know where I can find the instance-variables of the API.
And according to the website, which you have sent, there isn't noticed the instance-variable, too.


Greetz
 
Ralf Coby
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edit:
 
Ralf Coby
Ranch Hand
Posts: 106
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I AM SO SORRY!!!

I understand!!!

Example:

There is the instance-variable: void doPost(HttpServletRequest request, HttpServletResponse response) !!!

Thank you a lot for help!

Greeeeeeeeetz
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!