husted 2002/07/09 16:57:57
Modified: src/share/org/apache/struts/taglib/bean StrutsTag.java
ResourceTag.java
Log:
Javadoc updates. No code changes.
Revision Changes Path
1.9 +5 -5
jakarta-struts/src/share/org/apache/struts/taglib/bean/StrutsTag.java
Index: StrutsTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/StrutsTag.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- StrutsTag.java 13 Jan 2002 00:25:36 -0000 1.8
+++ StrutsTag.java 9 Jul 2002 23:57:57 -0000 1.9
@@ -178,7 +178,7 @@
throw e;
}
- // Retrieve our application configuration information
+ // Retrieve our application module configuration information
ApplicationConfig config = (ApplicationConfig)
pageContext.getRequest().getAttribute(Action.APPLICATION_KEY);
if (config == null) { // Backwards compatibility hack
1.10 +34 -34
jakarta-struts/src/share/org/apache/struts/taglib/bean/ResourceTag.java
Index: ResourceTag.java
===================================================================
RCS file:
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/bean/ResourceTag.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ResourceTag.java 13 Jan 2002 00:25:36 -0000 1.9
+++ ResourceTag.java 9 Jul 2002 23:57:57 -0000 1.10
@@ -134,7 +134,7 @@
/**
- * The application-relative URI of the resource whose contents are to
+ * The module-relative URI of the resource whose contents are to
* be exposed.
*/
protected String name = null;
@@ -160,40 +160,40 @@
// Acquire an input stream to the specified resource
InputStream stream =
- pageContext.getServletContext().getResourceAsStream(name);
- if (stream == null) {
- JspException e = new JspException
- (messages.getMessage("resource.get", name));
+ pageContext.getServletContext().getResourceAsStream(name);
+ if (stream == null) {
+ JspException e = new JspException
+ (messages.getMessage("resource.get", name));
RequestUtils.saveException(pageContext, e);
throw e;
}
- // If we are returning an InputStream, do so and return
- if (input != null) {
- pageContext.setAttribute(id, stream);
- return (SKIP_BODY);
- }
-
- // Accumulate the contents of this resource into a StringBuffer
- try {
- StringBuffer sb = new StringBuffer();
- InputStreamReader reader =
- new InputStreamReader(stream);
- char buffer[] = new char[BUFFER_SIZE];
- int n = 0;
- while (true) {
- n = reader.read(buffer);
- if (n < 1)
- break;
- sb.append(buffer, 0, n);
- }
- reader.close();
- pageContext.setAttribute(id, sb.toString());
- } catch (IOException e) {
+ // If we are returning an InputStream, do so and return
+ if (input != null) {
+ pageContext.setAttribute(id, stream);
+ return (SKIP_BODY);
+ }
+
+ // Accumulate the contents of this resource into a StringBuffer
+ try {
+ StringBuffer sb = new StringBuffer();
+ InputStreamReader reader =
+ new InputStreamReader(stream);
+ char buffer[] = new char[BUFFER_SIZE];
+ int n = 0;
+ while (true) {
+ n = reader.read(buffer);
+ if (n < 1)
+ break;
+ sb.append(buffer, 0, n);
+ }
+ reader.close();
+ pageContext.setAttribute(id, sb.toString());
+ } catch (IOException e) {
RequestUtils.saveException(pageContext, e);
- throw new JspException
- (messages.getMessage("resource.get", name));
- }
+ throw new JspException
+ (messages.getMessage("resource.get", name));
+ }
return (SKIP_BODY);
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>