Andy, Thanks for the detailed list of issues.
> I no longer have any java/servlet problems. All of my recent problems > have been with the contents of the various sample files. Yes, the sample files have too many hardcoded things. I apologize for the samples not working out of the box, but I didn't know what all the issues were with different web servers and servlet engines. I was hoping for exactly this kind of feedback to help with improving the samples. I will work on making things for adaptable to the environment, rather than requiring small tweaks. (But it is nice that only small tweaks to simple text files were needed.) > > I had problems with the following file url in the file system.script.xml > which appeared in the javascript function get() in both the fs2http and > the hello samples. > > layout = > "file:///"+Packages.org.apache.xang.util.ServletUtil.resolveURL(layout); > > When I modified the code to use an HTTP URL it worked. > > layout = > "http://localhost:8080/"+Packages.org.apache.xang.util.ServletUtil.resolveUR L(layout); > I will look into this to find out why file: access doesn't work. There is no real reason why file: is required. I just thought it might be faster. > I also had difficulty with the following definition which I found > throughout fs2http.xap > > var fs_root_path = "d:/apache/htdocs/"; > > when I replaced it with my "docRoot", see below, it worked. > > var fs_root_path = "h:/devel3/jakarta-tomcat/webapps/ROOT/"; > This sample is an example of poor coding. This root_path should not have been hardcoded. > The problem that I am having is that the URL listed when I mouseover > the "view script" is > > http://localhost:8080/xang-hello/?do:method=script > This is caused by the original url to the .xap file not having a trailing slash. It's a never ending problem. This can be resolved by changing the default get() behavior to check for a trailing slash & if it is missing, then send a re-direct to the browser with a URL with a trailing slash. This is what many Web servers do when viewing directories. Alternatively, the XSL that generates <img src=''> and <a href=''> tags can be adjusted. Which is what is sounds like you ended up doing. If you'd like, I can work on changing the default get() to check for a trailing slash & do a re-direct. Let me know. > > I'm not sure that I can account for or explain these problems and or > their solutions, I'm not really much of a web app designer or > implementor. I just wanted to see if I could get Xang to work as > advertised. > > With a fair amount of tweaking I can get both of the samples to do > things, but I've been so busy working around the various problems > that I'm no longer sure that I know what the actual intent of the Xang > system is. > I'm sorry that there were so many little obstacles. The intent of the Xang system is that you CAN resolve problems with apps without knowing heavier languages and doing compile/link/deploy sorts of things. The Xang system is meant to be a multi-scripting language way to quickly write web aware and XML aware apps. In addition it will support different APIs to get the HTTP information. For example, today you use the Java Servlet API to get stuff from HTTP requests and fill out HTTP responses. Some programmers are more familiar with the MS ASP model of HTTP Request and Response. I intend to write an adapter so that your JavaScript can use either approach. This would be specified in the XML of the app with something like <xap model='servlet'> or <xap model='asp'> or something. Please don't get discouraged. The system is rough right now, but with valuable and intelligent feedback like yours, it will improve quickly and radically. Mike
