File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Cewolf tutorial not working - broken image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Cewolf tutorial not working - broken image" Watch "Cewolf tutorial not working - broken image" New topic
Author

Cewolf tutorial not working - broken image

Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
I have scoured the internet for a solution. Although there is some discussion, I have not been able to solve my problem.

I have followed the instructions to deploy the tutorial given at http://cewolf.sourceforge.net/new/index.html. Also I have corrected the jsp for contents under cewolf:img tag. Before that I was getting the error: "id is not a valid attribute for tag map".

I have named the JSP in this tutorial to be cewolfTutorial.jsp and deployed it in the default-web-app directory of Orion 2.0.7 server. The servlet test mentioned in this tutorial is successful.

I invoke this JSP as http://localhost/cewolfTutorial.jsp

The page shows with its heading but the image is broken. I see the following in server access log:

127.0.0.1 - - [16/Oct/2011:12:43:51 -0800] "GET /cewolf;jsessionid=BNBJIHNMIOHO?img=1193763163&width=400&height=300&iehack=.png HTTP/1.1" 301 0

I'd greatly appreciate any help in making this work so I can proceed with cewolf for real work. This library looks quite attractive to me in its features.

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
I'd start by downloading the war file of the cewolfexample web app from SourceForge. You should be able to deploy and run that in a servlet container as is.

Orion is of course a very old servlet container; if at all possible, upgrade to a recent version of Tomcat or Jetty.


Ping & DNS - my free Android networking tools app
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
Thank you for such a quick reply!!

To add to my Environment info:
I am using Java 1.4.2_19. cewolf version is 1.1.11

Unfortunately, I don't have the option to move to a newer server in the near future.

I did try to deploy the cewolfexample in an exploded form as a default app. Since orion complained about xmlns, I replaced it with a DOCTYPE tag that other apps in Orion use. I did get to the home page. But I couldn't deploy any of the jsp's. I got following errors:

10/16/11 1:30 PM defaultWebApp: Error parsing JSP page /tutorial.jsp
<PRE>Attribute of type 'java.io.Serializable' must be a request time attribute</PRE>
10/16/11 1:31 PM defaultWebApp: Error parsing JSP page /cewolfset.jsp
<PRE>Attribute of type 'java.io.Serializable' must be a request time attribute</PRE>
10/16/11 1:32 PM defaultWebApp: Error parsing JSP page /testpage.jsp
<PRE>Invalid integer attribute: ${params.gradientX1}</PRE>
10/16/11 1:32 PM defaultWebApp: Error parsing JSP page /testpage.jsp
<PRE>Invalid integer attribute: ${params.gradientX1}</PRE>

Does that tell you something? Any other information I can provide.

I look forward to your reply.

Thanks
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
Tutorial - Partially solved. I used renderer="/cewolf/". The chart is showing up but no tool-tips or links. The rendered page simply has an image tag. No area or javascript. This is happening, both in IE and Chrome.

I have tried overliburl to be "overlib.js" and "/overlib.js" and overlib.js is both in default web app directory and the root of the servlet engine.

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
The JavaScript file is in the exact location where it should be, provided you didn't alter the directory layout. Are you seeing JavaScript errors that would lead you to believe otherwise?

Are there any error messages in the servlet container logs?
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
Please note that I am following the tutorial; not deploying cewolfexample.war. I created the test class of tutorial and deployed it in WEB-INF/classes. Deployed your jsp at the root of the folder and the libraries under EWB-INF/lib. overlib.js is in root folder of the app and I tried overliburl of, both, "overlib.js" and "/overlib.js".

I am not seeing any errors in the application log.

Is there I am doing something wrong?

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
I'd have to check what the tutorial describes; that hasn't been looked at in years :-) That's why I urge everyone to use the example web app as the starting point. I'll have a look at the tutorial tonight.

Of course, if the HTML page does not reference any JavaScript -as you describe-, then it doesn't matter where the overlib.js file is located...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
Ulf Dittmer wrote:I'd have to check what the tutorial describes; that hasn't been looked at in years

Oh dear, the taglib doc is version 0.9.3, that's from 2005 or so... I'm just about 100% sure that the syntax has changed since then.
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
Thanks for checking!

Will the cewolfexample.war work with JDK 1.4.2? If so, I'll try to deploy it again seriously. I listed the errors, I received last time I tried, in an earlier post to this thread.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
The tutorial's syntax is indeed outdated in a few small spots. I'm attaching a war file that contains nothing but that tutorial and its source code; hopefully you'll find that easier to get started with. And be sure to check out the full cewolf example web app; it shows off the full power and capabilities of the package.


