Image Display in JSP [closed] - image

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
How to display an image to jsp page ?
It does not allow me to display .
I am using simple servlet application and I have mention the correct path so path is not the issue .
Provide the solution as soon as possible.

<img> tag in HTML or JSP, will trigger a GET request which the server has to handle.
EXAMPLE
if I have image like below
<img src="images?imageName=xyz.png"/>
the browser will request the servlet on the server with the name images passing the parameter imageName and its value value.
the servlet images has to handle the request and send image information in the form of stream which gets back to the browser and be displayed on the page.
images is name given to a servlet
follow this thread for better understanding.

Thank you for support .
Problem is solved.
The problem was :
I was trying to fetch the image file dynamically and was writing the height attribute so it was concatinate my src with height so I removed height and wrote before src attribute .
It Works .....

Related

how does SEO index pages with ajax loaded content [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
i'm a little confused about how search engines will treat this two cases:
i have a page "all articles" which has previews of recent articles( some text plus read more) and a page for each article, will this be considered as duplicate content by search engines?
when a search engine indexes a page does it index also the content on the page that is loaded via ajax? (in my case the page "all articles" load the previews of articles via ajax.
Thank you.
For your first question, no it will not be treated as duplicate content, those are just previews.
For the second one , search engines DO index Ajax content if they are crawlable.
You can make sure they are crawlable by ensuring your site has theese tags:
https://developers.google.com/webmasters/ajax-crawling/docs/learn-more

Magento import products with existing image [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I am developing a Magento site hosted on Godaddy. I've already manually added some products. Right now, I am trying to import a lot more product which are using the same images.
Let me give you an example. Say I manually added a product with image A. In the csv file I exported, image path is m/u/mud3021.png. Right now I am trying to import product B and C with the same image, but when I put the same image path under the corresponding column, the image doesn't show up in the product page. I mean, everything else shows up but the image. Please help me get this through.
I also tried this path /public_html/media/catalog/product/m/u/mud3021.png because it's the path shows on FileZilla. But it doesn't work either.
Your using the bad path to the media folder.
You should use magento getBaseUrl like below:
$mediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . "catalog/product/";
and then you just add your image path to the media url in order to view the image like below:
...
let's say that $imgPath = m/u/mud3021.png ;
$imgUrl .= $mediaUrl.$imgPath ;
So you will successfully show your image in product page :)

Add image source link on the Image [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to add an hyperlink on the image :
here is the example : http://aff248.teensdigest.com/articles/766?page=1
I want to use few images on my website with that i want to show the image source.
So how can we add a link of image source on the image itself. I tried with the css but i don't know how to put the link exactly on the image.
Your sample web site is using CSS to overlay the image with an href for "Source" like this:
Source
And in one of the CSS stylesheets, they define the class citation. Check out the second stylesheet in your sample.

LibreOffice: Text for footer of last page [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I want to create a custom LibreOffice Writer template of our company. This template should include a disclamer in the footer of the last page of each document.
In our existing M$ Word template we use a field with "IF({current page}={last page};...", but LibreOffice seems not to be able to use the current page number in conditional texts.
The LibreOffice Help page says:
You cannot use internal variables, such as page and chapter numbers, in condition expression.
Using a custom page style for the last page also seems not to be a good decision, because if someone inserts too much content into that "last page" and causes an automatic page break then he gets the disclamer twice.
How can I create a footer in LibreOffice that will automatically be shown on the last page of a document, but not on any other page?
edit: I managed to write a macro that can insert a page break for the last page. Still not the complete solution, but might be a way to go:
Sub PageBreakForLastPage
' create cursor
Cursor = ThisComponent.CurrentController.getViewCursor
' move to start of last page
Cursor.jumpToLastPage
Cursor.jumpToStartOfPage
' create page break
Cursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
Cursor.PageDescName = "First Page"
End Sub
We had the same issue using the OpenOffice template engine (i suppose it's the same :D) and the only way to solve this problem was to add a footer with a custom field for the page number and fill this after each page is created.

Image id as digit causes W3C error [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I am using Drupal 7.9 and the images generate a numerical id automatically. It causes W3C validation error value of attribute "id" invalid: "1" cannot start a name because id attribute doesn't allow a digit as its name. The image tag is
<img id="1" class="media-image" alt="contact" src="path to image" typeof="foaf:Image">.
How can I get rid of this? Any help will be greatly appreciated.
Update. As #SvartalF said, how can I prefix string to id in Drupal? I tried jQuery for that. But didn't help. This problem exists only with images uploaded via wyswyg CK editor
HTML id value must begin with a letter, you can check it here.
So, you can prepend id with a some-prefix like a image-, or use HTML5 data-* attributes

Resources