Accessing Files in Jar File as part of Web App

I have put a number of NON-CLASS files in a jar file that resides in WEB-INF/lib in my webapp (running tomcat). These include xml files, xml schemas, images, etc. I would like to give my webapp programmatic access to these non-class files, such as providing the user with a list of all of the xml files in the jar file. I have seen a number of posts on this topic, but no answers.
I have tried everything that I can think of, to no avail. ServletContext.getResource() with just about any path fails. If I do: ServletContext.getResourcePaths(), I get a list of all of the jar files in WEB-INF/lib (as well as other resources). The jar files are listed as: "jndi:/localhost/WEB-INF/lib/XXXXX.jar". If I use that value in ServletContext.getResource(), it does not work. It appears that I need to set up a JNDI context if I want to get the jar file, using: File f = (File)context.lookup(...). this may or may not work, but I can't figure out how to set up the JNDI context for purposes of tomcat. Right now, this is the only thing that I can think of.
It would also be great if there was some way to take a path in the jar file, treat it as a directory, and list all of the files in that "directory".

Thanks. That got me started. You need to put the full path to the file you want. here is the full code, either for getting an individual file or for getting the entire jar file, so that you can enumerate through it and read any file you want (this is for a non-binary file):
URL url = this.getClass().getResource("/path/path/path/file.xml"); // need full path
if(url != null)
     JarURLConnection conn = (JarURLConnection)url.openConnection();
     JarFile jarfile = conn.getJarFile();
     JarEntry jarEntry = conn.getJarEntry();
     BufferedReader br = new BufferedReader(new InputStreamReader(jarfile.getInputStream(jarEntry)));
     StringBuffer sb = new StringBuffer();
     String line = null;
     while((line = br.readLine()) != null)
               sb.append(line);
               sb.append(System.getProperty("line.separator"));
     br.close();
String fileContents = sb.toString();

