tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danno Ferrin <shem...@earthlink.net>
Subject Re: Pre-Compilation!!!!URGENT
Date Wed, 19 Jul 2000 16:04:03 GMT
try disabling the JSP compiler servlet first.

"Ramesh Kumar.T" wrote:
> 
> hi,
> what happens when i load the jsp page is that the java file is generated in the
> scratch directory ,
> and tries to compile instead of  calling the servlet(which was generated from
> the jsp pages using jspc  , i have also compiled the servlets in the
> WEB-INF/classes directory)  and searches for  javac to compile
> since i am bundling with jre i cannot use it.
> 
> What i think the problem is that instead of mapping the jsp filenames to the
> servlet name it goes to  compile the jsp pages .
> 
> bye
> Ramesh
> Attachment: web.xml
> 
> Danno Ferrin wrote:
> 
> > Could you please send the results of the -webinc option?  I do not have
> > enough information to ascertain if this is an error in the JspC or not.
> > Also what do you mean by "file did not work," it is vague and there are
> > many possible situations, a) the JSP page is being compiled and the
> > servlet is not being called, b) an error page is produced (send the
> > page)  c) the servlet fails (send log info).
> >
> > Remember one of the fundamental theorems of using Tech Support: The more
> > precise the information is the more likely you are to get a useful
> > answer or get the problem escalated.
> >
> > --Danno
> >
> > "Ramesh Kumar.T" wrote:
> > >
> > > Hi ,
> > > Thanks i was able to generate the web.xml file but it didn't work
> > > this is how i accessed
> > >
> > > this is the mapping for jsp pages
> > > hostname:portno/jsp/filename.jsp
> > >
> > > this is the mapping for servlets
> > > hostname:portno/servlet/com.classname
> > >
> > > it works when i give the url as
> > > hostname:portno/servlet/jsp.filename
> > > the page gets loaded
> > >
> > > bye
> > > Ramesh
> > >
> > > Danno Ferrin wrote:
> > >
> > > > First off, more than two explanation points are excessive.
> > > >
> > > > Yes, JspC only creates the Java files right now.  And the java files are
> > > > the servlet equivalent of the Jsp Page.  The name of the page doesn't
> > > > matter, but they are servlets and not Jsp Pages.  Once you compile the
> > > > classes you need to install them as servlets.  However, there are two
> > > > options that may help, "-webinc <file>" and "-webxml <file>"
 Both of
> > > > these make the needed elements to map the JSP names into servlets and
a
> > > > URL servlet mapping of the old JSP page name, so the url says
> > > > /foo/bar.jsp but the foo.bar servlet is called.  -webinc makes a set of
> > > > elements suitable for inclusion into a web.xml file, while -webxml makes
> > > > the entire web.xml file including needed header and DTD information.
> > > >
> > > > "Ramesh Kumar.T" wrote:
> > > > >
> > > > > Hi,
> > > > > we want to precompile the jsp files
> > > > > but jspc just generates the java files
> > > > >
> > > > > I am not sure whether compiling the java code generated and bundling
> > > > > with tomcat will work???
> > > > > because dynamically generated class files have some odd names like
> > > > > "_0002fjsp_0002ffilename........class"
> > > > >
> > > > > i just verified the old archives of the mailing list but it was a
bit
> > > > > vague
> > > > > Can somebody explain it ????
> > > > >
> > > > > Reply asap
> > > > >
> > > > > bye
> > > > > Ramesh
> 
>   ------------------------------------------------------------------------
> <?xml version="1.0" encoding="ISO-8859-1"?>i
> 
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>     "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
> <!-- automatically created by tomcat jspc -->
> <web-app>
> 
>         <servlet>
>                 <servlet-name>jsp.Bottom</servlet-name>
>                 <servlet-class>jsp.Bottom</servlet-class>
>         </servlet>
>         <servlet-mapping>
>                 <url-pattern>/jsp/Bottom.jsp</url-pattern>
>                 <servlet-name>jsp.Bottom</servlet-name>
>         </servlet-mapping>
> 
>         <servlet>
>                 <servlet-name>jsp.Create</servlet-name>
>                 <servlet-class>jsp.Create</servlet-class>
>         </servlet>
>         <servlet-mapping>
>                 <url-pattern>/jsp/Create.jsp</url-pattern>
>                 <servlet-name>jsp.Create</servlet-name>
>         </servlet-mapping>
> 
>         <servlet>
>                 <servlet-name>jsp.Initialize</servlet-name>
>                 <servlet-class>jsp.Initialize</servlet-class>
>         </servlet>
>         <servlet-mapping>
>                 <url-pattern>/jsp/Initialize.jsp</url-pattern>
>                 <servlet-name>jsp.Initialize</servlet-name>
>         </servlet-mapping>
> 
>         <servlet>
>                 <servlet-name>jsp.Title</servlet-name>
>                 <servlet-class>jsp.Title</servlet-class>
>         </servlet>
>         <servlet-mapping>
>                 <url-pattern>/jsp/Title.jsp</url-pattern>
>                 <servlet-name>jsp.Title</servlet-name>
>         </servlet-mapping>
> 
> </web-app>

Mime
View raw message