Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to get reference to object in embedding app from JSP or servlet

WebAppContext.setParentLoaderPriority(true) solved issue with casting but I am not still sure if my solution is the right one.

> ------------ Původní zpráva ------------
> Od:  <jetty-users-request@xxxxxxxxxxx>
> Předmět: jetty-users Digest, Vol 16, Issue 8
> Datum: 09.9.2010 18:08:05
> ----------------------------------------
> Send jetty-users mailing list submissions to
> 	jetty-users@xxxxxxxxxxx
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://dev.eclipse.org/mailman/listinfo/jetty-users
> or, via email, send a message with subject or body 'help' to
> 	jetty-users-request@xxxxxxxxxxx
>
> You can reach the person managing the list at
> 	jetty-users-owner@xxxxxxxxxxx
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of jetty-users digest..."
>
>
> Today's Topics:
>
>    1. How to get reference to object in embedding app from	JSP or
>       servlet (mb175@xxxxxxxxx)
>    2. Re: How to get reference to object in embedding app from JSP
>       or servlet (Jesse McConnell)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 09 Sep 2010 10:33:49 +0200 (CEST)
> From: mb175@xxxxxxxxx
> To: jetty-users@xxxxxxxxxxx
> Subject: [jetty-users] How to get reference to object in embedding app
> 	from	JSP or servlet
> Message-ID: <964.177.574-23447-2079992458-1284021229@xxxxxxxxx>
> Content-Type: text/plain;	charset="us-ascii"
>
> Hello
>
> We have an application and we need to create some simple web to work with it. We
> embedded Jetty and created web application with some servlets and JSPs. In our
> application there are some objects which represent bussines logic and I need to
> use them from JSP but I don't how to get reference to it.
> I tried to set necessary object as attribute in ServletContext but when I use it
> in JSP I get "com.xxx.MyClass cannot be cast to com.xxx.MyClass".
> Can somebody give me some advice how to do it? Or I might be on totally wrong
> way (I am new in development of web applications) so I would appreciate if you
> tell me the right way I should do my app.
> Thanks
>
> Martin
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 9 Sep 2010 08:15:16 -0500
> From: Jesse McConnell <jesse.mcconnell@xxxxxxxxx>
> To: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
> Subject: Re: [jetty-users] How to get reference to object in embedding
> 	app from JSP or servlet
> Message-ID:
> 	<AANLkTi=w71CwjfOE+R-xV8wWWxRuY6Ny7dX2ADxady=t@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset=UTF-8
>
> that smells like a classloader issue, the MyClass probably exists in
> two places (one in the system classloader and one from the war maybe?)
> and the jvm is telling you that they are not compatible
>
> jesse
>
> --
> jesse mcconnell
> jesse.mcconnell@xxxxxxxxx
>
>
>
> On Thu, Sep 9, 2010 at 03:33,  <mb175@xxxxxxxxx> wrote:
> > Hello
> >
> > We have an application and we need to create some simple web to work with it.
> We embedded Jetty and created web application with some servlets and JSPs. In
> our application there are some objects which represent bussines logic and I need
> to use them from JSP but I don't how to get reference to it.
> > I tried to set necessary object as attribute in ServletContext but when I use
> it in JSP I get "com.xxx.MyClass cannot be cast to com.xxx.MyClass".
> > Can somebody give me some advice how to do it? Or I might be on totally wrong
> way (I am new in development of web applications) so I would appreciate if you
> tell me the right way I should do my app.
> > Thanks
> >
> > Martin
> > _______________________________________________
> > jetty-users mailing list
> > jetty-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/jetty-users
> >
>
>
> ------------------------------
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
> End of jetty-users Digest, Vol 16, Issue 8
> ******************************************
>
>
>


Back to the top