Similar Messages

  • Access file object from flex web app

    Hi all,
    I want to access file object from flex web app. What should i do?
    I have to take array from my XML. In XML there will be only dir path. So for taking file name from dir i have to access it and have to perform for loop on that dir.
    What should I do?
    Any Ideas?
    Thanks,
    -CK

    Hi Michael
    My question is that I dont want to give name of images in XML file.
    In XML file there will be only path of image directory. So I need to find all image name from that image directory.
    Thats why I want to access file object.
    Any ideas?    

  • Can you have a DIAdem file embedded in a web app and then when you click the link to the DIAdem file it invokes DIAdem?

    Can you have a DIAdem file embedded in a web app and then when you click the link to the DIAdem file it invokes DIAdem?

    Hello JCN,
    I will keep in touch with the current Applications Engineer who will be assisting you with this issue and update the forum with the status of the problem. I personally think that your best option would be to create a link that opens DIAdem and then runs a script to load the data from a predetermined file (Rather than a link to the file itself).
    Ian M.
    National Instruments

  • With 8.0 version of Firefox, clicking links to .tif files on a java web app are being downloaded as .ppt, .part.ppt., or .ppt.part. The change of name to PPT causes them to associate with powerpoint. IE opens the files normally as .tif as expected.

    When using java based webapp to view a remote directory, clicking .tif files offers the standard "Open" dialog. If you select open, an error is produced saying file is not a valid powerpoint file. Selecting download will download the file as a .ptt, .part.ppt, or .ppt.part file in the temp directory with a seemingly random unique filename as if the system was creating a temp file. Going to the same web app under Internet Explorer works properly and will view or download the file as a .tif image file. This had been working fine previously to the 8.0 update.

    When using java based webapp to view a remote directory, clicking .tif files offers the standard "Open" dialog. If you select open, an error is produced saying file is not a valid powerpoint file. Selecting download will download the file as a .ptt, .part.ppt, or .ppt.part file in the temp directory with a seemingly random unique filename as if the system was creating a temp file. Going to the same web app under Internet Explorer works properly and will view or download the file as a .tif image file. This had been working fine previously to the 8.0 update.

  • File Preview in a web app

    Hey all,
    Until recently, I was using an inline frame to offer the user "preview" capability of files before they posted them to the server in a web app. Recently, with the additional security added to browsers dis-allowing cross domain scripting I can no longer point a frame to "file://c:/my documents/somefile.txt" for preview. So, I am presented with two options:
    1. create a signed applet to allow loading of files from the users local drive - this seems rather time comsuming with all the different files type that need to be handled.
    2. Round trip the document in stream only to upload it to the server and send it right back to the browser with the appropriate mime type and let the broswer handle loading the file.
    I am leaning towards option two, what do you all think?

    I am going with posting the file to the server and wasting the network roundtrip to save myself problems with applets. The app really will only support Firefox and IE, and I was able to create the signed applet that has read rights to the local filesys for both browsers, but the idea of handling different file types and loading plug-ins, etc would be a major hassle. Thanks.

  • Help with best solution for file read/write in web app (not local files)

    Problem in a nutshell...
    I have an AIR app to process images..  organize and add information. This information is read and written to local XML files. This is working fine (if still a be messy... still learning this OOP stuff ;O)
    So... now I am developing my Web gallery app to consume these files for a web gallery (unique concept huh? ;O)
    Reading them in was easy with the Declaration block....
    <fx:Declarations>
    <fx:XML id="galleryXML" source="gaXML.xml"/>
    <fx:XML id="baXML" source="baXML.xml"/>
    <fx:XML id="prjXML" source="prjXML.xml"/>
    <s:XMLListCollection id="galleryList" source="{galleryXML.item}"/>
    <s:XMLListCollection id="baList" source="{baXML.item}"/>
    </fx:Declarations>
    But I want the owner to have a maintenance mode where information can be added/changed and saved back to the XML file on the server. I have read about all the different services available, but I am not that familiar with them. Also I will have no way of knowing what services the user will have available on their host. So... help me out in understanding what the most universal solution would be to be able to read and write XML files stored on the host along with the application.
    I hope that is clear enough, but ask away if any more details will help in the discussion.
    Thanks
    Bob Galka

    Hi Jeba,
    Whenever u are using *"Thread.currentThread().getContextClassLoader()"* Code inside your application means the Files (Resources) which you are looking right now must be poresent in the CLASSPATH...(Bootstrap classloader/ System ClassLoader/ Application ClassLoader/ Sub Module ClassLoader...).
    So when we place a resource (example XML or Properties file) inside the "WEB-INF/classes" directory then it means that file (resource) is available as part of the Module Classloader....So the above code getContextClassloader() will be able to find that resource easily.
    Thanks
    jay SenSharma
    http://middlewaremagic.com/weblogic (Middleware Magic Is Here)

  • File Load Frequency with Web Apps

              I have noticed the following behavior with WebLogic 6SP2 on windows:
              Reload files (such as jsp or html) if the file has been modified would not work
              for web applications except the default application.
              I tried both without specifying any in the web.xml and specifying explicitly (weblogic.jsp.pageCheckSeconds).
              Both have no effect on the web applications.
              Is this a known bug or something i am missing. Any suggestions are appreciated.
              Sam
              

    this is a known issue in 6.0
              Already fixed in 6.1 (in beta now)
              Sam He wrote:
              > I have noticed the following behavior with WebLogic 6SP2 on windows:
              >
              > Reload files (such as jsp or html) if the file has been modified would not work
              > for web applications except the default application.
              >
              > I tried both without specifying any in the web.xml and specifying explicitly (weblogic.jsp.pageCheckSeconds).
              > Both have no effect on the web applications.
              >
              > Is this a known bug or something i am missing. Any suggestions are appreciated.
              >
              > Sam
              

  • Error. your computer must be running a supported version of Microsoft Visio and a browser that supports opening files directly from Visio Web Access.

    I have the following inside my SharePoint server 2013 :-
    EnterPrise Wiki site collection.
    i have both "Excel services Application "& "Visio Graphics Service" running correctly.
    The problem i am facing is as follow:-
    when a user click on an Excel sheet or Visio document , it will be shown inside the browser without any problem.
    but if the user click on "Open in Visio" OR "Open in Excel" links inside the browser, they will get the following errors:-
    Sorry, but to open this workbook, your computer must be running a supported version of Microsoft Excel and a browser that supports opening files directly from Office Web Apps.
    To open this document, your computer must be running a supported version of Microsoft Visio and a browser that supports opening files directly from Visio Web Access.
    I have the following settings inside my PC:-
    Office 2010 for Excel, word, power point,etc.
    Visio 2013.
    i have disabled SharePoint foundation support for office 2013
    Can anyone advice on this please?

    Hi,
    Please try to reset the Internet Explorer settings or open Internet Explorer in In-Private browsing and then check if this issue occurs.
    If the issue persists, please try to access SharePoint in another computer with Office 2013 and then check if this issue occurs. Or repair Office and restart your server.
    Here is a blog about the same issue for you to take a look at:
    http://sharepointexit.blogspot.com/2013/12/sorry-but-to-open-this-workbook.html
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Offie Web Apps 2013 randomly fail to render a file with an authentication issue on Firefox

    Hello,
    I’m facing an issue when refreshing a SharePoint page with an embedded Office file (rendered through Office web apps).
    When I refresh the page, the Office Web Apps frame doesn’t render the file (randomly) and returns an error (in the frame. Everything around the frame in SharePoint is OK):
    “Sorry you don’t have access to this content”
    Just after receiving the error, if I refresh the page again, everything works for a couple of tries and then the error show up again...
    Here is my configuration:
    SharePoint 2013 Server SP1 (15.0.4569.1000) farm English version
    Office Web Apps farm English version
    SSL Offloading through load balancer for both farm
    Issue:
    1<sup>st</sup> load of the page with IE, Chrome and Firefox > OK
    Page refresh with IE/Chrome > OK
    Page refresh with Firefox > random KOs
    Tests:
    Test with FireFox version 24/27/32 > same results
    Test from Windows/OSx > same results
    Test with 1 WFE and 1 WAC server > same results
    Test with network.negotiate-auth.allow-insecure-ntlm-v1;True
    on FF > same results
    In the ULS logs, I found this entry which seems strange even though I’m authenticated on SharePoint (see the complet log below):
    Non-OAuth request. IsAuthenticated=False, UserIdentityName=, ClaimsCount=0
    Followed by
    System.UnauthorizedAccessException:   Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)),   StackTrace:   
    at   Microsoft.SharePoint.SPWeb.InitWeb()      
    at Microsoft.SharePoint.SPWeb.get_WebTemplateConfiguration()    
    at   Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl,   Page page, String name, Boolean localizable, Boolean defer, Boolean   loadAfterUI, String language, Boolean injectNoDefer, Boolean   controlRegistration,
    Boolean loadInlineLast, Boolean ignoreFileNotFound)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page,   String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String   language, String uiVersion, String ctag)    
    Microsoft recommendations about FireFox:
    Lastest versions of IE, Chrome and Firefox should work
    http://technet.microsoft.com/en-us/library/cc263526(v=office.15).aspx
    Other details:
    I’m not testing with the farm account.
    Some of my company’s users need to use Firefox as their everyday browser.
    Again, everything works with IE and Chrome.

    Search "17efba9c-d283-80e1-2ddf-9311dd77dd1c" (41 hits   in 1 file)
    Line 44019: 09/22/2014 11:50:04.86 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    Logging Correlation Data      
    xmnv
    Medium  
    Name=Request   (GET:https://intranet.mycompany.com:443/poles/crc/wiki/_layouts/15/WopiFrame.aspx?sourcedoc=/poles/crc/wiki/Documents/confidentiality%20-%20data%20protection_SDE_2014.05.06_v1.0.pptx&action=embedview&wdAr=1.3333333333333332)
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44020: 09/22/2014 11:50:04.86 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    Authentication Authorization  
    agb9s
    Medium  
    Non-OAuth request. IsAuthenticated=False, UserIdentityName=,   ClaimsCount=0
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44021: 09/22/2014 11:50:04.86 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    Logging Correlation Data      
    xmnv
    Medium  
    Site=/poles/crc
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44022: 09/22/2014 11:50:04.86 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    Authentication Authorization  
    aib35
    Medium  
    SPShareByLinkHandler.Initialize : Not a ShareByLink request - missing   access token
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44028: 09/22/2014 11:50:04.87 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    Authentication Authorization  
    aib35
    Medium  
    SPShareByLinkHandler.Initialize : Not a ShareByLink request - missing   access token
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44030: 09/22/2014 11:50:04.87 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    aat87
    Monitorable
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44032: 09/22/2014 11:50:04.87 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    8e2s
    Medium  
    Unknown SPRequest error occurred. More information: 0x80070005
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44033: 09/22/2014 11:50:04.87 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    aix9j
    High    
    SPRequest.GetPageListId: UserPrincipalName=, AppPrincipalName=   ,bstrUrl=https://intranet.mycompany.com/poles/crc/wiki/_layouts/15/WopiFrame.aspx?sourcedoc=/poles/crc/wiki/Documents/confidentiality   - data protection_SDE_2014.05.06_v1.0.pptx&action=embedview&wdAr=1.3333333333333332
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44034: 09/22/2014 11:50:04.87 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    System.UnauthorizedAccessException: Access is denied. (Exception from   HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:   
    at   Microsoft.SharePoint.SPContext.get_ListId()    
    at Microsoft.SharePoint.SPContext.get_List()    
    at   Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl,   Page page, String name, Boolean localizable, Boolean defer, Boolean   loadAfterUI, String language, Boolean injectNoDefer, Boolean
      controlRegistration, Boolean loadInlineLast, Boolean ignoreFileNotFound)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page,   String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String   language, String uiVersion, String ctag)    
      at Micros...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44035: 09/22/2014 11:50:04.87*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...oft.SharePoint.WebControls.ScriptLink.Register(String uiVersion,   Control ctrl, Page page, String name, Boolean localizable, Boolean   defer)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page,   String name, Boolean localizable, Boolean defer)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.GetOnDemandScriptKey(String   strKey, String strFile, Boolean registerDependencies, Control ctrl, Page page)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl,   Page page, String strKey, String strFile, Boolean localizable)    
    at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Page   page, String strFile, Boolean localizable)      
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl,   Page page, String name, ...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44036: 09/22/2014 11:50:04.87*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...Boolean localizable, Boolean defer, Boolean loadAfterUI, String   language, Boolean injectNoDefer, Boolean controlRegistration, Boolean   loadInlineLast, Boolean ignoreFileNotFound)    
    at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control   ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean   loadAfterUI, String language, String uiVersion, String ctag)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl,   Page page, String strKey, String strFile, Boolean localizable)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.OnLoad(EventArgs e)    
    at System.Web.UI.Control.LoadRecursive()    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Co...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44037: 09/22/2014 11:50:04.87*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...ntrol.LoadRecursive()     at   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,   Boolean includeStagesAfterAsyncPoint)      
    at System.Web.UI.Page.ProcessRequest(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest()      
    at System.Web.UI.Page.ProcessRequest(HttpContext context)    
    at   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter   writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path,   VirtualPath filePath, String physPath, Exception error, String   queryStringOverride)    
    at   System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean   preserveForm)    
    at   System.Web.HttpServerUtility.Transfer(String path)    
    at Microsoft.SharePoint.Utiliti...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44038: 09/22/2014 11:50:04.87*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...es.SPUtility.TransferToErrorPage(String message, String linkText,   String linkUrl)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoadHelper(WOPIFrame   frame)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoad(WOPIFrame   frame)    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,   Boolean includeStagesAfterAsyncPoint)      
    at System.Web.HttpContext.InvokeCancellableCallback(WaitCallback   callback, Object state)    
    at   System.Web.UI.Page.LegacyAsyncPageBeginProcessRequest(HttpContext context, AsyncCallback   callback, Object extraData)    
    at   System.Web.HttpApplication.CallHa...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44039: 09/22/2014 11:50:04.87*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...ndlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&   completedSynchronously)    
    at   System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception   error)    
    at   System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext   context, AsyncCallback cb)    
    at   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest   wr, HttpContext context)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at Sys...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44040: 09/22/2014 11:50:04.87*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...tem.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr   pHandler, RequestNotificationStatus& notificationStatus)    
    at   System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler,   RequestNotificationStatus& notificationStatus)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)  
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44041: 09/22/2014 11:50:04.87 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    8e2s
    Medium  
    Unknown SPRequest error occurred. More information: 0x80070005
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44042: 09/22/2014 11:50:04.87 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    aix9j
    High    
    SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName=   ,bstrUrl=https://intranet.mycompany.com/poles/crc/wiki/_layouts/15/WopiFrame.aspx?sourcedoc=/poles/crc/wiki/Documents/confidentiality   - data protection_SDE_2014.05.06_v1.0.pptx&action=embedview&wdAr=1.3333333333333332
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44043: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    System.UnauthorizedAccessException: Access is denied. (Exception from   HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:   
    at   Microsoft.SharePoint.SPWeb.InitWeb()      
    at Microsoft.SharePoint.SPWeb.get_WebTemplateConfiguration()    
    at   Microsoft.SharePoint.WebControls.ScriptLink.InitJs_Register(Page page)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl,   Page page, String name, Boolean localizable, Boolean defer, Boolean   loadAfterUI, String language, Boolean injectNoDefer, Boolean   controlRegistration,
    Boolean loadInlineLast, Boolean ignoreFileNotFound)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page,   String name, Boolean localizable, Boolean defer, Boolean loadAfterUI, String   language, String uiVersion, String ctag)    
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44044: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...at Microsoft.SharePoint.WebControls.ScriptLink.Register(String   uiVersion, Control ctrl, Page page, String name, Boolean localizable, Boolean   defer)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.Register(Control ctrl, Page page,   String name, Boolean localizable, Boolean defer)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.GetOnDemandScriptKey(String   strKey, String strFile, Boolean registerDependencies, Control ctrl, Page   page)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control ctrl,   Page page, String strKey, String strFile, Boolean localizable)    
    at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Page   page, String strFile, Boolean localizable)      
    at   Microsoft.SharePoint.WebControls.ScriptLink.RegisterForControl(Control ctrl,   Page page, Stri...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44045: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...ng name, Boolean localizable, Boolean defer, Boolean loadAfterUI,   String language, Boolean injectNoDefer, Boolean controlRegistration, Boolean   loadInlineLast, Boolean ignoreFileNotFound)    
    at Microsoft.SharePoint.WebControls.ScriptLink.Register(Control   ctrl, Page page, String name, Boolean localizable, Boolean defer, Boolean   loadAfterUI, String language, String uiVersion, String ctag)    
    at Microsoft.SharePoint.WebControls.ScriptLink.RegisterOnDemand(Control   ctrl, Page page, String strKey, String strFile, Boolean localizable)    
    at   Microsoft.SharePoint.WebControls.ScriptLink.OnLoad(EventArgs e)    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Control.LoadRecursive()    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Control.LoadRecursive()    
    at System....
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44046: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at System.Web.UI.Page.ProcessRequest(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest()      
    at System.Web.UI.Page.ProcessRequest(HttpContext context)    
    at   System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter   writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path,   VirtualPath filePath, String physPath, Exception error, String   queryStringOverride)    
    at   System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean   preserveForm)    
    at   System.Web.HttpServerUtility.Transfer(String path)    
    at Microsoft.SharePoin...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44047: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...t.Utilities.SPUtility.TransferToErrorPage(String message, String   linkText, String linkUrl)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoadHelper(WOPIFrame   frame)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoad(WOPIFrame   frame)    
    at   System.Web.UI.Control.LoadRecursive()      
    at System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,   Boolean includeStagesAfterAsyncPoint)      
    at System.Web.HttpContext.InvokeCancellableCallback(WaitCallback   callback, Object state)    
    at   System.Web.UI.Page.LegacyAsyncPageBeginProcessRequest(HttpContext context, AsyncCallback   callback, Object extraData)    
    at   System.Web.HttpApplicati...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44048: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...on.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&   completedSynchronously)    
    at   System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception   error)    
    at   System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext   context, AsyncCallback cb)    
    at   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest   wr, HttpContext context)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags) 
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44049: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...   at   System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler,   RequestNotificationStatus& notificationStatus)    
    at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr   pHandler, RequestNotificationStatus& notificationStatus)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)  
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44051: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ajji6
    High    
    Unable to write SPDistributedCache call usage entry.
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44052: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    8e2s
    Medium  
    Unknown SPRequest error occurred. More information: 0x80070005
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44053: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    aix9j
    High    
    SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName=   ,bstrUrl=https://intranet.mycompany.com/poles/crc/wiki/_layouts/15/WopiFrame.aspx?sourcedoc=/poles/crc/wiki/Documents/confidentiality   - data protection_SDE_2014.05.06_v1.0.pptx&action=embedview&wdAr=1.3333333333333332
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44057: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    System.UnauthorizedAccessException: Access is denied. (Exception from   HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:   
    at   Microsoft.SharePoint.SPWeb.InitWeb()      
    at Microsoft.SharePoint.SPWeb.get_EnableMinimalDownload()    
    at   Microsoft.SharePoint.WebControls.DeltaPage.RenderToBase(HtmlTextWriter   writer)    
    at   Microsoft.SharePoint.WebControls.DeltaPage.Render(HtmlTextWriter writer)    
    at   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,   ControlAdapter adapter)    
    at   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,   Boolean includeStagesAfterAsyncPoint)      
    at System.Web.UI.Page.ProcessRequest(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest()      
    at System.Web.UI.Page.P...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44058: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...rocessRequest(HttpContext context)      
    at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler,   TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath   path, VirtualPath filePath, String physPath, Exception error, String   queryStringOverride)    
    at   System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean   preserveForm)    
    at System.Web.HttpServerUtility.Transfer(String   path)    
    at   Microsoft.SharePoint.Utilities.SPUtility.TransferToErrorPage(String message,   String linkText, String linkUrl)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoadHelper(WOPIFrame   frame)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoad(WOPIFrame   frame)    
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Page.Pro...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44059: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...cessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean   includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,   Boolean includeStagesAfterAsyncPoint)      
    at System.Web.HttpContext.InvokeCancellableCallback(WaitCallback   callback, Object state)    
    at   System.Web.UI.Page.LegacyAsyncPageBeginProcessRequest(HttpContext context, AsyncCallback   callback, Object extraData)    
    at   System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep   step, Boolean& completedSynchronously)      
    at   System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception   error)    
    at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext   ...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44060: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...context, AsyncCallback cb)       at   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest   wr, HttpContext context)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler,   RequestNotificationStatus& notificationStatus)    
    at   System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler,   RequestNotificationStatus& notificationStatus)    
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   ro...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44061: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...otedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData,   Int32 flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)  
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44062: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    8e2s
    Medium  
    Unknown SPRequest error occurred. More information: 0x80070005
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44063: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    aix9j
    High    
    SPRequest.OpenWeb: UserPrincipalName=, AppPrincipalName=   ,bstrUrl=https://intranet.mycompany.com/poles/crc/wiki/_layouts/15/WopiFrame.aspx?sourcedoc=/poles/crc/wiki/Documents/confidentiality   - data protection_SDE_2014.05.06_v1.0.pptx&action=embedview&wdAr=1.3333333333333332
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44064: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    System.UnauthorizedAccessException: Access is denied. (Exception from   HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:   
    at   Microsoft.SharePoint.SPWeb.InitWeb()      
    at Microsoft.SharePoint.SPWeb.get_EnableMinimalDownload()    
    at   Microsoft.SharePoint.WebControls.DeltaPage.RenderToBase(HtmlTextWriter   writer)    
    at   Microsoft.SharePoint.WebControls.DeltaPage.Render(HtmlTextWriter writer)    
    at   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,   ControlAdapter adapter)    
    at   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,   Boolean includeStagesAfterAsyncPoint)      
    at System.Web.UI.Page.ProcessRequest(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest()      
    at System.Web.UI.Page.P...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44065: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...rocessRequest(HttpContext context)      
    at System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler,   TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath   path, VirtualPath filePath, String physPath, Exception error, String   queryStringOverride)    
    at   System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean   preserveForm)    
    at System.Web.HttpServerUtility.Transfer(String   path)    
    at   Microsoft.SharePoint.Utilities.SPUtility.TransferToErrorPage(String message,   String linkText, String linkUrl)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoadHelper(WOPIFrame   frame)    
    at   Microsoft.SharePoint.ApplicationPages.WOPIFrameHelper.OnLoad(WOPIFrame   frame)    
    at System.Web.UI.Control.LoadRecursive()    
    at System.Web.UI.Page.Pro...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44066: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...cessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean   includeStagesAfterAsyncPoint)    
    at   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,   Boolean includeStagesAfterAsyncPoint)      
    at System.Web.HttpContext.InvokeCancellableCallback(WaitCallback   callback, Object state)    
    at   System.Web.UI.Page.LegacyAsyncPageBeginProcessRequest(HttpContext context, AsyncCallback   callback, Object extraData)    
    at   System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep   step, Boolean& completedSynchronously)      
    at   System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception   error)    
    at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext   ...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44067: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...context, AsyncCallback cb)       at   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest   wr, HttpContext context)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)    
    at   System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler,   RequestNotificationStatus& notificationStatus)    
    at   System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler,   RequestNotificationStatus& notificationStatus)    
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr   ro...
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44068: 09/22/2014 11:50:04.89*
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    General                       
    ai1wu
    Medium  
    ...otedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData,   Int32 flags)    
    at   System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr   rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32   flags)  
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44069: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    Micro Trace                   
    uls4
    Medium  
    Micro Trace Tags: 0 nasq,1 agb9s,1 aib35,13 aib35,2 aat87,0 aix9j,0   ai1wu,0 aix9j,0 ai1wu,3 ajji6,1 aix9j,0 ai1wu,0 aix9j,0 ai1wu
    17efba9c-d283-80e1-2ddf-9311dd77dd1c
    Line 44070: 09/22/2014 11:50:04.89 
    w3wp.exe (0x15EC)                       
    0x0AAC
    SharePoint Foundation         
    Monitoring                    
    b4ly
    Medium  
    Leaving Monitored Scope (Request   (GET:https://intranet.mycompany.com:443/poles/crc/wiki/_layouts/15/WopiFrame.aspx?sourcedoc=/poles/crc/wiki/Documents/confidentiality%20-%20data%20protection_SDE_2014.05.06_v1.0.pptx&action=embedview&wdAr=1.3333333333333332)).
      Execution Time=33.433439166151
    17efba9c-d283-80e1-2ddf-9311dd77dd1c

  • Weblogic 10.1 web apps merge log4j log files into single log file

    Hi
    I have deployed multiple web applications on my weblogic (v 10.1 - JDK 1.5.0_12). I am using log4j-1.2.13.jar in a four different web applications.
    The location for the files are - WEB-INF\lib\log4j-1.3.13.jar and WEB-INF\classes\log4j.properties
    When I deployed all the four webapps in weblogic - we found that all of the apps started writing their logs into the logfile which is configured in the log4j of the first web apps log file. The "first web app" is the web app which is the first app deployed in weblogic.
    I have deployed all the four webapps in Tomcat and found that four separate log files get created. Hence, this problem is unique to Weblogic.
    Any suggestions on what the problem could be? I have been battling with this issue for over a week- and have exhausted all ideas.
    Thank you,
    Ronak S.

    Hi ,
    Read all about your issue here :
    Weblogic 10.0 and Log4j classpath problem
    Issue is that the Weblogic system classloader includes log4J already..
    Use "Filtering ClassLoader" a mechanism to configure deployment descriptors to explicitly specify that certain packages should always be loaded from the application, rather than being loaded by the system classloader.
    see: http://e-docs.bea.com/wls/docs100/programming/classloading.html#wp1097187
    Example:
    Add following to your META-INF/weblogic-application.xml
    <prefer-application-packages>
    <package-name>org.apache.log4j.*</package-name>
    </prefer-application-packages>
    Exclude all library packages used within your applcation to have full control over what is used by the application.
    regards,
    Kris

  • How to change web-app display name within EAR file?

    Currently we are deploying an EAR file (which contains a web-app and an EJB) per
    BEA recommendations. The web-app shows up on the admin console with '/' as the
    name. Is there anyway to change this to the name I want?
    thx,
    Matt

    FYI - here is the entire content of applicaiton.xml in the EAR file we deploy:
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application
    1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
    <application>
    <display-name>RVApp</display-name>
    <module>
    <ejb>RVTrackingBean</ejb>
    </module>
    <module>
    <web>
    <web-uri>RVWebApp</web-uri>
    <context-root>/</context-root>
    </web>
    </module>
    </application>
    "Erik Johnson" <[email protected]> wrote:
    >
    No, you can't change that in the console. It's defined in the application's
    application.xml
    descriptor file.
    erik
    "Matt Savino" <[email protected]> wrote:
    Currently we are deploying an EAR file (which contains a web-app and
    an EJB) per
    BEA recommendations. The web-app shows up on the admin console with'/'
    as the
    name. Is there anyway to change this to the name I want?
    thx,
    Matt

  • Specify a file location in web app structure?

    I wish to store several small properties in a file for my web app, but how to control where they go? for instance (used in a class called from a jsp):
    FileOutputStream out = new FileOutputStream("tempFile.prop");
    out.println("test out");
    out.close();where does tempFile.prop go? Right now it appears to go into the root directory of the web app, but I would like to be able to dump it into web-inf, or in some other folder in my application.
    How do I specify a relative file location in the web app structure?
    On most runs of the app, the file is stored in the root folder of my app (the context?)
    Can I code relative paths from there, and how do i gaurantee where the files will go?
    I have tried several different things, and most of the time the behavior is as reported, but on a number of occaisions, the files go into tomcat/bin. WHAT? WHY? anyway, if there are any tried and true rules on this, let me know.
    Thank you

    Check out the File class, which can check the directory and file's existance (and other properties). I would simply create servlet that checks/writes to a file in which you can actually specify the path to the file, whether absolute (c:\\..\\..\\kf.prop) or relative (using servlet context to get to the webapp folder and then to various directories below that).
    Good luck

  • How to access additional supporting jar files from EJB JAR?

    Hi,
    How can we access additional supporting jar files as part of my EJB JAR .
    I don't want to keep them in the top level because other EJB JAR files also has
    the same jar files(code in the classes in the jar is slightly different)
    can I keep the additional jar files in my EJB JAR?
    Thanks
    NLB

    Include the supporting jar files in the Ejb jar file.
    Specifiy the jar files in the Ejb jar manifest file.
    Manifest-Version: 1.0 [CRLF]
    Class-Path: utility.jar [CRLF]
    thanks,
    Deepak
    "NLB" <[email protected]> wrote:
    >
    Hi,
    How can we access additional supporting jar files as part of my EJB JAR
    I don't want to keep them in the top level because other EJB JAR files
    also has
    the same jar files(code in the classes in the jar is slightly different)
    can I keep the additional jar files in my EJB JAR?
    Thanks
    NLB

  • Problem accessing sounds in jar file

    Hi,
    I have made a program and packed it to a jar file.
    Everything works fine in the IDE, so this is purely a matter of jar access.
    The jar has 6 folders.
    framework (which is one of my packages)
    META-INF
    sound (also my package)
    sounds (my wav files for the program)
    sprite (another package)
    sprites (my graphics for the program).
    I access the graphics in sprites, from a class in sprite and have no problem with it.
    try {               
                   URL url = this.getClass().getClassLoader().getResource(ref);               
                   if (url == null) {
                        fail("Kan ikke finde ref: "+ref);
                   sourceImage = ImageIO.read(url);
              } catch (IOException e) {
                   fail("fejl ved load: "+ref);
              }The problem is accessing the wav file in the sounds folder from a class in the sound folder.
    try{
                   AudioInputStream stream = AudioSystem.getAudioInputStream(new File("Sounds/1999.wav"));
                   AudioFormat format = stream.getFormat();
                   DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat(),
                             ((int)stream.getFrameLength()*format.getFrameSize()));
                   clip = (Clip) AudioSystem.getLine(info);
                   clip.open(stream);
              }I have tried to use the class loader like this (instead of AudioSystem.getAudioInputStream) :
    AudioInputStream stream = (AudioInputStream) this.getClass().getClassLoader().getResourceAsStream("sounds/1999.wav");          
    but it didnt help.
    Does anyone have any suggestione?
    Please, if all you can do, is paste a link to the java API, save your energy. I have already looked and it was no help, as im still only a student of java.
    I would like an actual suggestion, so i can see it work, then i can make work my way through the API from there.
    Edited by: Mondariz on May 7, 2008 8:26 AM

    Don't try to use a File object to access resources from the jar. You have a working process for accessing the sprites, just use the same process to access the sounds. Only not quite the same method, there's one method which returns a URL and a very similar method which returns an InputStream. I would post the link to the documentation but you asked for us to not do that. Anyway you seem to know where it is.

  • How to access the database jar file using the derby 10.2.1.6 database ?

    Hi,
    How to access the database jar file using the derby 10.2.1.6 database ?
    I have used like below. And i am getting the following the error:
    "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.apache.derby.jdbc.EmbeddedDriver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)"
    My context.xml file looks like this:
    <Context crossContext="true">
    <Resource name="jdbc/derby" auth="Container"
    type="javax.sql.DataSource" driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
    url="jdbc:derby:jar(\CalypsoDemo\database.jar)samples"
    username="xxx" password="xxx" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    </Context>
    What could be the reason.?
    Any suggestions will be appriciated.
    Thanks in Advance,
    Gana.

    ya, I have restarted. Can you please tell me whether the path which i am giving is right or not in the context file?
    Thanks,
    Gana.

Maybe you are looking for

  • How to extract the Html content of a UI Map into a text file or html file?

    Hi, Is there any possibility in OUAF or Java or from the Database, to retrieve the Html Content of a given a UI Map ? If UI Map name is the input, then it should fetch the entire html portion of it into a text file. How to acheive this? This needs to

  • Controller DMRW1000 is not recognized with my 5GHz network

    I have the following items: Director DMC250, DMP100 and Controller DMRW1000. I decided to move all of them from the 2.4GHz to the 5GHz network, but the Controller is not recognized by LELA and when I try to set the network manually on the controller

  • Hi abapers doubt in client dependent  and independent

    i am having a doubt could you please explain me i created a dependent table using mandt in client 100(development). if transfered this  table to quality 110(quality). it is possible access data? when i see development 100 it's having data but i can't

  • All Adobe AIR Applications stopped function today, what happened?

    I'm running OS X 10.6.3, all of my Adobe AIR applications stopped functioning today. Here is a list of all the Adobe AIR applications that I use... http://imgur.com/CNXz5 Now here is the error that each of them have been giving me as of today... http

  • P order no

    HI, how to find p.order  number by knowing only P requisition number