Thanks so much Joshua!  This really did work and I would have never thought
of having to put *file://* before the system path :p

It turns out that I was doing a couple of other things wrong, I knew this
because after I followed your suggestion, I got no more errors :D, but my
sld wasn't changing.

I say this in case anyone else has the same issues.

1.  if http://localhost:8080/geoserver/wms/mysld.sld doesn't work try:
myLayer.mergeNewParams({sld :'*file:///yourfilepath/mysld.sld*'});

and maybe add the style:null too :)
myLayer.mergeNewParams({sld :'file:///yourfilepath/mysld.sld', *styles: null
*});

2.  Make sure that your new sld that is overriding the old sld is in the
SAME location as that original sld (this was another mistake of mine, didn't
work with the sld in a new location...).

3.  Make sure that if your adding a label to the layer with something like *
<Label><ogc:PropertyName>name_rom</ogc:PropertyName>* that it does exist in
your layer's data etc.

Many thanks to this community and to Joshua for patient and constant
follow-up to ensure I got things working.  Your are most kind.  I really did
Google this a lot and similar threads came up, but none I saw that some used
file:// instead of http:// and this was the big problem for me.

I hope this will help others in the future :)

Happy Mapping,

elshae

On Wed, Jan 19, 2011 at 5:51 PM, Joshua M. Thompson <
[email protected]> wrote:

> On Wed, Jan 19, 2011 at 5:16 PM, IT Intern <[email protected]> wrote:
> > Thank you Joshua, but still nothing :(
> >
> > I have tried:
> >  /usr/local/geoserver-2.0.2/data_dir/www/tibet_1900.sld
> > ./tibet_1900.sld
> > tibet_1900.sld
> > tibet_1900
> >
> > With all of these I get the msg "Java.net.MalformedURLException: no
> > protocol: tibet_1900 no protocol: tibet_1900"
> >
> > Seems like it does want a URL...
> >
> > To my knowledge this is a standalone GeoServer configuration.  We do have
> an
> > Apache server, but it's on another port and I do not think it interferes
> > with GeoServer in any way
>
> I thought of a simpler way to do this that won't require you to mess
> with getting the SLD file to be seen by tomcat's built-in web server:
> instead of passing the SLD as an http url, pass the full filesystem
> path to the sld as a file url; for example:
>
> file:///home/www/styles/mystyle.sld
>
> I tested this and it works fine with my setup here; I'm on 2.2b3 but I
> doubt this behavior is any different in 2.0.x.
>
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to