Sorry for the late reply, have been busy with other projects etc.
Still having the problem.
This is what my main area is like..
srvr.Initialize("srvr")
srvr.Port = 80
srvr.StaticFilesFolder = File.Combine(File.DirApp, "www")
srvr.AddHandler("/*", "b4jPages", False)
and the page use..
Sub Handle(req As ServletRequest, resp As ServletResponse)
mreq = req
mresp = resp
Dim sessionid As String = req.GetSession.Id
' Log("Request Session ID: " & sessionid)
' Log("Request URI:" & req.RequestURI)
' Log("Request FullRequestURI: " & req.FullRequestURI)
' Log("Request ContentType: " & req.ContentType)
Dim s As String = req.RequestURI
If s.Contains(".html") Then
Dim htm As String = buildpage.BuildCurrentPage(req.RequestURI)
If htm <> Null Then resp.Write(htm)
Else
resp.Write(s)
End If
End Sub
The BuildCurrent page generates the entire web page and returns as a string.
Then that is resp.Write(htm)
With this and the css and image paths have their leading "/" it still does not work.
As I said before if I serve a pre-built page from the www folder all is fine.
the html code produced will not show the background or any other images.
Here is what the view source is..
<style>body {
background-image: url("/images/fresh_snow.png");
background-color: #cccccc;
}</style>
Tom