You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Je...@aol.com on 2001/06/15 21:48:07 UTC

jsp

I am not that familiar with jsp, but with servlets whenever you create a new 
one you have to add it to the web.xml, stating the name, class and the url 
identification. If this is not done for the servlet it doesn't work. However 
for the jsp examples, all of the examples work without an explicit entry in 
the web.xml stating all the necessary info similarly to the servlet. Can 
anyone explain why this is. 

Re: jsp

Posted by Luba Powell <lu...@bellatlantic.net>.
Cool question.
JSP like a servlet has to have an entry.  Luckily we don't have to worry
about it since tomcat's JspC.java program not only dynamically
creates the context but also loads the generated servlet.

  if (servletout != null) {
                servletout.write("\n\t<servlet>\n\t\t<servlet-name>");
                servletout.write(thisServletName);
                servletout.write("</servlet-name>\n\t\t<servlet-class>");
                servletout.write(thisServletName);
                servletout.write("</servlet-class>\n\t</servlet>\n");
            }
            if (mappingout != null) {

mappingout.write("\n\t<servlet-mapping>\n\t\t<url-pattern>");
                mappingout.write(file);
                mappingout.write("</url-pattern>\n\t\t<servlet-name>");
                mappingout.write(thisServletName);
                mappingout.write("</servlet-name>\n\t</servlet-mapping>\n");
            }

----- Original Message -----
From: <Je...@aol.com>
To: <to...@jakarta.apache.org>
Sent: Friday, June 15, 2001 3:48 PM
Subject: jsp


> I am not that familiar with jsp, but with servlets whenever you create a
new
> one you have to add it to the web.xml, stating the name, class and the url
> identification. If this is not done for the servlet it doesn't work.
However
> for the jsp examples, all of the examples work without an explicit entry
in
> the web.xml stating all the necessary info similarly to the servlet. Can
> anyone explain why this is.
>


RE: jsp

Posted by cathy moffatt <mo...@mesc.state.mi.us>.
JSP container translates JSP to JAVA servlet code & calls Servlet container
to process it Look in jakarta-tomcat-3.2.2\work\localhost_8080%2Fexamples
You will find the servlet automatically created by the containers. Hope this
helps
Cathy Moffatt

-----Original Message-----
From: JeremyRayYoo@aol.com [mailto:JeremyRayYoo@aol.com]
Sent: Friday, June 15, 2001 3:48 PM
To: tomcat-user@jakarta.apache.org
Subject: jsp


I am not that familiar with jsp, but with servlets whenever you create a new
one you have to add it to the web.xml, stating the name, class and the url
identification. If this is not done for the servlet it doesn't work. However
for the jsp examples, all of the examples work without an explicit entry in
the web.xml stating all the necessary info similarly to the servlet. Can
anyone explain why this is.