Help with custom error-page in Spring

B

ballpointpenthief

Hello,
I've not been able to set-up a custom error page, and I haven't found
the reason for the problem.

The application is using Spring, and I am declaring an <error-page> in
the web.xml file for a 404 page.
The directive is in the correct place and the custom page exists, yet
a blank page is returned rather than my custom page.

Google turns up nothing; can anyone shed any light as to why I am
seeing a blank page rather than my custom 404 page?

Thanks,
Matt.
 
M

Manish Pandit

Hello,
I've not been able to set-up a custom error page, and I haven't found
the reason for the problem.

The application is using Spring, and I am declaring an <error-page> in
the web.xml file for a 404 page.
The directive is in the correct place and the custom page exists, yet
a blank page is returned rather than my custom page.

Google turns up nothing; can anyone shed any light as to why I am
seeing a blank page rather than my custom 404 page?

Thanks,
Matt.

Can you paste the declaration ? To give you an idea, here is the one
that works for me.

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

Make sure the path has a leading /.

-cheers,
Manish
 
B

ballpointpenthief

On Nov 25, 7:07 am, ballpointpenthief <[email protected]>
wrote:
Can you paste the declaration ? To give you an idea, here is the one
that works for me.

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

I tried exactly that example, and put a /notfound.jsp in the web
folder.
The declaration is placed at the end of <web-app>, and after the
<welcome-file-list>. I'm still getting a blank page, with no source.
Could something be clobbering it?

Thanks,
Matt
 
B

ballpointpenthief

I tried exactly that example, and put a /notfound.jsp in the web
folder.
The declaration is placed at the end of <web-app>, and after the
<welcome-file-list>. I'm still getting a blank page, with no source.
Could something be clobbering it?

Thanks,
Matt

Sorted now. There was a gap in my knowledge of the servlet-mappings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top