[jbosstools-issues] [JBoss JIRA] (JBIDE-18548) Image dropped to VPE is not rendered on server
Alexey Kazakov (JIRA)
issues at jboss.org
Thu Oct 9 14:27:12 EDT 2014
[ https://issues.jboss.org/browse/JBIDE-18548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010377#comment-13010377 ]
Alexey Kazakov commented on JBIDE-18548:
----------------------------------------
This is actually depends on how you deploy the app.
"/someimage.gif " doesn't work if you deploy it with not empty context root.
For example: localhost:8080/*jboss-as-kitchensink-html5-mobile*/index.html (usually used during development).
If you deploy the app with empty context root localhost:8080/index.html then it will work fine (usually used in production).
There is no universal solution solution which approach is better. Paths relative to the resource like ../img/image.gif or relative to the webroot folder like /img/image.gif.
In templates, for example, paths relative to the resource may not work.
But I think it's better to use paths relative to the resource (../img/image.gif) for plain HTML tags <img> because it seems to be more suitable for most cases. And we should keep use /.../... paths for JSF/Facelet tags.
> Image dropped to VPE is not rendered on server
> ----------------------------------------------
>
> Key: JBIDE-18548
> URL: https://issues.jboss.org/browse/JBIDE-18548
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: jsp/jsf/xml/html source editing
> Affects Versions: 4.2.0.CR2
> Environment: JBT 4.2.0.CR2-v20141005-0541-B267
> Reporter: Vlado Pakan
> Assignee: Alexey Kazakov
> Fix For: 4.2.1.Final, 4.3.x
>
>
> 1. Import HTML 5 project from JBoss Central
> 2. Open index.html page
> 3. Drag&drop some image from img subdirectory to source part of VPE
> ASSERT: Image is displayed in visual part of VPE
> 4. Run project on server
> ERROR: Dropped Image is not rendered in web browser
> Once leading "/" is removed from img tag source attribute droped image is rendered on web page deployed to server
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the jbosstools-issues
mailing list