Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » out.print in jsp editor
out.print in jsp editor [message #65730] Sat, 15 January 2005 06:58 Go to next message
Eclipse UserFriend
In jsp editor,codes like out.print("abc"); will be marked as
errors and tipped with "unhandled exception IOException",
I think this is very boring!!
Re: out.print in jsp editor [message #65771 is a reply to message #65730] Sat, 15 January 2005 11:54 Go to previous messageGo to next message
Eclipse UserFriend
cheng wrote:
> In jsp editor,codes like out.print("abc"); will be marked as errors and
> tipped with "unhandled exception IOException",
> I think this is very boring!!

Boring?

The out parameter of the service method is required to be an
instance of javax.servlet.jsp.JspWriter and its print(String) method
is defined to throw an IOException. In a pure .java file this would
cause a compiler warning or error. Is there a reason it shouldn't?

--
- Nitin
Re: out.print in jsp editor [message #65793 is a reply to message #65771] Sat, 15 January 2005 13:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: davegabol.eircom.net

You've got to admit, it's an amusing post to pass a few minutes on a
Saturday :-)

"Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
news:csbhs6$9bg$1@www.eclipse.org...
> cheng wrote:
> > In jsp editor,codes like out.print("abc"); will be marked as errors and
> > tipped with "unhandled exception IOException",
> > I think this is very boring!!
>
> Boring?
>
> The out parameter of the service method is required to be an
> instance of javax.servlet.jsp.JspWriter and its print(String) method
> is defined to throw an IOException. In a pure .java file this would
> cause a compiler warning or error. Is there a reason it shouldn't?
>
> --
> - Nitin
Re: out.print in jsp editor [message #65814 is a reply to message #65793] Sat, 15 January 2005 19:28 Go to previous messageGo to next message
Eclipse UserFriend
When a jsp file is turned into servlet class,all jsp scriptlets are
put in a try{...}catch(Throwable t){..} block,
So we need not put codes like "out.print(...)" in try catch block!

Will you write jsp like this?
<code>
<%
try{
out.println("abc");
}catch(IOException ioe){
....
}
%>
</code>


Dave Gabol wrote:

> You've got to admit, it's an amusing post to pass a few minutes on a
> Saturday :-)

> "Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
> news:csbhs6$9bg$1@www.eclipse.org...
>> cheng wrote:
>> > In jsp editor,codes like out.print("abc"); will be marked as errors and
>> > tipped with "unhandled exception IOException",
>> > I think this is very boring!!
>>
>> Boring?
>>
>> The out parameter of the service method is required to be an
>> instance of javax.servlet.jsp.JspWriter and its print(String) method
>> is defined to throw an IOException. In a pure .java file this would
>> cause a compiler warning or error. Is there a reason it shouldn't?
>>
>> --
>> - Nitin
Re: out.print in jsp editor [message #65856 is a reply to message #65814] Sun, 16 January 2005 09:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: davegabol.eircom.net

Heh, I was referring to your "boring" comment as amusing.

Dave.

"cheng" <chengchengji@163.com> wrote in message
news:csccf3$f8e$1@www.eclipse.org...
> When a jsp file is turned into servlet class,all jsp scriptlets are
> put in a try{...}catch(Throwable t){..} block,
> So we need not put codes like "out.print(...)" in try catch block!
>
> Will you write jsp like this?
> <code>
> <%
> try{
> out.println("abc");
> }catch(IOException ioe){
> ....
> }
> %>
> </code>
>
>
> Dave Gabol wrote:
>
> > You've got to admit, it's an amusing post to pass a few minutes on a
> > Saturday :-)
>
> > "Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
> > news:csbhs6$9bg$1@www.eclipse.org...
> >> cheng wrote:
> >> > In jsp editor,codes like out.print("abc"); will be marked as errors
and
> >> > tipped with "unhandled exception IOException",
> >> > I think this is very boring!!
> >>
> >> Boring?
> >>
> >> The out parameter of the service method is required to be an
> >> instance of javax.servlet.jsp.JspWriter and its print(String) method
> >> is defined to throw an IOException. In a pure .java file this would
> >> cause a compiler warning or error. Is there a reason it shouldn't?
> >>
> >> --
> >> - Nitin
>
>
Re: out.print in jsp editor [message #70095 is a reply to message #65730] Sun, 30 January 2005 06:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: picassi.aon.at

cheng wrote:

> In jsp editor,codes like out.print("abc"); will be marked as
> errors and tipped with "unhandled exception IOException",
> I think this is very boring!!

so what's the conclusion to the problem? Though I can ignore, them same
behaviour with my jsp's. Is it possible to turn the marker off?
Re: out.print in jsp editor [message #70233 is a reply to message #70095] Sun, 30 January 2005 16:48 Go to previous message
Eclipse UserFriend
Michael wrote:
>>cheng wrote:
>> In jsp editor,codes like out.print("abc"); will be marked as errors
>> and tipped with "unhandled exception IOException",
>> I think this is very boring!!
>
> so what's the conclusion to the problem? Though I can ignore, them same
> behaviour with my jsp's. Is it possible to turn the marker off?

The error only applies to the JSP editor's built-in error detection
and Content Assist. In no way does it affect how your runtime
translates the .jsp file into a servlet.

You can't turn the marker off (it's not technically a marker), but
reexamination of the 1.2 and 2.0 specifications as well as Tomcat
5.0.x's output is causing us to change the setup we use for JSP Java
Content Assist. The uncatched IOException error specifically is
tracked in https://bugs.eclipse.org/bugs/show_bug.cgi?id=82919,
which will be fixed in the next integration build.

--
- Nitin
Previous Topic:Building from CVS
Next Topic:licensed class
Goto Forum:
  


Current Time: Sun May 11 15:38:13 EDT 2025

Powered by FUDForum. Page generated in 0.04402 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top