tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Delisle <pierre.deli...@sun.com>
Subject Re: AW: [PATCH REPOST] Tomcat 4.0 JSP Examples view Source
Date Sat, 02 Dec 2000 00:38:59 GMT


Hans Schmid wrote:
> 
> Pierre,
> 
> at least we both see that the numberguess example is different from the
> others.
> This actually was my starting point.

Agree. I'll commit a patch for it soon.

> 
> I may be completely wrong, but I would expect to see the source listing of
> the JSP examples
> when I hit the View Source link. The only example it works that way is the
> numberguess example.
> 
> All other examples execute the JSP if I hit Source. I can also let the
> example execute
> when I hit 'Execute'.

The 'Execute' link points to the jsp file itself (so the page is executed
when the link is selected), while the 'source' link points to an html file, 
which itself displays a link that points to a .txt file containing the source code.
(so the source code is displayed when the link is selected).

For example, 'Date' has the following links:

    Execute -> http://localhost:8080/examples/jsp/dates/date.jsp
    Source  -> http://localhost:8080/examples/jsp/dates/date.html

    In date.html, we have the following:

    Source Code for Date Example -> http://localhost:8080/examples/jsp/dates/date.txt

Is that what you have?

    -- Pierre

> 
> So did I misunderstand the intent of this View Source thingy ?
> 
> Please enlighten me.
> 
> Best Regards,
> Hans
> 
> > -----Urspr√ľngliche Nachricht-----
> > Von: Pierre Delisle [mailto:pierre.delisle@sun.com]
> > Gesendet am: Donnerstag, 30. November 2000 19:34
> > An: tomcat-dev@jakarta.apache.org
> > Betreff: Re: [PATCH REPOST] Tomcat 4.0 JSP Examples view Source
> >
> > Hans,
> >
> > I just tried the examples on tomcat 4.0, and the only
> > problem I could see is with the source code of
> > the "number guess" example.
> >
> > The link in num/numguess.html should be changed from
> >    "/examples/jsp/source.jsp?/jsp/num/numguess.jsp"
> >      to
> >    "numguess.txt"
> >
> > Otherwise, everything seems ok when I try the examples
> > (both execute and source).
> >
> >     -- Pierre
> >
> >
> > Hans Schmid wrote:
> > >
> > > Hi there,
> > >
> > > I sent a patch to display the source code in the JSP examples
> > and did not
> > > get any feedback either. Probably because US folk was in turkey
> > mode :) and
> > > busy working on Tomcat 3.2 thereafter. Good work!!
> > >
> > > What it does:
> > > JSP Examples in Tomcat 4.0 have a 'View Source' button. All but the
> > > numberguess example do execute the JSP instead of displaying
> > the source. My
> > > patches do use source.jsp to display the sources instead of
> > referencing the
> > > *.txt files.
> > >
> > > The attatched zip file contains my current webapp\examples\jsp directory
> > > tree without the noe unnecessary *.txt files.
> > >
> > > Most of the example code should be reusable in Tomcat 3.X
> > >
> > > Please let me know, if this is usefull or not
> > >
> > > I resend the patch as attatchment.
> > >
> > > Best regards,
> > > Hans
> > >
> > > I had no luck putting this Bug into Bugrat:
> > > Error: 500
> > > Location: /BugRatReport/PostReport
> > > Internal Servlet Error:
> > >
> > > java.lang.NoClassDefFoundError: javax/activation/DataSource
> > >         at
> > org.gjt.bugrat.servlet.BugRatReport.processReportPOST(Compiled Code)
> > >         at org.gjt.bugrat.servlet.BugRatReport.doPost(Compiled Code)
> > >         at javax.servlet.http.HttpServlet.service(Compiled Code)
> > >         at javax.servlet.http.HttpServlet.service(Compiled Code)
> > >         at
> > org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
> > >         at org.apache.tomcat.core.Handler.service(Compiled Code)
> > >         at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
> > >         at
> > org.apache.tomcat.core.ContextManager.internalService(Compiled Code)
> > >         at org.apache.tomcat.core.ContextManager.service(Compiled Code)
> > >         at
> > >
> > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.process
> > Connection
> > > (Compiled Code)
> > >         at
> > org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code)
> > >         at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
> > >         at java.lang.Thread.run(Compiled Code)
> > >
> > > Here the entry:
> > >
> > > JSP Examples in Tomcat 4.0 have a 'Source' button. All but the
> > numberguess
> > > example do execute the JSP instead of displaying the source. My
> > patch uses
> > > source.jsp to display the sources instead of referencing the
> > *.txt files.
> > >
> > > I will repost a patch in the tomcat-dev list, which corrects
> > this behavior
> > > for Tomcat 4.0
> > >
> > > But the Tomcat 3.2 examples look pretty much the same.
> > >
> > > I am using Tomcat 4.0 and 3.2 in standalone mode
> > >
> > > http://localhost:8080 then press JSP Examples.
> > > Click 'Sorce' on the Numberguess line, then 'Source Code for...'
> > >
> > > you get the source code displayed.
> > >
> > > For all other examples, the JSP page gets executed.
> > >
> > >
> > ------------------------------------------------------------------
> > ----------------------------------
> > >                     Name: patchfile.txt
> > >    patchfile.txt    Type: Plain Text (text/plain)
> > >                 Encoding: quoted-printable
> > >
> > >               Name: jsp.zip
> > >    jsp.zip    Type: Zip Compressed Data (application/x-zip-compressed)
> > >           Encoding: base64
> >

Mime
View raw message