Class library in a web app and config files

I built some class libraries and included them in a web project. Where do I put configuration files so the class library can access them? no matter where I put it, i keep getting file not found. What I've been doing is having a JSP read the config details and pass it to the class library. Is there another way?

I guess the question is where IT thinks the file is? What code are you using to load it?
I guess what I'm asking is where is the default folder for FileInputStream?The default folder is your runtime working directory. More often than not thats the "bin" directory of Tomcat. Not a great place to go looking for files.
getResource() and all that can be accessed from the JSP but those aren't available to me from within the class libraries. Are you saying you don't have access to a ClassLoader object that you can call getResource or getResourceAsStream on? You should be able to access things in the WEB-INF/classes directory in that way.
Given a web app, my first inclination would be to use the ServletContext.getResourceAsStream method.
Rather than passing in a file name, why not an InputStream, or byte[] ?
cheers,
evnafets

Similar Messages

  • How do I get back my govt MS Outlook email. I mistakenly changed it to Outlook Web App and it changed everything. I want my govt. email back.

    I used to have my emails at home look exactly like my govt outlook emails. Somehow I changed it on my home computer to using Outlook Web App and I hate it. It's slower, totally foreign to me and I get many error messages. I would like to sign in with my BC govt. username/password and have it look exactly like it does at the office. I tried for weeks to get it back but I don't know how. Please help me. I log into https:\\[email protected] for my govt website.
    Thank you.
    Marlene Reichert
    [email protected]

    Microsoft Office Outlook does not run inside the browser. If you have it installed on your home computer, you should be able to find it on the Windows Start menu and run it from there. If you were previously remote controlling your work computer, you probably need to work with your IT on getting that set up again if it stopped working.

  • Communication between a web app and a desktop app

    Hi,
    I would like to know how i can make a web application communicate with a desktop application (protocols,technologies, patterns�).
    And if I'm using a jsp web app and a java se app?
    Indeed, i have a desktop app. which use some information provided by an user via a web app,and the work performed by the desktop app cannot be performed inside a web container.
    Thanks.

    you mean it the other way around I think. You have a desktop app that needs to communicate with a web application.
    There are multiple ways.
    1) use plain old XML combined with URLConnection / HttpClient
    2) use XML-RPC
    3) use SOAP
    and there are more even. You will need to decide for yourself which technology can do what you require.

  • How can I use  EntityManager in my pojo class in a JSF web app?

    Hi guys,
    I need to use EntityManager in my pojo class in a JSF web app. Because pojo is not managed by web container, I cant use resource injection.
    Is there any way I do that ? Thanks.

    If you want something done fast, then why don't you try reading the API. The API:
    a) points your to the Swing tutoral on "Using Text Components" which has a working example
    b) shows you 3 ways to load data into the JEditorPane.

  • 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

  • Web apps and content holders after upload

    I purchased the uguru photography template from business catalyst into which I have inserted my own content worked on in dreamweaver and tested on my trail site. I transfered the whole of the new version successfully to my live site at http://www.misskikisalon.co.uk/. Have checked all files and everything is successfully there. The problem is that none of the web apps and content holders are now working and the interface tells me there are no web apps on the site although all the files have uploaded. The html pages say 'No Items Found' where the web apps should be working and the content holders should be - on product pages it says no product found or item out of stock. Please can you help?
    Also on the trial site interface under site manager there are 12 items and under web apps all the associated web apps for the template whereas in my live site in site manager there are 2 items listed under site manager - web forms and system emails and no apps - why the difference?

    I purchased the template which places it in the trial site worked on it locally using dreamweaver and then sftp site from dreamweaver to live site.
    How can I then use the template from the trial site and the version I have developed in dreamweaver and make this live on my live site. I want my currently live site to use this template and all the development I work since purchasing the template.

  • I had designed a Web App and tested on Firefox 18, 19, 20 and now when i'm checking it on 21 version it's not rendering properly. Now tell me what should i do.

    I had designed a Web App and tested on Firefox 18, 19, 20 and now when I'm checking it on 21 version it's not rendering properly. Now tell me what should i do.

    Hi charlesmoizeau, why do you want to install Firefox 18? To be compatible with a particular website or add-on? There might be a better workaround, but without the details, it's hard to say.
    See this help article: [[Install an older version of Firefox]]. And be aware that Mozilla discloses [https://www.mozilla.org/security/known-vulnerabilities/firefox.html security flaws] after each new release.

  • HT1751 when one copies their itunes library to an external device, does the iPad apps and other files get copied also?

    When copying iTunes files to an external device, do the Apps and other files for an iPad get copied also?

    If the instructions are followed and the ENTIRE iTunes folder is copied, then all the contents of the folder (including apps) will be copied.

  • Appropriate directory for themes, logs and config files

    Hello, I would like to know what would be the appropriate directory to place a application's config directory that contains themes, logs and config files for that application.
    I want that directory to be accessible but since ~/Library is now invisible on Lion, that kinda rules it out for accessibility. The only place left now would be ~/Applications, but I don't think it was intended for that.
    There is also an invisible config file that contains the path to the config directory and that's what the app uses to know where the config directory is located. The current emplacement of that config file is in the home directory, which I think is not in accordance to Apple's guidelines. So where should I place that file?
    What should I do?
    Thanks

    Whee wrote:
    I wish I could choose both of your answers as being the good one.
    Thanks for the additional info about the Home and Documents directory, that clears a lot of things up. I needed to know that too. Do you know where that documents is located now? http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFileSy stem/Articles/WhereToPutFiles.html
    Apple prefers you use the system API for these things. Here is one document that explains it.
    So even though I won't use NSDefaults because what I am working on is a cross Platform app that is in C, I will put the config file in ~/Library/Preferences and the config folder in ~/Library/Application Support.
    Almost everything has a C equivalent. You can use CFPreferences instead. I strongly urge you to use one of the system APIs instead of trying to write your own files. For one thing, the user can put their home directory virtually anywhere they want. For another, Lion is rewriting the underlying architecture with the new screen sharing and iCloud. If you use the system APIs, your program will work properly with any new technologies or custom network settings.

  • How do I recover a .app and its file contents after osx "click and hold" "hit x button" delete

    How do I recover a .app and its file contents after osx "click and hold" "hit x button" delete.
    Accidently deleted rapidweaver and all of its content and paid plugins with it. all contain in its package contents. how do i restore.  I tried using recovery software.

    It is possible that you inadvertently corrupted the file while doing the edit.
    But it could also be possible that you moved the file? For iMovie to see it, it should be in the Movies/iMovie Projects folder.

  • Iplanet 6.0 web-apps.xml config issue..!

    Hi,
    I would like to know the reason for marking webapps_enable="off" or "on" in server.xml.
    The issue I'm facing is when I say :
    <VARS docroot="/usr/sample-app/web" webapps_file="web-apps.xml" webapps_enable="on"/>
    and my web-apps.xml file looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE vs PUBLIC "-//Sun Microsystems, Inc.; iPlanet//DTD Virtual Server Web Applications 6.0//EN"
    "http://developer.iplanet.com/webserver/dtds/iws-webapps_6_0.dtd">
    <vs>
    <session-manager class="com.iplanet.server.http.session.IWSSessionManager">
    <init-param>
    <param-name>maxSessions</param-name>
    <param-value>2000</param-value>
    </init-param>
    <init-param>
    <param-name>timeOut</param-name>
    <param-value>150</param-value>
    </init-param>
    <init-param>
    <param-name>reapInterval</param-name>
    <param-value>150</param-value>
    </init-param>
    </session-manager>
    <parameter-encoding enc="UTF8"/>
    </vs>
    If I make webapps_enable="on" and add a new URI as :
    <web-app uri="/sampleapp" dir="/usr/sample-app/sampleapp" enable="true"/>
    I'm getting the following error message when I start my web server;
    vs(https-somapp.xyz.COM)SAX parser error: The content of element type "vs" must match "(auth-native?,class-loader?,jsp-servlet?,parameter-encoding?,response-buffer?,response-cookie?,config-param*,role-mapping?,session-manager?,session-tracking?,session-cookie?,tempdir?,form-login-session?,web-app*)". in file:web-apps.xml at line number 22.
    Kindly assist me as I'm a newbie to Iplanet configurations.
    Thanks in advance
    SS

    Hi,
    In server.xml, the VS tag needs to also include the id of the virtual server, i.e.
    <vs> is wrong, it should be something like:
    <VS id="server.iplanet.com" connections="group1" mime="mime1"
    aclids="acl1">
    Please see the following doc for more detail on the VS element:
    http://www.scientificamerican.com/manual/nsapi/08_vserv.htm
    By the way, this is the wrong forum to post questions on webserver to, you should use the following forum in future:
    http://swforum.sun.com/jive/forum.jspa?forumID=16
    Hope this helps

  • SSO of custom web app and ALBPM

    Hi
    Recently we have to integrate a custom app and ALBPM on weblogic server,
    we want to implement Single Sign On between the custom app and ALBPM workspace,
    hopefully on application level
    (our custom application is using acegi security backed by LDAP right now)
    but seems the authentication of ALBPM is quite proprietary and tends to be container-managed.
    could anyone can kindly tell me how should we get start on this?
    Thanks

    Hello guys,
    someone knows how to implements "fuego.workspace.security.SSOWorkspaceLoginInterface" or find some API documentation, javadoc about this interface?
    for now, Im try to find some help or documentation about SSO in workspace, So when I did decompilation to find more answers.
    package fuego.workspace.security;
    import fuego.sso.SSOLoginException;
    import fuego.web.SSOUserLoginInterface;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public interface SSOWorkspaceLoginInterface extends SSOUserLoginInterface {
         public abstract void setupAuthenticatedSession(
                   HttpServletRequest httpservletrequest,
                   HttpServletResponse httpservletresponse) throws SSOLoginException;
         public abstract void processRequest(HttpServletRequest httpservletrequest,
                   HttpServletResponse httpservletresponse) throws SSOLoginException;
    package fuego.web;
    public interface SSOUserLoginInterface extends fuego.sso.SSOUserLoginInterface {
    package fuego.sso;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    // Referenced classes of package fuego.sso:
    //            SSOLoginException
    public interface SSOUserLoginInterface {
         public abstract String getUser(HttpServletRequest httpservletrequest,
                   HttpServletResponse httpservletresponse) throws SSOLoginException;
         public abstract String getPassword(HttpServletRequest httpservletrequest,
                   HttpServletResponse httpservletresponse) throws SSOLoginException;
         public abstract boolean skipFDIAuthentication();
         public abstract String getLogoutURL();
         public abstract String getLogoutRelativePath();
    }And I decompile fuego.workspace.security.SSOWorkspaceLogin to see the logic inside this classe
    package fuego.workspace.security;
    import fuego.sso.SSOLoginException;
    import fuego.web.SSOUserLogin;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    // Referenced classes of package fuego.workspace.security:
    //            SSOWorkspaceLoginInterface
    public class SSOWorkspaceLogin extends SSOUserLogin implements
              SSOWorkspaceLoginInterface {
         public SSOWorkspaceLogin() {
         public void setupAuthenticatedSession(
                   HttpServletRequest httpservletrequest,
                   HttpServletResponse httpservletresponse) throws SSOLoginException {
         public void processRequest(HttpServletRequest httpservletrequest,
                   HttpServletResponse httpservletresponse) throws SSOLoginException {
    package fuego.web;
    // Referenced classes of package fuego.web:
    //            SSOUserLoginInterface
    public class SSOUserLogin extends fuego.sso.SSOUserLogin implements
              SSOUserLoginInterface {
         public SSOUserLogin() {
    }And here i think he uses some obfuscator, cause i cant decompile implementation method :(
    package fuego.sso;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    // Referenced classes of package fuego.sso:
    //            SSOUserLoginInterface, SSOLoginException
    public class SSOUserLogin implements SSOUserLoginInterface {
         public SSOUserLogin() {
         public String getUser(HttpServletRequest request,
                   HttpServletResponse response) throws SSOLoginException {
              /*  25*/return request.getRemoteUser();
         public String getPassword(HttpServletRequest request,
                   HttpServletResponse response) throws SSOLoginException {
              /*  31*/return null;
         public boolean skipFDIAuthentication() {
              /*  36*/return true;
         public String getLogoutURL() {
              /*  41*/return null;
         public String getLogoutRelativePath() {
              /*  46*/return null;
    }Thanks for any help or indication of source..
    regards.

  • Encrypt communication between SharePoint Web App and SSRS

    Hi
    I have SharePoint 2010 in multi server farm. The SharePoint web app has SSL enabled. The Reporting Server (SSRS) is http URL.
    So when the Report Viewer web part is used, the communication between SharePoint web server and SharePoint Reporting Server is unsecured. The existing SSL has hard coded hostnames and for business reasons we prefer not to modify it.
    Does anyone know how can I make that communication secured? Do I need to apply new SSL for SP Reporting Services? Is there any other option?

    This should get you off and running on SSL
    http://technet.microsoft.com/en-us/library/ms345223(SQL.100).aspx
    and if you haven't go SQL on SSL - ->
    http://technet.microsoft.com/en-us/library/ms189067(v=sql.100).aspx
    Stacy Anothersharepointblog.blogspot.com

  • ClassNotFoundException for Class in directory of Web App

    If I understand things correctly, the line "RegistrationTestServlet threw exception java.lang.ClassNotFoundException: data.DBAccess" means that the class data.DBAccess is not found in the classpath. However, that class is in the data package within the source folder of the my web application in the Netbeans IDE - and I presume the IDE adds the packages to the class path as appropriate during testing. I've never had any trouble like this with other classes in packages within the source directory for other web apps I've developed.
    So I'm not sure if this is something I should post on a Netbeans or Tomcat forum or here because I'm not exactly sure what is going on. Any guidance would be appreciated. Here is the full error message from the Tomcat console:
    org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet RegistrationTestServlet threw exception
    java.lang.ClassNotFoundException: data.DBAccess
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at ui.RegistrationTestServlet.doGet(RegistrationTestServlet.java:34)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)

    Thank you. Your response prompted me to check the "build" directory of the Netbeans project and there I found the problem...
    About 4 months ago when I first create the "data" package I named it "Data." Then I realized Java naming conventions say package names should be lower case so I tried to rename it (and the correct way by refactoring or whatever netbeans calls it) but when I tried to rename "Data" to "data" netbeans kept saying "package already exists." So I deleted the Data package and created a new package "data."
    It seemed to work and in the Netbeans folder structure it says "data."
    Well, come to find out in the build directory that package is still called "Data." My guess is when I run the project the build directory only changes what's new, and it looks at Data and data as the same thing. However, the JVM must look at Data and data as different - hence my code is calling "data.DBAccess" and the JVM can't find it.

  • I switched to excel services from office web app, and i want to revert my changes. remove-spwopisupressionSetting doesnt work!

    I originally had excel web app working on prem, but since it didn't support powerview I tried my luck with excel services.
    I switched to excel services by using the new-SPWOPISuppressionSetting cmdlet.
    I figured to return to excel web app, I would just use the remove-SPWOPISupressionSetting cmdlet, but I removed the suppression setting and even reboot the server and it's still using excel services!
    What do I have to do at this point, reinstall office web app completely? Its still working for word and powerpoint, why didn't it take back over for excel? Any tips?
    Thanks

    Hi,
    From your description, my understanding is that you want to
    remove the suppression settings for excel.
    I could try these point below:
    1.      
    Test the issue with another browser.
    2.      
    Test the issue with another computer.
    3.      
    Try to clear the cookie of your browser and test your issue.
    4.      
    Try restart the IIS with command iisreset.
    Please try command
    Get-SPWOPISuppressionSetting to get
    all the suppression settings on the current SharePoint farm to check if the excel is suppressed or not. You could refer to this article:
    https://technet.microsoft.com/en-us/library/jj219445.aspx.
    As word and PowerPoint work well, you could try command
    Remove-SPWOPISuppressionSetting -Extension "XLSX" -Action "view" that you could refer to this article:
    https://technet.microsoft.com/en-us/library/jj219452.aspx?f=255&MSPPError=-2147217396.
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

Maybe you are looking for

  • Looking for help to improve Airport performance over LAN (WAN is fine)

    Ok, I've read through several threads on this forum that address problems people are having with slow performance with Airport. I've also checked out all of the Apple KBs that address Airport, recommended settings. Unfortunately my issue isn't addres

  • Laptop shutting down? Fan overheating?

    Hi all. I have read many topics on this forum about the fan on any laptop not working, the laptop overheating or the laptop seemingly randomly shutting down. I have had this problem for about three months. I tried propping up the laptop so the fan (s

  • Quicktime 7.2 and Vista with RAID Arrays

    Has anybody been brave enough to install Quicktime 7.2 on their Vista computer which also has a RAID 0 or 1 array? Previous versions of Quicktime have crashed the RAID array necessitating a new computer the first time and a rebuild of the backup RAID

  • How to silent install Flash Player 10.2.159.1.exe / msi ?

    Hello ! ALL experts, I have tried the following switch for the Flash Player 10.2.159.1.exe / msi , but ALL switches do not work. -s, -silent, -q, -quiet, /s, /silent, /q, /quiet So, how can I install the exe / msi silently ? Please help !! The Flash

  • Function to show Universe Objects used by reports

    Is there a function in XI3.1 to see all of the reports in which a particular Object is being used? I don't see any of the canned audit reports that would show this. Example: I have a Universe Object called "Ins. Proper Name'' and I want to see how ma