Best Practice For Referencing JPEG Path Using Servlets To Prepare HTML IMG

I am migrating a legacy app from Tomcat 5 to Weblogic 11g (10.3). In the legacy app, servlets write HTML that uses relative paths for <IMG src="../images/img.jpeg"> and <script src="../javascript/js.js">. The app is deployed as an exploded archive. Unfortunately, none of the images or script are being loaded. I've tried using http://serverIP:portNum/contextName/images/img.jpeg"> but it doesn't work. I've also checked to get the name of the context in the servlet and it's the root context. Could it have something to do with me having to append .war onto the application when I deploy it? Would it help if I deployed it as a war inside an ear? Basically, I want some best practices for doing this on Weblogic 11g. There are a lot of images and javascript and I'm really hoping they don't have to be inserted using ClassLoader.getResourceAsStream()... thank you.

Best Practice:
1. Move Static files like images, css, java scripts to a web server infrastructure if available.
2. If this is not your case, then please send your directory information how you have packaged your EAR. I can advice :)

Similar Messages

  • Best practice for Video over IP using ISDN WAN

    I am looking for the best practice to ensure that the WAN has suffient active ISDN channels to support the video conference connection.
    Reliance on load threshold either -
    Takes to long for the ISDN calls to establish causing the problems for video setup
    - or is too fast to place additional ISDN calls when only data is using the line
    What I need is for the ISDN calls to be pre-established just prior to the video call. Have done this in the past with the "ppp multilink links minimum commmand but this manual intervention isn't the preferred option in this case
    thanks

    This method is as secure as the password: an attacker can see
    the hashed value, and you must assume that they know what has been
    hashed, with what algorithm. Therefore, the challenge in attacking
    this system is simply to hash lots of passwords until you get one
    that gives the same value. Rainbow tables may make this easier than
    you assume.
    Why not use SSL to send the login request? That encrypts the
    entire conversation, making snooping pointless.
    You should still MD5 the password so you don't have to store
    it unencrypted on the server, but that's a side issue.

  • Best Practices for SAP, connections to use without BW

    Hello,
    Could you help me to solve a problem with Best Practices 4.31?
    SAP Integration Kit XI 3.1 SP3 has 4 options  :
    u2022     SAP Infosets
    u2022     SAP BW MDX Query
    u2022     SAP BW Query
    u2022     Table, cluster ou function
    When I install SAP Integration Kit XI 3.1 SP3 for serveur, I have one additional service in my CCM,  BW Publisher 12. This service is from SAP BW.
    From the article /people/glen.spalding/blog/2010/08/04/the-full-montypart-13bobj-integration-kit-sp3-install-configure and installation guide for IIntegration Kit XI 3.1 SP3 I've learned that I need SAP BW to use Infosets dans Crystal Reports.
    Dans notre installation nous avons
    u2022     SAP ERP système without BW,
    u2022     BOBJ Server Setup,
    u2022     BOBJ Edge Integration Kit for SAP XI 3.1 SP3 server
    u2022     BOBJ Client Setup,
    u2022     BOBJ Edge Integration Kit for SAP XI 3.1 SP3 client
    u2022     Crystal Reports 2008
    u2022     Xcelsius 2008
    I've got Best Practices reports via « Table, cluster ou fonction » connection. There is no problem with this type of connection !
    I suppose that « SAP Infosets », « SAP BW MDX Query » et « SAP BW Query » connections should be used with SAP BW.
    Could you give me your opinion about this question?
    Thanks beforehand,
    Malika

    Hi,
    the InfoSets are a connection option for the classic InfoSets in an ERP system. Would suggest you take a look at the user guide for the SAP Integration Kit
    ingo

  • Best practice for moving portal solution using content db from UAT to PROD

    Hi,
     Would like to know can we backup the database from UAT env. and restore the  same to  PROD. if all of my functionality is working fine in UAT env.
    I have event receivers[web level features], site collection level features,custom web parts, custom permissions, saved site templates, custom discussion forums etc.
    Assuming that I have my custom solution deployed on the Prod. which will activate features for those web parts and my custom application page features.
    Is there any issues I can anticipate in PROD.env, if i perform this activity.
    or
    Is this approach not recommended by Microsoft ? if yes , whats the best approach for deploying portal solution in PROD?
    Should I create teh web application, site collections, everything in PROD.from scratch.
    any links regarding this approach and the bext practices / helpful info is appreciated.

    Thanks Trveor for the reply.
    so, I can go ahead and  create the web applns, site collections and  deploy my web parts, item event receivers, appln pages and my timer jobs in UAT and take the  backup of the same and restore it in PROD env.
    But, i ahve a doubt here , as I have few site pages created it in my site template and when i take the backupof this web apppln's content db --- [ i think i can take the backup of web appln content db through power shell] ---- 
    will the site pages also be part of this backup?
    I had some experience in prev.version of SP, wherein i have few site pages and saved site template I have taken the backup of the  web appln and  restore it in another farm and  associate the restored content db to the
    newly created web appln in the targeted farm.
    But when I navigated to thsoe restored site pages, it gave me "resource not found /file not found " error.
     I had  deployed the custom web parts as a custom wsp and added into those site pages.
    and it failed to load those web parts UI.
    I was not sute whether this happened because of backup or restore from source  spfarm to the  targeted sp farm .

  • SX20 and SX10 best practices for small conference rooms using built in Display Speakers

    Hi, 
    Im planning to deploy some small meeting rooms using SX10 and SX20 codecs, I was wondering if someone could give me some key points to consider: 
    1. Display recommendation, nice built in speakers, low delay (goog performance with codec echo canceller) I wish to use a 60 - 70 inch Led TV (not yet defined which brand and model)  I would like to receive some feedback about nice performance displays with nice audio and echo cancellation performance based on your experience. 
    2. What would be the drawbacks of using SX10 and SX20 in larger meeting rooms maybe 10 or 12 people?
    3. When to use external microphone? or when is recommended to use only  internal microphone?
    Thanks in advance for your help. 
    Best Regards,  have a nice day!

    Pretty well any modern display should work well - different people are going to have different ideas about whether the speakers are any good or not, so you'll have to listen to a few yourself and make up your mid what you think is "better".  The echo cancellation can be tweaked manually on the codec to suit the display if required (rather than leaving it on the "auto" setting which, in our installations, has caused more troubles than it's worth).
    The main drawback of using the SX10, or the cheaper of the range of the SX20s, is the camera and the amount of zoom.  In a larger room, you're not going to get a good close up view with a 2.5x camera.  I'd suggest for a bigger room, you look at the 12x cameras.
    As a general rule - use additional microphone(s) when you can't get someone within a 3m radius one of the other microphones.  So in a larger room, you may need many.
    Wayne
    Please remember to rate responses and to mark your question as answered if appropriate.

  • Best practices for referencing external video across multiple computers

    I have made a .swf that references an external .f4v .  The swf plays fine on my own computer, but does not play on a colleagues computer, or another computer which we tested.  The file is not for upload to web , it is for local playback.  I assume this is a file path issue, but I have tried many different things including specifying a path and then recreating the same directory structure on the other computer.  What am I missing?  The f4v file can playback on the colleagues computer (I did install ffdshow , although another tested mp4 also plays back fine) but not the .swf.  Please , any help would be greatly appreciated!
    Thank you!

    This could be a security context issue, is it possible on your own machine you have allowed access to that file or folder containing the F4V file, maybe using the global-security-settings in flash player? Have a read of the following just in case:
    http://www.adobe.com/products/flashplayer/articles/localcontent/

  • Best practice for hierarchical DTOs?

    Hi!
    Can someone tell me the best practice for hierarchical DTOs?
    Use case: I've got a User object which holds one Folder object, which in turn holds a Set of Folder objects (children).
    class User {
      Folder rootFolder;
    class Folder {
    Set children;
    }Normally, I'd fetch the user data with the help of a DAO from the database, copy the requested properties into a User-DTO, which will be transfered to the view. But what about the Folder objects?
    Should I create a Folder-DTO class and copy each Folder property into the respective DTO object - in other words: rebuild the whole hierarchy? Or is there a better solution?
    Thanks a lot!
    Walter

    Normally, I'd fetch the user data with the help of a
    DAO from the database, copy the requested properties
    into a User-DTO, which will be transfered to the view.
    But what about the Folder objects?
    Should I create a Folder-DTO class and copy each
    Folder property into the respective DTO object - in
    other words: rebuild the whole hierarchy? Or is there
    a better solution?It isn't recursive right?
    So this is just a standard association.
    How you handle it depends on usage.
    As a guess perhaps you are thinking that you can only have one User DTO class. That isn't true. You can have several. For example one that contains the association and one that does not.
    Or you have just one. And either it contains the association or you provide another mechanism that returns just the association given a specific instance of a User DTO (or some other identifier to the specific User.)

  • Best Practices for Removing Shots from BDMV folder

    CS6 Production Premium Suite
    Win7x64
    Canon XA10
    I would appreciate feedback on the best practices for the following situation:
    Using Windows Explorer, I copy the BDMV folder from the XA10 to my Talk2 project folder.
    The BDMV folder has three one hour shots (talks) where each shot is one hour called Talk1, Talk2, and Talk3.
    Each shot consists of several MTS files in the STREAM folder since MTS files have a maximum file size so a new MTS file is created when a given MTS file reaches the maximum file size.
    Since I only want to have Talk2 stuff in my Talk2 project folder, I need to remove the Talk1 and Talk3 stuff from the BDMV folder.
    I delete the Talk1 and Talk3 MTS files from the STREAM folder.
    I delete the Talk1 and Talk3 CPI files from the CLIPINF folder.
    I leave the PLAYLIST folder as is.
    Using the Media Browser, I import Talk2 (which consists of two MTS files).
    I edit the clip.
    This procedure seems to work, but I do not know if there are any "got you" issues.
    Thanks in advance.

    Oh, don't do it that way.  I know a lot of people do, heck, my boss does, but it's just asking for trouble.
    Treat your card as if it was your original tape master (because it is).  It is the most important thing you have.  Don't delete or move any part of it. 
    If you want to break up the talks, do it as you shoot them.  Use separate cards for each talk and archive each one separately.  There is too much valuable information in the structure of the card format.  You may not need it now but your editing program may need it later.
    Hard drive space is cheap but digital recordings are priceless

  • Best Practice for ip helper-address

    I have 2 dhcp servers on same subnet 192.168.1.0
    I'm trying to setup my SVI
    Gateway 192.168.6.1
    How should the ip helper-address be setup?
    ip helper-address 192.168.1.0
    or
    ip helper-address 192.168.1.1 <- dhcp 1
    ip helper-address 192.168.1.2 <- dhcp 2
    2 Dhcp servers setup each to handle half the scope of a given subnet.

    Sparky
    Generally I believe that the best practice for this is to use two helper address statements. This will send two unicaast packets, one to each server. The other alternative is to send a directed broadcast (which would actually be ip helper-address 192.168.1.255). To do this you would also have to be sure that ip directed-broadcast was enabled on the router interface connecting to the 192.168.1.0 subnet. Many people reguard ip directed-broadcast as a security vulnerability and do not want it enabled. If your environment is comfortable with enabling this function then both alternatives would work. The advantage of the directed broadcast is that it transmits one packet rather than transmitting two packets. If it were me I would use two helper address statements.
    HTH
    Rick

  • Best Practices for Using Photoshop (and Computing in General)

    I've been seeing some threads that lead me to realize that not everyone knows the best practices for doing Photoshop on a computer, and in doing conscientious computing in general.  I thought it might be a good idea for those of us with some exprience to contribute and discuss best practices for making the Photoshop and computing experience more reliable and enjoyable.
    It'd be great if everyone would contribute their ideas, and especially their personal experience.
    Here are some of my thoughts on data integrity (this shouldn't be the only subject of this thread):
    Consider paying more for good hardware. Computers have almost become commodities, and price shopping abounds, but there are some areas where spending a few dollars more can be beneficial.  For example, the difference in price between a top-of-the-line high performance enterprise class hard drive and the cheapest model around with, say, a 1 TB capacity is less than a hundred bucks!  Disk drives do fail!  They're not all created equal.  What would it cost you in aggravation and time to lose your data?  Imagine it happening at the worst possible time, because that's exactly when failures occur.
    Use an Uninterruptable Power Supply (UPS).  Unexpected power outages are TERRIBLE for both computer software and hardware.  Lost files and burned out hardware are a possibility.  A UPS that will power the computer and monitor can be found at the local high tech store and doesn't cost much.  The modern ones will even communicate with the computer via USB to perform an orderly shutdown if the power failure goes on too long for the batteries to keep going.  Again, how much is it worth to you to have a computer outage and loss of data?
    Work locally, copy files elsewhere.  Photoshop likes to be run on files on the local hard drive(s).  If you are working in an environment where you have networking, rather than opening a file right off the network, then saving it back there, consider copying the file to your local hard drive then working on it there.  This way an unexpected network outage or error won't cause you to lose work.
    Never save over your original files.  You may have a library of original images you have captured with your camera or created.  Sometimes these are in formats that can be re-saved.  If you're going to work on one of those files (e.g., to prepare it for some use, such as printing), and it's a file type that can be overwritten (e.g., JPEG), as soon as you open the file save the document in another location, e.g., in Photoshop .psd format.
    Save your master files in several places.  While you are working in Photoshop, especially if you've done a lot of work on one document, remember to save your work regularly, and you may want to save it in several different places (or copy the file after you have saved it to a backup folder, or save it in a version management system).  Things can go wrong and it's nice to be able to go back to a prior saved version without losing too much work.
    Make Backups.  Back up your computer files, including your Photoshop work, ideally to external media.  Windows now ships with a quite good backup system, and external USB drives with surprisingly high capacity (e.g., Western Digital MyBook) are very inexpensive.  The external drives aren't that fast, but a backup you've set up to run late at night can finish by morning, and if/when you have a failure or loss of data.  And if you're really concerned with backup integrity, you can unplug an external drive and take it to another location.
    This stuff is kind of "motherhood and apple pie" but it's worth getting the word out I think.
    Your ideas?
    -Noel

    APC Back-UPS XS 1300.  $169.99 at Best Buy.
    Our power outages here are usually only a few seconds; this should give my server about 20 or 25 minutes run-time.
    I'm setting up the PowerChute software now to shut down the computer when 5 minutes of power is left.  The load with the monitor sleeping is 171 watts.
    This has surge protection and other nice features as well.
    -Noel

  • Best Practice for Servlets

    I guess I'm asking for most peoples' input on what I'm planning to do here ....
    Here's what I want to do, and know a bit about.
    o I want to make a servlet that serves only XML.
    o After that, I want to transform the XML into web pages, RSS feeds etc.. using XSLT.
    Here's what I'm not so sure about...
    o How should I implement the interface to the web-based aspects? Should the servlet be coded to display HTML pages on "GET" requests? Or should I use a pile of HTML files to make forms?
    o What do I use to perform the XSLT transformations? Where should the set of solutions be placed relative to my servlet? Would a user then access this solution rather than the servlet itself?
    o How do I code the servlet on one machine, and then test it on another without breaking the libraries? How do I set up any libraries I might have to use (like for XSLT transformations) on the server?
    Any other advice here? I'm sure this is done often, but I can't find a resource that explains the best practices for it all.
    I know this sounds like a lot of stupid questions. I've had lots of programs working with Java before, but I'm at a loss as to how I'm supposed to package libraries I use in my programs - moreso with a servlet. To make matters worse, I plan on using MySQL as the database.
    If there's some wizard on the forums here who's willing to say more than just "RTFM" (of which there is none to answer my questions together as one), I'd be very very happy ":^)

    Let me re-pose my question so as to be specific
    enough to not be picked apart in my answer.
    I want to FIRST AND FOREMOST, create a servlet that
    serves up XML based on parameters given to it (how?
    who cares.).What does "serves up XML" mean?
    Let's be precise. Do you intend the servlet to send the XML back to the client? Or is the XML an intermediate step in your processing? (Yes, it matters.)
    Then, I want to create interfaces (HTML, RSS,
    boogledeedoo) to this XML data by having either JSP,
    another servlet or insert something else here,
    transform the XML into whatever the desired format
    is."interface" is a loaded term in Java. What do you mean by it?
    >
    My assumption is that I'll make the servlet that is
    capable of outputting my desired XML data and then
    create another servlet that will poke it for data as
    needed to transform the XML into HTML. This servlet
    would also likely serve as the web site itself and
    would manage user logins etc...(persistance yaddy
    yadda)You're not thinking about this properly.
    "yadda yadda" == muddled thinking.
    My other assumption is that I'll make another servlet
    that will poke the XML servlet and transform that
    into RSS or anything else I can dream up.How does "poke the XML servlet" fit into the request/response protocol that is HTTP? Please explain.
    -=-!REASONING!-=-
    Previously, when I was working with PHP, I liked to
    make scripts that would display interfaces and post
    to themselves. OK, now I see. "interface" == GUI in a browser to you. Very good.
    You can create a JSP that is an interface. You can have that JSP submit the HTTP POST or GET request to itself. No problem there, as long as "itself" knows what to do with the request.
    It was a nice way of creating a
    complete little package. Everything for one function
    was encapsulated nicely under one roof. No excessive
    HTML files all over the place to nurture.A simple problem, a simple solution. You can do that with a JSP.
    Look. Part of my inability to describe this well is
    because I DO feel like I'm in a lot of directions at
    once. Or you don't understand the technology very well.
    But I have to be in order to pull together
    some sort of plan for myself. I understand many
    concepts and have just finished studying object
    oriented design etc..."Just finished"? How long did it take?
    I know things about how Tomcat does connection
    pooling for SQL connections.Great. Not much to understand there. It's harder to figure out how to do n-tier apps with more than one page well.
    I do know how to use Google, probably a lot better
    than most. But rest assured, I've yet to find a
    little guide as complete as any of the "LAMP" books
    there are out there. Which by the way, I have never
    purchased.That's because Java Enterprise Edition isn't intended for little problems. LAMP is. Maybe the limitation is that you are used to "little" problems and not bigger ones.
    If JEE seems scattered and complex, it's because it is. It encompasses more than LAMP.
    I'm confident in good guidance, and not a heartfelt
    smackdown. I'm still waiting for some clear suggestions.I gave you one, you just didn't know it: go read about Spring.
    http://www.springframework.org
    It'll help you structure complex apps from the user interface to the database in the back.
    You're welcome.
    %

  • What are the best practices for using the enhancement framework?

    Hello enhancement framework experts,
    Recently, my company upgraded to SAP NW 7.1 EhP6.  This presents us with the capability to use the enhancement framework.
    A couple of senior programmers were asked to deliver a guideline for use of the framework.  They published the following statement:
    "SAP does not guarantee the validity of the enhancement points in future releases/versions. As a result, any implemented enhancement points may require significant work during upgrades. So, enhancement points should essentially be used as an alternative to core modifications, which is a rare scenario.".
    I am looking for confirmation or contradiction to the statement  "SAP does not guarantee the validity of enhancement points in future releases/versions..." .  Is this a true statement for both implicit and explicit enhancement points?
    Is the impact of activated explicit and implicit enhancements much greater to an SAP upgrade than BAdi's and user exits?
    Is there any SAP published guidelines/best practices for use of the enhancement framework?
    Thank you,
    Kimberly
    Edited by: Kimberly Carmack on Aug 11, 2011 5:31 PM

    Found an article that answers this question quite well:
    [How to Get the Most From the Enhancement and Switch Framework as a Customer or Partner - Tips from the Experts|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c0f0373e-a915-2e10-6e88-d4de0c725ab3]
    Thank you Thomas Weiss!

  • Best Practice for Use of ABAP in Customizing SRM and/or CRM

    I was wondering if there is a document that defines best practices for the use of ABAP with the installation and customization of SRM and/or CRM.   Such as amount of ABAP coding typically required, and best practices around the use of ABAP for customization and configuration.
    Thanks.

    Hi, Johnson
    Sorry, Please don't mind, you are not at right place to ask the Question like this
    Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!!
    Thanks and Regards,
    Faisal

  • JSF - Best Practice For Using Managed Bean

    I want to discuss what is the best practice for managed bean usage, especially using session scope or request scope to build database driven pages
    ---- Session Bean ----
    - In the book Core Java Server Faces, the author mentioned that most of the cases session bean should be used, unless the processing is passed on to other handler. Since JSF can store the state on client side, i think storing everything in session is not a big memory concern. (can some expert confirm this is true?) Session objects are easy to manage and states can be shared across the pages. It can make programming easy.
    In the case of a page binded to a resultset, the bean usually helds a java.util.List object for the result, which is intialized in the constructor by query the database first. However, this approach has a problem: when user navigates to other page and comes back, the data is not refreshed. You can of course solve the problem by issuing query everytime in your getXXX method. But you need to be very careful that you don't bind this XXX property too many times. In the case of querying in getXXX, setXXX is also tricky as you don't have a member to set. You usually don't want to persist the resultset changes in the setXXX as the changes may not be final, in stead, you want to handle in the actionlistener (like a save(actionevent)).
    I would glad to see your thought on this.
    --- Request Bean ---
    request bean is initialized everytime a reuqest is made. It sometimes drove me nuts because JSF seems not to be every consistent in updating model values. Suppose you have a page showing parent-children a list of records from database, and you also allow user to change directly on the children. if I hbind the parent to a bean called #{Parent} and you bind the children to ADF table (value="#{Parent.children}" var="rowValue". If I set Parent as a request scope, the setChildren method is never called when I submit the form. Not sure if this is just for ADF or it is JSF problem. But if you change the bean to session scope, everything works fine.
    I believe JSF doesn't update the bindings for all component attributes. It only update the input component value binding. Some one please verify this is true.
    In many cases, i found request bean is very hard to work with if there are lots of updates. (I have lots of trouble with update the binding value for rendered attributes).
    However, request bean is working fine for read only pages and simple binded forms. It definitely frees up memory quicker than session bean.
    ----- any comments or opinions are welcome!!! ------

    I think it should be either Option 2 or Option 3.
    Option 2 would be necessary if the bean data depends on some request parameters.
    (Example: Getting customer bean for a particular customer id)
    Otherwise Option 3 seems the reasonable approach.
    But, I am also pondering on this issue. The above are just my initial thoughts.

  • Best practice for using messaging in medium to large cluster

    What is the best practice for using messaging in medium to large cluster In a system where all the clients need to receive all the messages and some of the messages can be really big (a few megabytes and maybe more)
    I will be glad to hear any suggestion or to learn from others experience.
    Shimi

    publish/subscribe, right?
    lots of subscribers, big messages == lots of network traffic.
    it's a wide open question, no?
    %

Maybe you are looking for

  • Trouble updating apps and wrong Apple ID's

    Hello, Our kids got three iPods at Christmas, and I had one already.  I set up my kids with 3 unique Apple IDs so they could have their own accounts for purchases, itunes cards, etc.  I have a Macbook Pro with one user account and one iTunes library,

  • Problem sync iCal with Nokia N95

    I´m trying to set up iSync to synchronize my iCal (MobileMe calendars) with Nokia N95 8 Gb. Contacts is synchronizing fine but when I try to click the check-box to define which calendars I want to sync I get this message: "Before you can synchronize

  • Windows 7 64 bit Dreamweaver CC 2014 & Lightroom 5: Trying to insert a lightroom web gallery into a template in Dreamweaver

    I am using a template for my website in Dreamweaver CC 2014. I installed a lightroom 5 web gallery into the template. I have an editable region where my main content goes that is where I inserted the web gallery. The main content css height is set at

  • Throws error on 4,0,3

    On tomcat 4,1,24 this code seams to work just fine. But when I deploy it on webserver, running tomcat 4,0,3 i�t wont work, any sugegstion, where the problem might be? package serverspy; import java.io.*; import java.util.*; import javax.servlet.http.

  • How do I get old versions of apps for my iphone3

    I gave my old iPhone 3 to one of my kids. He loved it but then it glitched so without thinking I restored it to factory settings. I hadn't realized that all the app versions were now gone and I had no copies of them. How can I get the old versions so