Images, ,js, .css   and jsp

Hi i've a problem, i wrote an application jsp based, each jsp produce an html file that contains tags <img, that link to .css and .js files, i added to my jsp the scriplet:
<%
response.addHeader("Cache-Control", "no-cache");
response.addHeader("Pragma", "no-cache");
response.addHeader("Expires","-1");
%>
to prevent caching into the Temporary Internet files, because i don't want to give the user my application, html files arn't cached but images, .css files and .js files are still cached.
What can i do to prevent this????
Thankk for all lbdb:

Thank you rameshinjava, i tested your solution but it does'n work i still view the .js,.css and .class(applet) file into the Temporary Internet Files directory.
can anyone give me one other solution?

Similar Messages

  • Integrating css and jsp

    Hi,
    I need a way to let my users custimize their view of the system Im currently developing. Right now I have most of the information about how the page looks in css files (using <link href="style.css" rel="stylesheet" type="text/css"> in order to fetch that information). The question I have is how to let jsp change the colors, fonts etc of the css. Is this only possible if I use include on the css instead of linking? Is there a program/metod developed to use? Should I build some classes which I can ask for the right style (e.g span style="<% StyleHandler.getTitleNormal() %>")?
    I guess there is a number of ways to handle this problem but I dont want to invent the wheel again. Help me out finding something making my work easier..;) Thanks in advance!
    /Lobtec

    Well, you could make the CSS file link be a link to a JSP page which could print out CSS instead of HTML, and it could dynamically print CSS values stored for the user on the server.
    <link href="style.jsp" rel="stylesheet" type="text/css">
    style.jsp:
    body {
      background-color:<%= session.getAttribute("bgColor") %>;
    }Of course, you might store the values in some object in the session read from a database or whatever, but I think you get the point.

  • I tried to display gif image from oracle to jsp but nothing appear

    i tried to display image from oracle DB to jsp directly without using file processing , and i used Servlet and jsp , Servlet to get image from DB and jsp to use <img> tag , when i Run Servlet code
    the image appaer on Microsoft Photo Editor , and when i run jsp the image dose not appear on jsp page , so please anyone has an idea about this broblem ,send the soluation or any information to my e-mail [email protected] , and I'll thankful about your help.
    the Servlet and jsp code are below .
    thank for your help
    Servlet:
    import java.io.InputStream;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    public class Servlet extends HttpServlet
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    response.setContentType("image/gif");
    int id = Integer.parseInt(request.getParameter("no"));
    // int id = 2 ; when Run Servlet .
    ResultSet rs = null;
    Connection Lcon = null;
    String stmt = " select Image from ImageTable where lmage_id ="+id;
    Statement sm = null;
    String data1 ="";
    try
    Lcon = getConntcion();
    sm = Lcon.createStatement();
    rs = sm.executeQuery(stmt);
    if(rs.next())
    InputStream in = rs.getBinaryStream(1);
    ServletOutputStream sout = response.getOutputStream();
    int c;
    while((c=in.read())!= -1)
    sout.write(c);
    in.close();
    sout.flush();
    sout.close()
    }catch(Exception e)
    System.out.println("error in selectValue the error is "+e);
    finally
    rs .close( );
    sm .close( );
    Lcon.close( );
    public Connection getConntcion()
    Connection con = null;
    try{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    con = DriverManager.getConnection(",,,,,,,, DB Info ,username and password ,,,,,,,,,,,");
    }catch(Exception e)
    System.out.println("error in connection the error is "+e);
    return con;
    Jsp code :
    <%@ page contentType="text/html"%>
    <html>
    <head
    </head>
    <title> testing image </title>
    <body>
    <form>
    <img src="servlet/Servlet?no=2">
    </form>
    </body>
    </html>

    InputStream in = rs.getBinaryStream(1);
    byte[] image= null;
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    byte[] buffer = new byte[8192];
    int bytesRead = 0;
    while ((bytesRead = in.read(buffer, 0, 8192)) != -1)
         baos.write(buffer, 0, bytesRead);
    image= baos.toByteArray();
    in.close();
    ServletOutputStream sout = response.getOutputStream();
    if (image != null)
           sout.write(image);
           sout.flush();
    }

  • Regarding  CSS and CLASS TAG.

    Hi Java People,
    I am basicaly an ABAPer , can anyone please tell me where is are attributes of the Tag CLASS defined in an HTML page?
    Basically i am working on BSP where we have to use Javascript along with ABAP.
    In the layout part of BSP i am not able to find the definition of the CLASS tag.
    Thanks in advance.
    Regards,
    Vevek.

    Dear Vivek,
                      This is the following example where you can use the CSS and JSP togeather...
    http://www.w3schools.com/css/tryit.asp?filename=trycss_background-color
    http://www.w3schools.com/css/css_examples.asp
    Jsp Examples to use CSS in Class Tags:
    <table class="table_bdr">
                        <tr>
                     <td class="datatxt">
                     <td><input type="text" name="assoid" value="" size="10" class="inputText_Full" /></td>
    Reward Points if useful

  • Css and RequestDispatcher problem

    I'm using JBoss + embedded Tomcat (not using apache
    yet in development).
    I have problem with JSP and css. My JSP includes css
    with this tag:
    <link rel="stylesheet" href="style.css" type="text/css">If I access the JSP directly from web-browser IE5
    to http://127.0.0.1:8080/myContext/fileName.jsp ,
    it's displayed correctly.
    However, if I let a servlet dispatch the JSP, the css didn't
    included somehow (browser displayed the JSP without css-formatting).
    RequestDispatcher dispatcher = getServletContext().
                             getRequestDispatcher("/fileName.jsp");
        if (dispatcher != null)
            dispatcher.forward(request, response);
        /* ... */I put css and JSP in the same subdir. Is this a Tomcat error, or
    I forgot to set something in the request object, or
    I need to append something to "/fileName.jsp"?
    Thanks in advance.
    Verdi

    Unfortunately, the solution I found was to "hardcode" the absolute path. For example:<link rel="stylesheet" href="<%= request.getContextPath() %>/style.css" type="text/css">There're another way I think may preserve the context
    path, that is to use response.sendRedirect. Problem with
    this approach is however, you can't embedd javabean
    as "attribute" cause attribute will be removed in the new request (of redirected jsp).
    -- Verdi March --

  • WCM_PLACEHOLDER Service does not show css and images

    Hi,
    I am trying to use WCM_PLACEHOLDER service to display contents created with Site Studio.
    But the format of the page is different from the original. Data file is ok but there is no image or CSS.
    Any help will be really appreciated..
    Thanks,
    Ali

    Hi,
    I can able to render the placeholder inside an ADF application but when I am going to edit mode (CTR+SHIFT+F5) it asking for login/password and after that it is not showing anything, just an error. My code is as below.
    ++++++++++
    OracleJSP error: java.io.FileNotFoundException:
    Set the init-param debug_mode to "true" to see the complete exception message.
    ++++++++++
    code:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:wcm="http://www.oracle.com/jsp/wcm"
    xmlns:custh="http://xmlns.oracle.com/adf/faces/customizable/html"
    xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelStretchLayout id="psl1">
    <f:facet name="center">
    <!-- id="af_one_column_stretched" -->
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl1">
    <af:outputText value="Testing wcm:placeholder" id="ot1"/>
    *<cust:panelCustomizable id="pc1">*
    *<jsp:include page="/SS.jspx"/>*
    *</cust:panelCustomizable>*
    </af:panelGroupLayout>
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    -------------

  • How do I scale a lot of images using CSS in HTML5 and CSS3

    I have a CSS image gallery that displays a larger photo with descriptive text below it, when a thumbnail image is hovered on.
    Each photo has code like that following:
    <a class="thumbnail" >
    <img src="thumbs1/paradethumbs/DSC_0073.jpg" alt="thumbnail picture" />
    <span><img src="pics1/paradepics/DSC_0073.jpg" alt=" " /><br /> 19 - a black faced sheep.</span>
    </a>
    The first source is a thumbnail,  image stored at a size of 72 by 48.
    The second source is an image stored at 600 x 400.
    When the thunbnail is hovered on, the larger photo is displayed at its full size using css.
    There are 20 or so thumbnails in this gallery, and different numbers in other galleries that use the same code.
    The example above is number 19 from 20.
    This works fine on tablets and larger displays.
    When I wish to show it on an Iphone or similar, with a display that is 480 or less wide, I need to scale the larger photo down to 300 wide.
    As the Iphone will have a lower quality of image than a larger display, it will not matter too much if the 600x400 photo is scaled down, and having tried it by giving it an ID with CSS like
    #imagescale{ width:300px; } it looks acceptable. However, as IDs are supposed to be unique, then thats a no go area for the remaining photos.
    My problem is how do I select the second image source shown in bold above, and scale it and the span text by 50%.
    The text is not too important as it can be changed to fit - the image is the main problem.
    I need someting like "if the display is less than 600 and the image is in the pics directory, display it at 300 wide".
    The browser will hopefully  take care of the height.
    Any suggestiosn would be appreciated.
    Howard Walker

    Thanks Nancy. The general idea and the link to the article helped a lot.
    However, the css using using a percentage had unpredictable results when selecting repeated images.
    The first one scales to 50% and then the next scales to 50% of the last one (25%)  and so on ad infinitum, unless you click on another object that is not an image.
    Using a pixel size like 280px rather than a percentage did the trick, but it also involved changing lots of other items before I could get everything to fit.
    Now I have a better knowledge of media queries and how to set them up.
    Best of all, all my image galleries work fine just using css and html. Never thought that would happen.
    Take five stars!
    And the same to David Powers for his great article.
    Howard Walker

  • How to use CSS and images in a plsql-dbms_output reports?

    Hi.
    Windows 2000 SP4
    SQL Developer 1.2.1.32.13
    Java 1.5.0_07
    Oracle 9.2.0.6
    I'm trying to create a plsql-dbms_output report with HTML that uses a stylesheet (CSS) and an image. These seem to be ignored by the report viewer.
    The following example works fine in Internet Explorer 6 but the stylesheet is ignored by the viewer and the viewer does not show the images (shows broken images instead). I've tried with various image types (PNG, GIF and JPEG).
    <!--
    begin
    dbms_output.put_line('<head><link rel="stylesheet" type="text/css" href="file://c:/temp/core.css"/></head><body>');
    dbms_output.put_line('<H1>This is Level-1 Heading</H1>');
    dbms_output.put_line('<H2>This is a Level-2 Heading</H2>');
    dbms_output.put_line('<p>This is regular paragraph text.</p>');
    dbms_output.put_line('<img src="file://c:/temp/fig01.png"><br>');
    dbms_output.put_line('<img src="file://c:/temp/fig01.gif"><br>');
    dbms_output.put_line('<img src="file://c:/temp/fig01.jpg"><br>');
    dbms_output.put_line('</body>');
    end;
    -->
    Is the HTML viewer limited to not support stylesheets and images?
    Thanks in advance.
    Cheers
    Finn Ellebaek Nielsen

    It also seems that links don't work. The mouse cursor changes to a hand when hovering over links and the links are shown in blue and underlined but nothing happens when clicking on them.
    Example:
    <!--
    <html>
    <head><link rel="stylesheet" type="text/css" href="file://c:/temp/core.css"/></head><body>
    <p>First heading</p>
    <p>Second heading</p>
    <H1 id="x1">This is Level-1 Heading</H1>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    a<br>
    <H2 id="x2">This is a Level-2 Heading</H2>
    <p>This is regular paragraph text.</p>
    <img src="file://c:/temp/fig01.png"><br>
    <img src="file://c:/temp/fig01.gif"><br>
    <img src="file://c:/temp/fig01.jpg"><br>
    <p>First heading</p>
    <p>Second heading</p>
    <p>Other document</p>
    </body>
    </html>
    -->

  • In fire fox and google chrome CSS and images are not loading

    I am facing problem with jrun, In IE-8 application is working fine, but in FireFox and Google chrome CSS and Images are not loading.
    in fire fox and google chrome requests are Aborted.
    thanks
    Ashok Gadiparthi.

    Check if Style Resource Readers SharePoint group has permissions on the site, permissions to the style library and make sure that this library provides Style Resource Readers with restricted read.
    If you don't see Style resource readers on the site, go to that library and set that permission.  you could also just load your installation media to a folder, and execute on setup.exe, select repair option.  This second option of the installation
    media is the cannon vs. flyswatter approach though, but it will work
    Stacy Anothersharepointblog.blogspot.com

  • Exporting "CSS and images (.htm.)" from Fireworks CS4?

    Is this an effective process for developing CSS based layouts? Are there any proven tricks to improve the quality of the resulting structure?

    It's a starting point, but it does not exempt you from understanding 
    XHTML and CSS. Currently there are some limitations to what the script 
    will export: it ignores additional states, javascript behaviors and 
    won't export more than 1 page at a time. Keep in mind this is just the 
    "first kick" and we'll no doubt see this feature embellished.
    I recommend that you download and read about the updated CSS and 
    Images export script, modified by Matt Stow. You can find the new 
    script and his article here:
    http://www.adobe.com/devnet/fireworks/articles/standards_compliant_design.html
    The article also provides some tips on how to best plan your designs 
    if you plan to use the script.
    HTH
    Jim Babbage
    NewMedia Services
    http://www.newmediaservices.ca
    Community MX Partner -
    http://www.communitymx.com/author.cfm?cid=1036
    Adobe Community Expert
    http://www.adobe.com/communities/experts/members/206.html
    Author - Lynda.com
    http://movielibrary.lynda.com/authors/author/?aid=188
    Author: Peachpit Press
    http://www.peachpit.com/store/product.aspx?isbn=0321562879

  • Problem in Retrieve Image from DB and display in the JSP page

    Hi All,
    I did one JSP Program for retriveing image from DB and display in the JSP Page. But when i run this i m getting "String Value" output. Here i have given my Program and the output. Please any one help to this issue.
    Database Used : MS Access
    DSN Name : image
    Table Name: image
    Image Format: bmp
    Output : 1973956
    Sample Program:_
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.io.*" %>
    <%
         try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection conn = DriverManager.getConnection("jdbc:odbc:image");
              Statement st = conn.createStatement();
              ResultSet rs = st.executeQuery("SELECT images FROM image");
              String imgLen="";
              if(rs.next()){
                   imgLen = rs.getString(1);
                   out.println(imgLen.length());
              if(rs.next()){
                   int len = imgLen.length();
                   byte [] rb = new byte[len];
                   InputStream readImg = rs.getBinaryStream(1);
                   int index=readImg.read(rb, 0, len);
                   System.out.println("index"+index);
                   st.close();
                   response.reset();
                   response.setContentType("image/jpg");
                   response.getOutputStream().write(rb,0,len);
                   response.getOutputStream().flush();
         }catch(Exception ee){
              out.println(ee);
    %>
    Thanks,
    Senthilkumar S

    vishruta wrote:
    <%
    %>Using scriptlets is asking for trouble. Java code belongs in Java classes. Use a Servlet.
                   out.println(imgLen.length());Your JSP was supposed to write an image to the output and you wrote some irrelevant strings to the output before? This will corrupt the image. It's like opening the image in a text editor and adding some characters before to it.
                   byte [] rb = new byte[len];Memory hogging. Don't do that.
              out.println(ee);You should be throwing exceptions and at least printing its trace, not sending its toString() to the output.
    You may find this article useful to get an idea how this kind of stuff ought to work: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • Help on Fireworks Css and Images Export mess

    Hi,
    After slicing up my design and export using 'css and images' the slices are all in the wrong places.
    Further more the formatting on the main text section has disappeared and the button from the main section is missing.
    Rather unpredictable!
    Hopefully there is a simple fix to all this
    Thanks

    If you go to Pages and make a duplicate (from this page export just the Booking button as an image
    Back to page 1. add slices for top navigation
    add a slice over text area
    In PI change Slice Type to HTML
    Export as CSS and images
    In DW place the button and add link.
    Paste text into content area (now HTML instead of an image)
    You'll need to tweak styles to fix margins
    BUT - this is NOT the way to make a website. It is all images and search engines can't read an image and it takes too long to load. It's not search engine friendly at all. If it's comping purposes the ignore the rant :-)

  • Css and images are not loading in SharePoint website

    Scenario:-
    System Configuration- Windows server 2008 R2, SharePoint Designer 2010, SP server 2010 all are in Local Machine.
    1. I had reset the Windows server 2008 R2 password and opened SharePoint Designer 2010.
    2. Opened previous working site and found error- services unavailable- HTTP Error 503. The service is unavailable
    3. For this issue, I reset  (as I reset for windows server) the Identity password in App pool for "SharePoint Central Administration v4" application.
    4. The error "Service Unavailable" got vanished.
    But encountered new problem - .css and images are not loading. 
    5. I re run "Product Configuration wizard" with below steps:-
    A) Do not disconnect from this server.
    B) No, this machine will continue to host the website
     Still Problem persisting.
    What tried:-
    1. Resetting IIS Server.
    2. Restarted SharePoint Admin Services from "Service window".
    3. Recycled App pool.
    Just do let me know for further information.
    I have Checked so may forum and sites but no solution :(
    Looking for excellent resolution :)

    Check if Style Resource Readers SharePoint group has permissions on the site, permissions to the style library and make sure that this library provides Style Resource Readers with restricted read.
    If you don't see Style resource readers on the site, go to that library and set that permission.  you could also just load your installation media to a folder, and execute on setup.exe, select repair option.  This second option of the installation
    media is the cannon vs. flyswatter approach though, but it will work
    Stacy Anothersharepointblog.blogspot.com

  • Css and images not working on 3rd party server

    Hello,
    I have read the previous posts on this subject, but found no resolution.
    I can confirm that the CSS and images were uploaded to Media Temple.
    The permissions are set to "read"
    I didn't change any of the file structures. uploaded as it was output by Muse.
    Any new thoughts?
    Thanks a bunch.
    -keith.

    I'm back.
    Okay Zak thanks...
    what browser?
    on Safari the html shows up but no styling and the image frames show up but empty.
    On fox same thing except no image boxes even.
    I have a support request in with MT so I will see what they have to say.
    Thanks a bunch and I promise to update any info I gather from them.
    -Keith.

  • Flex Library Project(SWC) with css and image assets

    HI,
    I want to create a flex library project with images and css. I shall use that swc with other flex applications. I wand to use those css and images from the swc. Is it possible? Can you please explain in detail.
    Thanks
    Nirmal

    Right... but how do I reference that CSS outside of the
    Libray Project?
    All I want my library project to be is a CSS and images
    Then I want to include that library project in my main
    project, and have the main project call the CSS file inside the
    library project

Maybe you are looking for

  • 500 GB DVR...*still* haven't received message about ordering it, been *WEEKS* now

    I've put myself on the list to be notified when it will be available, and still haven't gotten email to upgrade.  I signed up right when it first became available to do so, and this was several weeks now.  Anyone know why it's taking so long, and whe

  • I need help with automator work flows

    im having troube adding songs to my itunes with autmator i ke getting error mesaage 1752 ...anyine know how i can resolve this issue ?

  • Word compatibility for RH8?

    I've been using RH X5.02 (Build 801) for some time. I frequently create printed documentation using Microsoft Word 2003. Recently, our tech support team finally decided to upgrade us all to Office 2007. Of course, now RH won't create printed document

  • Does Adobe Acrobat Professional 8 works fine on Windows 2008 64-bit R2 server?

    Hi, Currently, we use Adobe Acrobat Professional 8.1 on Windows 2003 server.  We mainly use the Distiller to convert PDF files. If we migrate the 2003 server to Windows 2008 64-bit R2 server, does version 8.1 works fine? If not, which version support

  • Forum Search could be better

    When you search for a keyword in the forum it seems to be searching each posting rather than each discussion thread. This can be very inconvenient if 20 search results point to the same discussion thread or page. I hope this gets corrected. Thanks.