--- /dev/null
+//
+// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Web;
+using System.Web.J2EE;
+using vmw.common;
+//using System.Web.Compilation;
+
+
+namespace System.Web.UI
+{
+ public class PageHandlerFactory : IHttpHandlerFactory
+ {
+ public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path)
+ {
+ if (!path.StartsWith(IAppDomainConfig.WAR_ROOT_SYMBOL))
+ path = context.Request.MapPath(path);
+ Type tmpType = PageMapper.GetObjectType(path);
+ Object obj = Activator.CreateInstance(tmpType);
+ return (IHttpHandler) obj;
+ }
+
+ public virtual void ReleaseHandler (IHttpHandler handler)
+ {
+ }
+ }
+}
+
string assemblyName = "dll.ghres";
java.io.InputStream inputStream = contextClassLoader.getResourceAsStream(assemblyName);
- if (inputStream == null)
- throw new System.IO.IOException("couldn't open resource file:" + assemblyName);
-
System.IO.Stream strim = null;
if (inputStream == null) {
string descPath = String.Join("/", new string[]{"assemblies", this.GetType().Assembly.GetName().Name, assemblyName});
if (strim == null)
throw new System.IO.IOException("couldn't open resource file:" + assemblyName);
}
-
-
+
try
{
if (strim == null)
strim = (System.IO.Stream)vmw.common.IOUtils.getStream(inputStream);
- strim = (System.IO.Stream)vmw.common.IOUtils.getStream(inputStream);
int capacity = (int)strim.Length;
byte[] resourceBytes = new byte[capacity];
strim.Read(resourceBytes,0,capacity);