Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
The problem is the WEB-INF part in your URL. You can't access any resource inside the WEB-INF folder from the outside. Move your Home.jspx into the the webroot folder.
Next you should not have the suffix '.jspx' as part of your url. If you do you can't navigate as the adf bindings (and navigation) is not initialized.
https://community.oracle.com/thread/2389695
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
The problem is the WEB-INF part in your URL. You can't access any resource inside the WEB-INF folder from the outside. Move your Home.jspx into the the webroot folder.
Next you should not have the suffix '.jspx' as part of your url. If you do you can't navigate as the adf bindings (and navigation) is not initialized.
https://community.oracle.com/thread/2389695
I solve it with this main class implementation: http://stackoverflow.com/questions/8233886/jetty-embedded-spring-application
private static final int PORT = 8080;
private static final String WAR_LOCATION = "src/webapps"; //in your case I guess
private static final String CONTEXT_PATH = "/movence"; //change it if you want
public static void main(String[] args) throws Exception {
Server server = new Server();
WebAppContext context = new WebAppContext();
SocketConnector connector = new SocketConnector();
setupConnector(connector);
setupContext(server, context);
setupServer(server, context, connector);
startServer(server);
}
private static void startServer(Server server) throws Exception, InterruptedException {
server.start();
server.join();
}
private static void setupServer(Server server, WebAppContext context, SocketConnector connector) {
server.setConnectors(new Connector[] { connector });
server.addHandler(context);
}
private static void setupConnector(SocketConnector connector) {
connector.setPort(PORT);
}
private static void setupContext(Server server, WebAppContext context) {
context.setServer(server);
context.setContextPath(CONTEXT_PATH);
context.setWar(WAR_LOCATION);
}
No comments:
Post a Comment