- This topic has 12 replies, 8 voices, and was last updated 20 years, 2 months ago by kinjalsonpal.
-
AuthorPosts
-
gilesparnellMemberHi there guys
Not too sure if this is an Eclipse issue or an myEclispeIDE issue. I’m trying to view the preview of a jsp page. When i clicm on the preview tab i get all the html text, but the images are crossed out (red x). Is there anyway i can point my project to my images directory so the images are picked up and i therefore get a better representation of my overall page.
Any help would be great,
Cheers
Giles
support-michaelKeymasterAt this time the JSP/HTML editor’s preview capability is limited to viewing only the static html tags. We are researching more comprehensive capabilities. The issue is that we traded off link support in order to enable the preview mode to be able to render the editor’s working copy of a JSP web resource without requiring the resource to be saved first. We are researching how to do both simultaneously.
I have entered an enhancement request on this topic into our issues tracking system.
Michael
MyEclipse Support
ChrisTarantoMemberHey Michael – You guys have built a great add-on for this IDE. You should be proud. To piggyback on Giles’ issue – the problem doesn’t appear to be the ability to view images – that works fine. It’s that the root for the images is under .myeclipse/.bje_tmp as opposed to the regular web root. At least that’s what I’m seeing. When you copy the images in there, they’re clear as a bell. Any ideas?
Thanks,
Chris
Scott AndersonParticipantChris,
It really is simply a case of needing to enhance the lookup we use since we copy the file to a temp directory. That messes up the relative URL’s that refer to your style sheets and images, etc. We’ll get something worked out to improve this soon.
You guys have built a great add-on for this IDE. You should be proud.
Actually, I think we’re more “really really really tired” than proud. 😉
–Scott
MyEclipse Support
tzhgosh1MemberHi there,
I’m just fighting with a similar problem. It would be really great if you could specify which folder was used as the root for links when using the JSP preview pane. We normally don’t keep our static files in our tomcat webapp, but serve them through apache, since it is more efficient. So our files live outside the webroot.Is this what you are planning with the mentioned enhancement?
Thank
Sharon
Riyad KallaMemberSharon,
This is tricky because its not just a webroot we need… its a image base, css base, javascript base, etc… and because these are not well-known entities and can be completely user defineable, I’m not sure that we can provide a catch-all solution.Did you have one in mind?
tzhgosh1MemberHi there,
I’m not sure I understood correctly.
When we deploy all our files are in one webroot. So all our links are relative to a single path. (css, javascript, images etc…). It is this webroot that I would like to be able to specify. Note, it is not the same as my MyEclipse webroot folder.Regards
Sharon
Riyad KallaMemberWhen we deploy all our files are in one webroot
Ok…
So all our links are relative to a single path. (css, javascript, images etc…).
Gotcha…
It is this webroot that I would like to be able to specify. Note, it is not the same as my MyEclipse webroot folder.
This is what confuses me… what you just described sounds to me exactly like the purpose of “WebRoot”, you can of course change the name of this directory to anything you like via the Project Properties > MyEclipse-Web preference page… you could call it “webroot” or “hamsandwich” if you liked.
The webroot folder in MyEclipse is essentially the root of the website, how are you defining webroot and why does this not work for your setup?
tzhgosh1MemberOkay,
I think I see where the confusion might be.Our docroot (for static content) is NOT the same as the WebRoot.
We deploy with apache and tomcat.
The docroot is set in apache, and contains all the static content (images, css, javascript etc.). The absolute paths to these static components do not include the webapp context.
The WebRoot is as used in myeclipse as the root directory of the webapp, and contains all static content.
So our project structure looks something like:>StaticContent >images >javascript >css >WebRoot >test.jsp >WEB-INF > .....
Note, this is a bit simplified, but it makes the point.
Assuming our webapp context is /someContext, we call the test.jsp using a path like:
/someContext/test.jsp
And an image source in the page would have a path like:
/images/test.gifDoes this make sense now?
Many thanks for your patience,
Sharon
Riyad KallaMemberSharon thank you for the detailed explanation, I understand your request now and will pass it along to the team.
guyrMemberI think I’m having the same issue. Our runtime file tree looks like this:
/a/b/secure/html/myTest.jsp
/a/b/secure/images/myImage.jspIn Apache, we have our DocumentRoot set to /a/b/secure, and in Tomcat the docBase for the default context is set to the same thing. In myTest.jsp, the reference to the image would be absolute: “/images/myImage.jsp”. I can’t figure out any way to configure MyEclipse so it can render these images in the preview pane.
Scott AndersonParticipantRight now the preview pane only supports relative paths. So, referencing your images as ../images/myImage.jsp will work, but absolute paths will not, and is an open enhancement request.
kinjalsonpalMemberI’m also facing the same problem, but in a little different fashion. In my project, most of the css and JavaScripts are being delivered through a combo of Struts action/forward. I’ve also seen cases where these contents are delivered through Servlets in not-Struts environment.
I’m okay with it right now as I rarely use the preview pane. But still I thought, while you guys are trying to work out a solution for a similar kind of problem, please also take such a scenario in account.
Ideally, rather than having a preview pane, I would like to have a launch/run functionality for the Jsp page. I’ve seen this workinig in JDeveloper (10g) and WSAD very well and it comes really very handy.
Thanks for this wonderful piece of work anyway.
Regards,
Kinjal Sonpal -
AuthorPosts