Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Embeded jetty 7.2.2 issue.

Hi Mitul,
Looking at the jetty.xml file, I am not sure that the issue is OSGi specific although I could be mistaken.
Maybe you could turn on the directory listing of the default servlet or use an absolute path to define the base ?
Have you tried placing breakpoints inside the resource resolver?
Let us know,
Hugues

On Tue, Feb 8, 2011 at 2:14 PM, Mitul Adhia <mituladhia19@xxxxxxxxx> wrote:
Hi All,

I am using Jetty 7.2.2 embedded in my application . It is an osgi based application running on equinox. Now my requirement is to run jetty server using the configuration file . below is the snippet which i have used to read the configuration file . The execution goes fine w/o any exception but when i open the URL http://localhost:50099/timeline it says no resource found error 404.

I have written one servlet and now i wanted to register that servlet with the connector so that i can run the servlet from the broswer. To incorporate this did necessary changes in jetty.xml.

Resource fileserver_xml;
try {
Thread.currentThread().setContextClassLoader(Activator.class.getClassLoader());
fileserver_xml = Resource.newResource("newWP/testapplication/jetty.xml");
XmlConfiguration configuration = new XmlConfiguration(fileserver_xml.getInputStream());
       Server server = (Server)configuration.configure();
       server.start();
       server.join();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


Attached is the jetty .xml file attached for reference. 
Could you please let me know what went wrong in this ?

Best Regards,
mitul


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top