Ich habe ein Problem mit URL und relativen Pfad (Abfrage). Ich schrieb diesen Code absolute URL aus der relativen URL zu erhalten:java.net.URL und relative URL
old = "http://domain/script?param";
new_ = "?otherparam";
URL u = new URL(old);
u = new URL(u,new_);
Hier wird ausgegeben:
JAVA URL: http://domain/script?param + ?otherparam = http://domain/?otherparam
FireFox: http://domain/script?param + ?otherparam = http://domain/script?otherparam
Warum Ergebnis schließt URLs unterscheiden sich von FireFox? Wie erstellt man eine URL wie FireFox?
was meinst du "Firefox"? – Bozho
@Bozho überprüfen Ausgabe Abschnitt –
ja, Firefox oder andere Browser. – JakeLi