How to display the image while set custom header "x-content-type-options" as "nosniff" in web.config
Hi,
I am using Microsoft ASP.NET TreeView control where I have bound embedded images. Also I have set custom header “x-content-type-options” as
“nosniff” in web.config file.
On hosting the sample containing the above mentioned things in SERVER machine, the images are not visible but its working properly while running sample in local (development) machine.
Kindly provide a solution and find the sample in the below link.
http://goo.gl/6uR2b0
Thanks,
Alagarsamy D.
Hi AlagarBala,
Your issue is related to asp.net/web technology and for a better support on this please post your question to the asp.net forum below, this forum is for C# code issues in speicific:
http://forums.asp.net/
Regards,
Fouad Roumieh
Similar Messages
-
How to display the image which in KM folder using url iview
Hi Friends
How to display the image, which is under KM folder structur using the url iview.
i trying using url iview url as \document\testfolder\abc.jpg as url for the iview.
but its now working .. so please help me how to slove this problem
If is not the correct way then please suggest me best way to achive this.
Thanks
MukeshHi Mukesh,
I think this may work,
1, Create a HTML Layout.
You can put your image wherever u want with HTML Codes.
Check this, [Article|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3915a890-0201-0010-4981-ad7b18146f81] & [Help|http://help.sap.com/saphelp_nw04/helpdata/en/cc/00c93e9b2c3d67e10000000a114084/frameset.htm]
With this, u can use the standard KM commands also.
2, U need to use KM Navigation iView for this rather than KM Doc iView.
3, In the Nav iView, u can use &rndLayoutSet=nameOfUrHTMLLayout to force the view with this new layout.
Regards
BP -
How to display the Image in PDF report by using iText Report
Hi
Im trying to display the image which is very big one.
This is my code
Document document=new Document();
PdfWriter.getInstance(document,new FileOutputStream("imagePDF.pdf"));
document.open();
Image image = Image.getInstance ("1.bmp");
document.add(new Paragraph("Images in PDF"));
document.add(image);
document.close();
But the image "1.bmp" is displayed partially. Its not spanning to the next page.
Can anyone help me to solve this one?
Thanks in Advance
dhilipDo you actually want the image to span multiple pages? I am not sure that will be possible without splitting the image; the itext mailing list would be the place to ask.
You could make the the page size big enough for the image using Document.setPageSize() -
How to display the images in the custom pluggable navigation.
Hi,
I have created a custom pluggable navigation and i need to show my custom images for the tabs in the primary navigation. where do i need to put my images and how will i need to render the images. Any thoughts will be helpful.
Thanks in advance - Emmanuel1- put your images in a directory under the web app directory. Example: app/images/
2- in your jsp, use: String file = application.getRealPath("/images/"); to get the images directory. See http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
3- it's not the right forum to post this kind of question. Post them in the JSP/Servlet JSTL forum instead -
How to Display the Image Rather Than the Link of a Dreamweaver Record From the Database
I wanted the image rather than the link to appear on my page. The link is from my database which is
imported from a .csv file.You use the link as the value of the src attribute of an <img> tag:
<img src="<?php echo $row_getDetails['image_link']; ?>" alt="My image"> -
How to display the portal iView in Favorites screen without content role
Hi,
I created some T-iView containing some Z-report. Now my requirement is without giving any portal role how it will display in portal favorite screen(left side of the portal main screen) so user can directly see the preview of the iview containing customize report?
Thanks,
Kundan
Edited by: Kundan Babu1 on Sep 8, 2009 1:04 PM
Edited by: Kundan Babu1 on Sep 8, 2009 1:06 PM1) first check your portal desktop which frame work it is using.
By default we use default framework page.
It can be found in the path Content admin->portal content. in pcd content navigate to content provided by SAP-> end user content
There you can find the default framework page
open that and check the desktop inner page and click open
remove the portal favorites iviews and put your own iview there.
My suggestion is make a copy of your default framework page and customize it and use this framework page in the portal desktop
Search for customizing the default framework page and desktop in SDN. you will get lot of links
Here is the help link to know more on default framework page
http://help.sap.com/saphelp_nw04s/helpdata/en/b4/771158e4cb4bf6af9974380948db86/frameset.htm
Raghu
Edited by: Raghavendranath Garlapati on Sep 8, 2009 2:29 PM -
Display the login User ID on Header in Business Objects XI R3.1 Infoview
In XI R2 Infoview- the login user ID is displayed on header. However In XI R3.1 infoview- displayed Business Objects Logo on the same place of the Header. We noticed that In BO XI3.1 infoview the login user ID is displayed on header. However the Business Objects logo is displayed on top of the user ID so the user ID is hidden. while Setting the Infoview Application properties in CMC (CMC>Applications>Infoview Application Properties> check Do not display logo) then it will hide the logo and then next login displays the login user ID. Could someone please confirm is it the solution with this configuration or else please help us how to display the user ID on Infoview Header.
Hey,
What you did is exactly correct.
Now you did on XI-R2 and 3.1 right??, whenever you got upgrade to next release of BO version again you have to do the same changing of properties. Which should not be dynamic based on your previous changes on earlier versions.
Thank You!! -
HT4623 We're sorry, we are unable to continue with your activation at this time. Please try again later, or contact customer care.----How to fix this issue while setting up the iphone for the new ios?
If you don't have a SIM card in the phone, you must put one in. It's required for activation.
If you do, then your phone was probably hacked to unlock it from the original carrier. Contact them and see if they will unlock it. If they will not do so, then you can't use that phone. -
How can i call this file path into my bsp-html to display the images?
Hi
I have a file path for an image like c:/test_logo.bmp.
How can i call this file path into my bsp-html to display the images?
moosaTry this...
Can i have sample code in BSP-HTML to display images? -
Hi,
I have : - IMAQ1394 2.0.1
- NI Vision 7.1
In VB, I can Snap/Grab Image from 1394 camera and display the Image in CWIMAQVIEWER :
Dim Image0 As New CWIMAQImage
imaq1394SnapCW(sid0,Image0)
CWIMAQViewer1.Attach Image0
Now,How can I do this in VC++6.0?
I tried:
C_CWIMAQImage m_imgViewer1;
m_imgViewer1 = m_CWIMAQVision1.CreateCWIMAQImage();
m_CWIMAQViewer1.Attach(m_imgViewer1);
imaq1394SnapCW(Sid,m_imgViewer1); <--there is no "imaq1394SnapCW "function in VC++,why?
Please help me!
Thank you!For people looking back at these old posts regarding
CWIMAQViewer - it was not made to be used in the C environments and is made
for VB.
Refer to the following locations for displaying images in C
environments:
Start»All Programs»National Instruments»Vision»Documentation
Start»All
Programs»National Instruments»Vision»Text Based Examples
Make
sure that you look at the examples and documentation that is in
reference to the C environments not the VB environments
Vince M
Applications Engineer -
How to display an image from database
Hi all,
I've saved an image(jpeg file) as BLOB item in the database through the forms.I need to fetch that particular image from the database and display the image in the report.How can i do that?
I tried to fetch the column from the database and added a text item and selected the PHOTO column , the properties has changed once i selected the BLOB item.File format I changed to Image , But the width is 4 and I'm not able to change that.
While executing I'm getting two errors,
REP : 0069 Internal Error
REP : 62203 Internal Error reading the image - Unable to render RenderedOp for this operation
Please help me to solve this issue.
Thanks in advance...Hello,
Try to revert to the "old" way to render images :
http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/envvars/envvar_reports_default_display.htm
To revert to the dependency on DISPLAY and use screen fonts (old font look up algorithm):
Set REPORTS_DEFAULT_DISPLAY=NO.
Remove the screenprinter.ppd entry in the uiscreenprint.txt file.
Set the DISPLAY variable to the active X-Windows display surface.
Regards -
How to access the images stored in folder which is kept inside theapplicati
Iam new to java..
I want to display the images (.jpeg,,.gif, flash) which are kept in one folder
Using Jsp...
Its Executing fine in local system..
Its not working 1)when i execute that jsp from other system
2)if i give the full url then only its executing in local system
Please help me...
thanks in advance...
by Priya
<%@ page import="java.io.*"%>
<html>
<head>
<title>Movie Details</title>
</head>
<body text="#000000" bgcolor="#FFFFFF">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber1">
<%
File f=new File("..E:\application\Images");
File []f2=f.listFiles();
for(int ii=0;ii<f2.length;ii++)
if(f2[ii].isFile())
String fname=f2[ii].getPath();
%>
<tr>
<td width="87%"><%=fname%> </td>
<td width="14%"><img border="0" src="<%=fname%>" width="150" height="100" ></td>
</tr>
<%
System.out.println(f2[ii].getPath());
%>
</table>
</body>
</html>Hi,
Well i guess a Simple concept of a image servlet can cater your requirement here.
checkout the below example of how to do it
Configurations needed in /WEB-INF/web.xml:
<servlet>
<servlet-name>ImageServlet</servlet-name>
<servlet-class>com.ImageServlet</servlet-class>
<init-param>
<param-name>backupFolderPath</param-name>
<param-value>E:/application/Images</param-name>
<!--Could use any backup folder Available on your Server and make sure we place a image file named noImage.gif which indicates that there is no file as such-->
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>DownloadServlet</servlet-name>
<url-pattern>/Image</url-pattern>
</servlet-mapping>
ImageServlet.java:
package com;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
*@Author RaHuL
/**Image Servlet
* which could be accessed Image?fid=fileName
* or
* http://HOST_NAME:APPLN_PORT/ApplnContext/Image?fid=fileName
public class DownloadServlet extends HttpServlet{
private static String filePath = new String();
private static boolean dirExists = false;
public void init(ServletConfig config){
// Acquiring Backup Folder Part
filePath = config.getInitParameter("backupFolderPath");
dirExists = new File(filePath).exists();
private void processAction(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{
// getting fileName which user is requesting for
String fileName = request.getParameter("fid");
//Building the filePath
StringBuffer tFile = new StringBuffer();
tFile.append(filePath);
tFile.append(fileName);
boolean exists = new File(tFile.toString()).exists();
FileInputStream input = null;
BufferedOutputStream output = null;
int contentLength = 0;
// Checking whether the file Exists or not
if(exists){
try{
// Getting the Mime-Type
String contentType = this.getContentType(tFile.toString());
input = new FileInputStream(tFile.toString());
contentLength = input.available();
response.setContentType(contentType);
response.setContentLength(contentLength);
String contentDispo = "";
try{
contentDispo = request.getParameter("coid");
}catch(Exception exp){
if(contentDispo != null && contentDispo.equals("69125"))
response.setHeader("Content-Disposition","attachment;filename=\""+fileName+"\"");
this.exportFile(input,response.getOutputStream());
}catch(Exception exp){
exp.printStackTrace();
this.getServletContext().log("Exception Occured:"+exp.getMessage());
throw new ServletException(exp.getMessage());
}else{
try{
// Getting the Mime-Type
String contentType = this.getContentType(filePath+"noImage.gif");
input = new FileInputStream(filePath+"noImage.gif");
contentLength = input.available();
response.setContentType(contentType);
response.setContentLength(contentLength);
this.exportFile(input,response.getOutputStream());
}catch(Exception exp){
exp.printStackTrace();
this.getServletContext().log("Exception Occured:"+exp.getMessage());
throw new ServletException(exp.getMessage());
/** Gets the appropriate ContentType of the File*/
private String getContentType(String fileName){
String url = java.net.URLConnection.guessContentTypeFromName(fileName);
if(url == null)
return "application/octet-stream";
else
return url;
or one may use
return new javax.activation.MimetypesFileTypeMap().getContentType(fileName);
NOTE: Do not forget to add activation.jar file in the classpath
/** Prints the Image Response on the Output Stream*/
private void exportFile(InputStream input,OutputStream out) throws ServletException,IOException{
try{
output = new BufferedOutputStream(out);
while ( contentLength-- > 0 ) {
output.write(input.read());
output.flush();
}catch(IOException e) {
e.printStackTrace();
this.getServletContext().log("Exception Occured:"+e.getMessage());
throw new IOException(e.getMessage());
} finally {
if (output != null) {
try {
output.close();
} catch (IOException ie) {
ie.printStackTrace();
this.getServletContext().log("Exception Occured:"+e.getMessage());
throw new IOException(ie.getMessage());
/** HttpServlet.doGet(request,response) Method*/
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{
// Calling respective Action Method to Provide File Service
this.processAction(request,response);
/** HttpServlet.doPost(request,response) Method*/
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{
// Calling respective Action Method to Provide File Service
this.processAction(request,response);
NOTE: The following code could be used to provide service to stream any sort of files with any sort of content
with some minor modications.
Inorder to access all the images you can restructure your jsp like the one below
JSP:
<!--
And say we have are storing Image name & Movie details in the database and we are created a collection
of all the database results like bean here is how we would display all the details with images
Say you wrote a query to findout Moviename,timings,Hall Number & pictureFileName
example:
Movie: DIE HARD 4.0
Timings: 10:00AM,2:00PM,9:15PM
Hall NUmbers: 1,1,2,4
pictureFileName: die_hard_4.jpg
or
Movie: Transformers
Timings: 11:20AM,2:20PM,10:15PM
Hall NUmbers: 2,3,1,5
pictureFileName: transformers.jpg
say you are saving the information in a dtoBean with properties like
public class MovieBean{
private String movieName;
private String timings;
private String pictureFileName;
/* and followed by getters & setter of all those*/
and say we have queried the database and finally collected an ArrayList<MovieBean> from the query results and
saving it within the scope of session with the attribute name "MovieList"
-->
<%@ page language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<html>
<head>
<title>Movie Details</title>
</head>
<body text="#000000" bgcolor="#FFFFFF">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber1">
<thead>
<tr>
<td>Movie Name</td>
<td>Timings</td>
<td>Hall Numbers</td>
<td>Poster</td>
</tr>
</thead>
<tbody>
<c:forEach var="movieBean" items="${sessionScope.MovieList}">
<tr>
<td><c:out value="${movieBean.movieName}"/></td>
<td><c:out value="${movieBean.timings}"/></td>
<td><c:out value="${movieBean.hallNo}"/></td>
<!-- Here is where we are making use of image servlet and trying to retrive images -->
<td><img src="Image?fid=<c:out value="${movieBean.pictureFileName}"/>" align="center" width="30" height="30"/></td>
</tr>
</c:forEach>
</tbody>
</table>
</body>
</html>Hope this might help,If that does do not forget to assign the duke stars which you promised :)
REGARDS,
RaHuL -
How to display a image in webdynpro view using a bytearry
Hi Frndz..
How to display an image in a view using webdynpro java ..i have bytearry object in context ..like
*byte[] img = wdContext.nodeYywwwdataImport_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();*_
by using this i need to show image in view..
Kindly help me ....
Thankas in Advance
Regards
RajeshHi,
byte[] img = wdContext.nodeYywwwdata_Import_Input().nodeOutput().nodeOutMime().currentOutMimeElement().getLine();
use this code to create resource and you need to set this value to the context created to display the image suppose in the image UI and set the source property with this attribute:-
IWDResource res=WDResourceFactory.createCachedResource(b,"MyImage",WDWebResourceType.JPG_IMAGE);
IPrivateAppView.IVn_ImageTabElement imageEle=wdContext.createVn_ImageTabElement();
imageEle .setVa_Name(res.toString());
wdContext.nodeVn_ImageTab().addElement(imageEle);
Hope this may help you.
Deepak -
I created a site column at the root of my site and I have publishing turned on. I selected the Hyperlink with formatting and constraints for publishing.
I went to my subsite and added the column. The request was to have "Open in new tab" for their hyperlinks. I was able to get the column to be added and yesterday we added items without a problem.
The problem arose when, today, a user told me that he could not edit the hyperlink. He has modify / delete permissions on this list.
He would edit the item, in a custom list, and click on the address "click to add a new hyperlink" and then he would get the error below after succesfully putting in the Selected URL (http://www.xxxxxx.com), Open
Link in New Window checkbox, the Display Text, and Tooltip:
"Message from Webpage There was an error in the browser while setting properties into the page HTML, possibly due to invalid URLs or other values. Please try again or use different property values."
We are on IE 9.0.8.1112 x86, Windows 7 SP1 Enterprise Edition x64
The farm is running SharePoint 2010 SP2 Enterprise Edition August 2013 CU Mark 2, 14.0.7106.5002
and I saw in another post, below with someone who had a similar problem and the IISreset fixed it, as did this problem. I wonder if this is resolved in the latest updated CU of SharePoint, the April 2014 CU?
Summary from this link below: Comment out, below, in AssetPickers.js
//callbackThis.VerifyAnchorElement(HtmlElement, Config);
perform IISReset
This is referenced in the item below:
http://social.technet.microsoft.com/Forums/en-US/d51a3899-e8ea-475e-89e9-770db550c06e/message-from-webpage-error-there-was-an-error-in-the-browser-while-setting?forum=sharepointgeneralprevious
TThThis is possibly the same information that I saw, possibly from the above link as reference.
http://seanshares.com/post/69022029652/having-problems-with-sharepoint-publishing-links-after
Again, if I update my SharePoint 2010 farm to April 2014 CU is this going to resolve the issue I have?
I don't mind changing the JS file, however I'd like to know / see if there is anything official regarding this instead of my having to change files.
Thank you!
MattWe had the same issue after applying the SP2 & August CU. we open the case with MSFT and get the same resolution as you mentioned.
I blog about this issue and having the office reference.
Later MSFT release the Hotfix for this on December 10, 2013 which i am 100% positive should be part of future CUs.
So if you apply the April CU then you will be fine.
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
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);
}
Maybe you are looking for
-
Kernel panic, Yosemite, early 2011 mbp, samsung SSD
I am getting kernel panics about once a day, or once every two days. My system is an early 2011 MacBook Pro, with a new SSD from Samsung (850 Evo). The OS is a clean install of Yosemite from an USB drive. Everything is running great, except these occ
-
I've been using NextTech DVD-R to burn data. I recently bought some Memorex DVD-R and now I keep getting error messages telling me there is only 31MB of space on the disk. This is a brand new tower of DVD-R's. Also when I open finder it tells me ther
-
Can you correct my unfunction my script?
Hi, everyone I made a script for add a continued at end of paragraph but unfunction, call you please help to fix it? var myDialog = app.dialogs.add({name:"add continueds",canCancel:true}); with(myDialog){ with(dialogColumns.add()){ with(d
-
Hi All My smartforms on development work properly . but when i transfer smartforms and all related data to production server that not work. i debuge the driver program on production server there is problem in FB_GENERATE_FORM . when cursor goes on FB
-
Error of Managing the interactive dashboards
When I log in to Oracle BI Presentation Services, and choose Settings > Administrator, then click the Manage Interactive Dashboards link, I click the permissions (Lock logo) of one Dashboards, the error appeared: Account not found. - Error Details Er