[Download cewolftutorial.war] Download

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
Yes, cewolf is compatible with Java 1.4.
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
The other dependency is Servlet engine. web.xml preample in cewolfexample.war is suggesting Servlet Engine 2.4. The Orion App Server I am using is older. Do you think that might be causing the errors I showed earlier. If so, I'm out of luck and have no alternative and must make the version I have work.

I just noticed that cewolf.tld version I am using, and is in cewolf distribution, is 1.1.

I look forward to your reply.

Thanks!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
You should be able to just replace all that simply by "<web-app>", like I did in the war file I posted earlier. That works fine in the current Tomcat version, and is what is used in the tutorial.

You don't need the TLD file - it's contained in the cewolf.jar file nowadays. Note how the JSP file refers to it - that's one of the changes compared to the online tutorial.
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
I just tried what you sent me. Unfortunately, same result. No javascript or AREA tags in the resulting page.

I removed the old .tld and overlib.js. I am glad you sent me the Java source as I had to recompile in Java 1.4. I think you had compiled it in 1.6. As before, I had to change the imageurl to /cewolf/. It seems that's what Orion expects.

How could I troubleshoot this? Why are no AREA tags or javascript in page?

Whatever the outcome, I really appreciate your help!

Thanks

This is what I see in server log:

10/17/11 3:47 PM Started
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: init
10/17/11 3:47 PM defaultWebApp: No Configuration for this context. Initializing.
10/17/11 3:47 PM defaultWebApp: configuring cewolf app..
10/17/11 3:47 PM defaultWebApp: using storage class de.laures.cewolf.storage.TransientSessionStorage
10/17/11 3:47 PM defaultWebApp: using overlibURL etc/overlib.js
10/17/11 3:47 PM defaultWebApp: max image width: 2048
10/17/11 3:47 PM defaultWebApp: max image height: 1024
10/17/11 3:47 PM defaultWebApp: debugging is turned on
10/17/11 3:47 PM defaultWebApp: ...done.
10/17/11 3:47 PM defaultWebApp: 2.0.7 Started
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: Cewolf request:
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: Actual Request values:
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: Request Parameter -> width Value -> 500
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: Request Parameter -> height Value -> 400
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: Request Parameter -> img Value -> -1291694829
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: Request Parameter -> iehack Value -> .png
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: Request Parameter -> removeAfterRendering Value -> true
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: ACCEPT: image/png, image/svg+xml, image/*;q=0.8, */*;q=0.5
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: REFERER: http://localhost/index.jsp
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: ACCEPT-LANGUAGE: en-US
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: USER-AGENT: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: ACCEPT-ENCODING: gzip, deflate
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: HOST: localhost
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: CONNECTION: Keep-Alive
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: CACHE-CONTROL: no-cache
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: COOKIE: GUID=1301339144148; JSESSIONID=PLFCDJGIGGPD
10/17/11 3:47 PM defaultWebApp: de.laures.cewolf.CewolfRenderer: creation time for chart -1291694829: 970ms.
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
I noticed another post here where they were not seeing tooltips either. That post recommended to use jfreechart-1.0.12 and jcommon-1.0.15. But I notice that you already included these in the package you posted.

I am really stumped and wishing this would work!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
If the war file I sent does not work as is (possibly with recompiling the Java source code, if running on a pre-Java 6 JVM), then I'm stumped.

I haven't heard of anyone using Orion for years, though, so I'm not sure what typical problems with it are. Maybe it's necessary to use the full "<web-app ... >" declaration -whichever one is appropriate for the Servlet API version Orion implements- instead of just "<web-app>".
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
Could I do anything to troubleshoot? I do have cewolf source code. I could insert some System.out statements in the class that prints AREA tags - or anything else you suggest.

I did deploy your app as an exploded app so I can have better control. The charts print - just that tooltips and links are not working. It's the links that are important to me.

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
Just to make sure: the HTML does not contain either of

<script type="text/javascript" language="JavaScript" src="etc/overlib.js"></script>

<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>

<map name="line" id="line" >...</map>

?
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
That is true - none of that stuff.

There are HTML tags and one lonesome IMG tag. There are many empty lines between the beginning HTML tag and the IMG tag. It seems like blank lines were printed.
Anne Forumer
Ranch Hand

Joined: Apr 19, 2004
Posts: 72
Any suggestions on how I can troubleshoot this issue? It seems like it is so close to working!

Thanks
 
GeeCON Prague 2014
 
subject: Cewolf tutorial not working - broken image