Can I just abort processing a JSP?

Yes. Because your JSP is just a servlet method, you can just put (whereever necessary) a < % return; % >

Showing Answers 1 - 2 of 2 Answers

goozy

  • Jan 15th, 2008
 

If you want a solution similar to the Coldfusion , then do the following:

Create a page called exit.jsp etc. with only this content:
<%@page language="java"%>

Then EXIT your page this way:

<% out.flush(); %>


This works great within dynamically included JSP-pages and outputs the content processed this far.

  Was this answer useful?  Yes

goozy

  • Jan 15th, 2008
 

I can see, the jsp:forward line did dissapear after your editing.....

It should read:

If you want a solution similar to the Coldfusion <CFEXIT>, then do the following:

Create a page called exit.jsp etc. with only this content:
<%@page language="java"%>

Then EXIT your page this way:

<% out.flush(); %>
<jsp:forward page="exit.jsp" />

This works great within dynamically included JSP-pages and outputs the content processed this far.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions