Hi   
  We had been provided with JSPC for pre-compilation of JSP in tomcat..
But problem is I am unable to generate web.xml file with new JSP file
mapping 
like if I give this command jspc -webxml pweb.xml -uriroot c:\myapp
*.jsp
the above should actualy convert all JSP files in directory myapp to
*.java files by giving appropriate mapping in pweb.xml file 
But genrate pweb.xml file is not generated with new JSP mappings
Even though if I specify mapping explicitly ,when client hits JSP page
it is again converting jsp to java file in work directory.
It would be greatful if u can let me know the steps to do this .
Regs
--Pula

-----Original Message-----
From: Ryan Lubke [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 06, 2001 12:29 PM
To: [EMAIL PROTECTED]
Subject: Re: How to configure a custom page for JSP 404 errors?


Hi Pierce,

 From what I've been able to gather, you should be able to set
the error page using the <error-page> directive within the
deployment descriptor for a web app (web.xml).

<error-page>
    <error-code>404</error-code>
    <location>/error.jsp</location>
</error-page>

Looking through the bug database, there was an open issue
regarding the use of static html pages within the <location>
tag.  I'm uncertain at this time what release it's actually fixed
in, but if you try it and get a stacktrace, then I guess you know :)

The bug report can be found here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=291

I did find this information in the archives.  
Try looking at the results of the following search:
http://mikal.org/interests/java/tomcat/archive/search?search=error+page+
custom+404

I'm sure those who are more experiences could expand/correct on this 
information.
Hope this helps.

-rl

Courtney, Pierce wrote:

>Hello,
>
>This question probably has come up before, I just can't find it in the
>archives....
>
>I am using Tomcat 3.2.2 standalone (not with Apache).
>
>How can I configure a particular page (servlet, static html, or jsp) to
be
>the "default"
>page that comes up if the requested jsp is not found, instead of the
404
>error.
>In other words, if a user requests:
>http://myTomcatSite.com/somePage.jsp
>
>I want to have somePage.jsp come up if it exists.
>But if somePage.jsp does not exist, I *don't* want the default 404
error to
>be displayed. Instead I want some custom page (a servlet actually) to
be
>processed. I don't really care if this is achieved with a client-side
>redirect or a server-side include/forward.
>
>I have tried using the DefaultServlet, which doesn't seem to work. I
have
>also set up my own servlet against <url-pattern> /* </url-pattern>.
This
>works for servlets only, not JSPs. It seems the basic problem is that
any
>URI that matches *.jsp. gets processed by the JspServlet.  So it is not
>determined if the .jsp file actually exists or not until the JspServlet
is
>triggered.
>
>Can this custom error page functionality be configured somehow in
Tomcat?
>
>Thanks for any help,
>Pierce Courtney
>[EMAIL PROTECTED]
>
>


Reply via email to