How-to protect static content

Hi !
I have a site with many files (pictures, XML files, etc)
How can I protect those content from unauthorized access / sniff ?
I was thinking in two options
1) a filter servlet, validating sessions permissions etc
2) a servlet to write out the files (...)
Any other suggestion? best practice?
Regards
Joe

Actually yes each server has its own realm implementation but it is all configured and handled by the server and does not affect the portability of the application.
How to protect the static pages is dependant on how you allow access to your web application.
If you don't have any security in the web app you then put any files that you don't want accessed in the browser in the WEB-INF folder. Images and other files that are accessible in the browser you put in folders with an index page to prevent users from seeing the directory structure.
If your application uses server managed security you include you use this security to manage access to the files.
If you are using application based security then you go with a filter.

Similar Messages

  • I lost my i pad while in my tour how to protect my content in i pad

    i lost my i pad while in my tour how to protect content in i pad

    If the iPad was running iOS 7, the thief/finder will not ever be able to use it.
    iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818http://support.apple.com/kb/HT5818
    Apple (and no one else) can not assist (with serial number or iCloud) in finding a lost or stolen iPad.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipadhttp://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526http://support.apple.com/kb/ht2526
    What to do if your iOS device is lost or stolen
    http://support.apple.com/kb/HT5668http://support.apple.com/kb/HT5668
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698http://support.apple.com/kb/PH2698
    iCloud: Lost Mode - Lock and Trace
    http://support.apple.com/kb/PH2700http://support.apple.com/kb/PH2700
    iCloud: Remotely Erase your device
    http://support.apple.com/kb/PH2701http://support.apple.com/kb/PH2701
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.phphttp://www.stolen-property.com/report-stolen-ipad.php
    General steps to follow for a Stolen iPad
    http://stolen-ipad.com/http://stolen-ipad.com/
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.htmlhttp://www.ehow.com/how_7586429_stolen-ipad.html
    What NOT to do if your iPhone or iPad is lost or stolen
    http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-sthttp://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st Len
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.htmlhttp://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-numberhttp://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061http://support.apple.com/kb/HT4061
     Cheers, Tom

  • How to protect table content?

    Hello
    how could I protect the content of a JTable from changing by the user? Recommended is that I could click the serperated rows. This I've just implemented by using rowlistener. But how do I protect now the table content?
    thank you

    JTable ask its model ----
    public boolean isCellEditable(int rowIndex, int columnIndex){
    return false;

  • Websites and AirPlay - How to view static content?

    We want to use the iPad to show clients various websites (static content not video) and for that content to be shown on a larger screen. I thought that I could do this through AirPlay but from what I've read this isn't possible.
    Does anyone know of a way to do this or an app that allows us to do this?
    Many thanks

    Welcome to the Apple Community.
    (First of all may I thank you for my recent dividend, I hope they're going to get a little higher though)
    If the static content is pictures or photographic, you can use the photo feature of the Apple TV rather than websites. If however your content is indeed web pages, take note that web pages with text in any case do not display well on a TV and you'd be much better investing in a large monitor to show your clients such websites.

  • Static content in iAS 6.5 (for JavaWebstart)

    Hello,
    I'm using iAS 6.5.
    I want to serve a jar file for JavaWebstart in a J2EE App (including a war file)
    That works, but it tooks a very long time before Webstart is loading this Jar and it is fully reloaded every time i access that App from Webstart.
    When I put this jar file into the iPlanet Webserver it is loaded much faster and will not be reloaded every time i access this jar file with Webstart.
    1. Is it possible to serve static content in iAS that Webstart is not fully reloading every time, instead of only checking the header informations for a newer version?
    2. Can you give me a link to an iPlanet documentation about how to handle static content iAS/iWS !
    3. Will be the iPlanet Webserver Settings (e.g. KeepAlive) ignored, when i run Webcontent from the Applicationserver (../NASApp/...)?
    Kinds
    Regards

    JAX-RPC, JAX-M and other JAX-x are tested with JDK 1.3.x and higher. Since iAS 6.5 uses jdk 1.3.1, I think JAX-RPC, JAX-M can be used in iAS 6.5. -Officially, as far as I know, iAS 6.5 does not provide any support for JAX-pack.
    Sun ONE AS 7 fully supports JAX-pack, and it has a tool, XRPCC, (now wscompile and wsdeploy) which generates stubs, ties and WSDLs for the services. Also the same tool can be used to generate the stubs, client side artifacts, from any WSDL file.
    And also JAX-run time provides SOAP 1.1, UDDI v2 Registry access and WSDL support. Interoparability between JAX-Run time and other SOAP 1.1 implementations is also tested successfully.
    There are several third partly tools available from different vendors (around 10-12), you may wish to search for them in google. And with that you may generate WSDL for your Apache SOAP services.
    If you are planning to have a standalone web services client, then you can directly use JWSDP at the client side to communicate with the Apache SOAP services on the iPlanet Application Server 6.5.
    Please get back for any further assistance.

  • I work in a public library and we have two ipod touch and two ipod nanos we would like to circulate for our patrons. Any advice on how we can do this? Should we allow patrons to set the device up for personal use or download static content?

    I work in a public library and we have two ipod touch and two ipod nanos we would like to circulate for our patrons. Any advice on how we can do this? Should we allow patrons to set the device up for personal use or download static content?

    With the Nanos, you should have no problem lending them loaded with audiobooks from Librivox, etc.
    As for the iPod Touches, I'm not sure the question is whether you should allow patrons to set up the device for personal accounts, but whether you can prevent them from doing so. Prepare to to a factory restore every time one is returned.

  • How to cache a content item like a Static HTML Page from UCM to Coherence/C

    Hi All,
    How to cache a content item like a Static HTML Page from UCM to Coherence/Coherence Web?
    Thanks

    Hi,
    Could you explain your use case in more detail?
    It does not look like proper use of coherence to cache static content - it more suited for dynamic content like user session etc.
    Adam

  • How can I get the value for static content of 1 jsp into another jsp

    Hi, I have a jsp which have a header ,now i want this header value in another jsp dynamically.Can u tell me how I can do it?

    What I want to know is that , is it possible to get the value of a static content of one jsp into another jsp,something like getParameter() method that we use to get the value of a field in the jsp to a servlet,or to another jsp,the only difference here is I do not have a field here but a static jsp content .

  • How to configure Apache to serve static content? Please Help

    Hi Guys,
    I have a set of servers that are:
    - Apache acting as a Load Balance;
    - Admin Server;
    - A cluster with 2 managed servers.
    I have a web application deployed on my cluster, but I would like that the static content would be delivered by the Apache.
    How should I do it?
    Thanks in Advance

    Hi Daniel,
    A Reverse Proxy could do this but keep in mind that the primary goal of the RP is to shield your back channel infrastructure IP/access from either Internet or your private network e.g. secure your back channel infrastructure with a Firewall and expose it only to your Reverse Proxy infrastructure; quite effective for DoS type of attack.
    Apache can be configured to do both static content as well as Reverse Proxy.
    Regards,
    P-H
    http://javaeesupportpatterns.blogspot.com/

  • URGENT !!! How to fecth the content of the mail

    HI All,
    I having a problem regarding how to fetch the body of the mail as well as attachment of the mail.
    i get sender name, subject but i having the problem how to fetch the content of the mail.
    i used
    System.out.println(message[msgno].getContentType());
    but it showing
    javax.mail.internet.MimeMultipart@480457
    it won't showing the content.
    How can i fetch the content !!!!
    Please help
    I fetching accessing the mail server using "imap"
    By
    Ravi
    email : [email protected]

    Code which i used
    import java.io.*;
    import java.util.Properties;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.lang.*;
    import java.lang.Object;
    public class GetMessageExample
         public static void main(String args[]) throws Exception
              String host = "...";
              String username = "....";
              String password = ".....";
              // Create empty properties
              Properties props = new Properties();
              // Get session
              Session session = Session.getDefaultInstance(props, null);
              // Get the store
              Store store = session.getStore("imap");
              // Connect to store
              store.connect(host, username, password);
              // Get folder
              Folder folder = store.getFolder("INBOX");
              // Open read-only
              folder.open(Folder.READ_ONLY);
              // Get directory
              Message message[] = folder.getMessages();
              for (int i = 0, n = message.length; i < n; i++)
                   // Display from field and subject
                   System.out.println("From : "+message[0].getFrom()[0]);
                   System.out.println("Subject :"+message[0].getSubject());
                   // Display message content     
                   System.out.println("ContentType :"+message[0].getContentType());
                   System.out.println("Content :"+message[0].getContent());
              // Close connection
              folder.close(false);
              store.close();
    i got this output :
    From : Ravi Lal <[email protected]>
    Subject :Testing
    ContentType :multipart/alternative;
    boundary="----=_Part_63386_12145160.1189402168311"
    Content :javax.mail.internet.MimeMultipart@480457
    As i having only one mail in my inbox.
    I able to fetch everything from, subject but i fails to get the content i.e text of the mail.......
    What i do ????????
    !!! Help Me !!!
    Ravi
    Edited by: Ravi_InSun on Sep 13, 2007 10:51 AM

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • How to create custom content placeholder in sharepoint 2013

    Hi, I would like to create custom content placeholder don't know how to and add to my custom master page in sharepoint 2013. I have no luck searching on how to create custom content placeholder, any help?
    Thanks,
    Johnweb

    Hi,
    If you’re not fixed your requirement with the Out of the box SharePoint place holders, you can create as many as you want as long as the ID doesn’t conflict. On the master page add the content place holder 
    <asp:ContentPlaceHolderid="CustomName" runat="server"></asp:ContentPlaceHolder> and add this to your page layout
    <asp:Contentrunat="server" ContentPlaceHolderID="CustomName"></asp:Content>.
    I suggest you provide your basic requirement for further research.
    If you want to customize a master page, the Rajendra's method would be helpful.
    Best Regards,
    Dennis Guo
    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]

  • How to display the content of a BLOB column in a ADF/BC pages ?

    How to display the content of a BLOB column in a ADF/BC pages ?
    There is some image in database table blog column. And we want to display image on the screeen.
    There is some example about upload and dowload blog columns.
    (steve not yet document example page etc...)
    But We want to display blog picture in a image component...
    is there any basic way to do it ?
    Thanks a lot...

    Ali,
    You could just download the sample app... but... here is the servlet code from the demo (look at it just for technique - you'll obviously have to change it for your needs)...
    John
    package oracle.fodemo.storefront.servlet;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    import oracle.jbo.domain.DBSequence;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.ViewObjectImpl;
    public class ImageServlet
      extends HttpServlet
      private static final String CONTENT_TYPE =
        "image/jpg; charset=windows-1252";
      public void init(ServletConfig config)
        throws ServletException
        super.init(config);
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType(CONTENT_TYPE);
        response.setContentType(CONTENT_TYPE);
        String detailProductId = request.getParameter("detail");
        String thumbnailProductId = request.getParameter("thumbnail");
        boolean thumbnail = true;
        String productId = null;
        OutputStream os = response.getOutputStream();
        String amDef = "oracle.fodemo.storefront.store.service.StoreServiceAM";
        String config = "StoreServiceAMLocal";
        ApplicationModule am =
          Configuration.createRootApplicationModule(amDef, config);
        ViewObjectImpl vo =
          (ViewObjectImpl) am.findViewObject("ProductImages"); // get view object (the same as used in the table)
        if (detailProductId != null)
          productId = detailProductId;
          thumbnail = false;
        else
          productId = thumbnailProductId;
        vo.defineNamedWhereClauseParam("paramThumbnail", null, null);
        vo.defineNamedWhereClauseParam("paramProductId", null, null);
        vo.setWhereClause("DEFAULT_VIEW_FLAG = :paramThumbnail AND PRODUCT_ID = :paramProductId");
        vo.setNamedWhereClauseParam("paramThumbnail", (thumbnail? "Y": "N"));
        vo.setNamedWhereClauseParam("paramProductId", productId);
        vo.executeQuery();
        Row product = vo.first();
        BlobDomain image = (BlobDomain) product.getAttribute("Image");
        InputStream is = image.getInputStream();
        // copy blob to output
        byte[] buffer = new byte[10 * 1024];
        int nread;
        while ((nread = is.read(buffer)) != -1)
          os.write(buffer, 0, nread);
        os.close();
        vo.setWhereClause(null);
        vo.removeNamedWhereClauseParam("paramProductId");
        vo.removeNamedWhereClauseParam("paramThumbnail");
        Configuration.releaseRootApplicationModule(am, false);
    }

  • How to organize the content of MANIFEST.MF

    Most of the jar files contain a file named META-INF/MANIFEST.MF, and it provides some information about the class in the jar files, but when I execute the code below, I can't output all of the jar file name in the eclipse project's classpath.
    import java.net.URL;
    import java.util.Enumeration;
    public class TestClassLoader {
    public static void main(String args[]) throws Exception {
    Enumeration<URL> en = TestClassLoader.class.getClassLoader().getResources("META-INF");
    while (en.hasMoreElements()) {
    URL metaInf = en.nextElement();
    System.out.println(metaInf.toExternalForm());
    So I want to know how to organize the content of MANIFEST.MF file to output the file name

    getResources doesn't do what you apparently think it does. The resource path still has to be an exact match, but getResources allows for the possibility that the same resource path may occur multiple times on the class path.
    You could use it to access all the MANFEST.MF files on the classpath but you'd need to full resource path "META-INF/MANIFEST.MF"
    The code you've written doesn't access the contents of the manifests, of course. To access the contents of manifests use java.util.jar.Manifest objects.

  • Web Dynpro ABAP: How to access the content of a mime object?

    Hi everyone,
    does anybody know how to access the content of a mime object of a Web Dynpro component? I added a XML file as mime object to a web dynpro component. Now I want to read the content of this xml file within a method of the component controller. The code would look something like:
    DATA: xml_content type xstring.
    xml_content = read_mime_object("test_123.xml").
    Any ideas?
    Regards,
    Nils

    dude here's the modification that i've done but I can't still access the content of the properties...
               Mail mail = new Mail();
               String message2 = sqlException.getMessage();
               File file = new File("Add.properties");
               Properties props = new Properties();
               props.load(new FileInputStream(file));
               String[] emailadd = {props.getProperty("emailadd","defaultValue")};
               mail.postMail(emailadd,"An error has occurred, Auto-archive was unsuccessful.", message2,"[email protected]");
               Message was edited by:
    ryshi1264

Maybe you are looking for

  • How to use registrati​on-free COM with TestStand

    We create several different test programs run by TestStand. The sequence typically calls a function in a .NET dll that in turn calls functions in COM objects. We would like to use registration free COM to isolate the programs from each other but I'm

  • After creating a contained database, getting a login failure error while trying to connect to it.

    After creating a contained database and a user with passowrd under the same database, I tried connecting to the contained database. I entered the server name, login credentials and went to the connection properties tab to select the contained databas

  • Auto commit

    I wrote an insert statement in a procedure and calling it by insert-statement in the programming unit. The problem is I want to show on the same form once the data is inserted, but due to some problem exception is comming. so can any one suggest how

  • BPS Variable

    Dear All, I am using 2 variables in a planning layout: MEMBER (INTUSE in the code) and DEPARTEMNT (INTDEPT1 in the code). MEMBER must be filled based on the value of DEPARTEMENT. And for this I created a user exit. In the web page I will have 2 drill

  • IMic and OS X

    I picked up an iMic a couple of weeks ago. And set up was a snap. Shows up in System Prefs / Sound, with the level control. And sound was fine. I haven't used it in about a week and half. And couple of days ago, it no longer works properly (used it w