[
https://issues.jboss.org/browse/JBIDE-19395?page=com.atlassian.jira.plugi...
]
Daniel Azarov commented on JBIDE-19395:
---------------------------------------
[~ArunGupta], how about to use
{code}
response.getWriter().append("Served at: ").append(request.getContextPath());
{code}
instead of:
{code}
response.getOutputStream().print("Served at: " + request.getContextPath());
{code}
Roberto Sanchez Herrera asked in bugzilla:
3. Why did you decide to use response.getOutputStream(), which
according to the javadoc: "Returns a >ServletOutputStream suitable for writing
binary data in the response", instead of response.getWriter(), which seems more
>appropriate (from javadoc: Returns a PrintWriter object that can send character text
to the client.)
Default template code for Servlet
---------------------------------
Key: JBIDE-19395
URL:
https://issues.jboss.org/browse/JBIDE-19395
Project: Tools (JBoss Tools)
Issue Type: Enhancement
Components: upstream
Affects Versions: 4.3.0.Alpha1
Reporter: Arun Gupta
Assignee: Daniel Azarov
Fix For: 4.3.x
It would be nice to have a default template code generated for Servlet. This will make
the generated Servlet a little bit more useful, and much easier to showcase in demos.
For example, here is one template that could be generated in doGet():
response.getOutputStream().print("Served at: " + request.getContextPath());
And doGet() called from doPost().
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)