c:import Not Throwing Error For Bad In-Context-JSP url Attribute

2004-01-22 Thread James Watkin
There seems to be an inconsistent behavior in the way c:import throws 
errors for non-existent files. When the c:import url attribute is an 
in-context-jsp (like pageHeader.jsp) that doesn't exist, no error is 
thrown. However, when the url attribute is a file: that doesn't exist, an 
error is thrown. Can anyone confirm, or explain this behavior?

I'm using the following pattern:

c:catch var=importError
c:import url=${param.pageURL}/
/c:catch
c:if test=${not empty importError}
c:out value=${importError.message}/
/c:if
Thank you.

- Jim

__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: c:import Not Throwing Error For Bad In-Context-JSP url Attribute

2004-01-22 Thread Kris Schneider
I think this is addressed in the 7.4 c:import section of the JSTL 1.0 
Spec. There's an explanation of how errors are handled for internal vs. 
external resources. Give it a look and see if it helps.

James Watkin wrote:

There seems to be an inconsistent behavior in the way c:import throws 
errors for non-existent files. When the c:import url attribute is an 
in-context-jsp (like pageHeader.jsp) that doesn't exist, no error is 
thrown. However, when the url attribute is a file: that doesn't exist, 
an error is thrown. Can anyone confirm, or explain this behavior?

I'm using the following pattern:

c:catch var=importError
c:import url=${param.pageURL}/
/c:catch
c:if test=${not empty importError}
c:out value=${importError.message}/
/c:if
Thank you.

- Jim

__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__
--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: c:import Not Throwing Error For Bad In-Context-JSP url Attribute

2004-01-22 Thread James Watkin
I'm not an expert in this area, but after looking at the spec:
http://jcp.org/aboutJava/communityprocess/final/jsr052/index.html
it seems like a JspException should be thrown, even for internal URLs. It's 
quite possible that I'm overlooking something though.

- Jim

At 05:50 PM 1/22/2004 -0500, you wrote:
I think this is addressed in the 7.4 c:import section of the JSTL 1.0 
Spec. There's an explanation of how errors are handled for internal vs. 
external resources. Give it a look and see if it helps.

James Watkin wrote:

There seems to be an inconsistent behavior in the way c:import throws 
errors for non-existent files. When the c:import url attribute is an 
in-context-jsp (like pageHeader.jsp) that doesn't exist, no error is 
thrown. However, when the url attribute is a file: that doesn't exist, 
an error is thrown. Can anyone confirm, or explain this behavior?
I'm using the following pattern:
c:catch var=importError
c:import url=${param.pageURL}/
/c:catch
c:if test=${not empty importError}
c:out value=${importError.message}/
/c:if
Thank you.
- Jim
__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__
--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: c:import Not Throwing Error For Bad In-Context-JSP url Attribute

2004-01-22 Thread Kris Schneider
For an internal URL, try the equivalent JSP:

%
String path = request.getParameter(pageURL);
RequestDispatcher rd = request.getRequestDispatcher(path);
rd.include(request, response);
%
It seems to behave the same way. With TC 4.1.29, I don't see any log 
info about the include, but on WLS 8.1.2 I get the following:

...Included resource or file /foo.jsp not found from requested 
resource /import.jsp.

No exceptions are thrown, however, just an error logged.

James Watkin wrote:

I'm not an expert in this area, but after looking at the spec:
http://jcp.org/aboutJava/communityprocess/final/jsr052/index.html
it seems like a JspException should be thrown, even for internal URLs. 
It's quite possible that I'm overlooking something though.

- Jim

At 05:50 PM 1/22/2004 -0500, you wrote:

I think this is addressed in the 7.4 c:import section of the JSTL 
1.0 Spec. There's an explanation of how errors are handled for 
internal vs. external resources. Give it a look and see if it helps.

James Watkin wrote:

There seems to be an inconsistent behavior in the way c:import 
throws errors for non-existent files. When the c:import url 
attribute is an in-context-jsp (like pageHeader.jsp) that doesn't 
exist, no error is thrown. However, when the url attribute is a 
file: that doesn't exist, an error is thrown. Can anyone confirm, 
or explain this behavior?
I'm using the following pattern:
c:catch var=importError
c:import url=${param.pageURL}/
/c:catch
c:if test=${not empty importError}
c:out value=${importError.message}/
/c:if
Thank you.
- Jim
__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__


--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
James Watkin
ACIS Software Development
The Anderson School at UCLA
[EMAIL PROTECTED]
Voice: 1-310-825-5030
  Fax: 1-310-825-4835
__
--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]