java-ee

How do I specify a server to get an EJB from?

↘锁芯ラ 提交于 2020-01-01 17:26:13
问题 In java EE, the way you get an EJB from a remote server is by looking it up in JNDI. The specification defines the JNDI name for a given bean type. However, this seems to be only if you want to get a bean off your local computer. I want to get the bean off a remote server, like most users would. How do I specify the server URL? Do I pass a map to the InitialContext constructor? Note: There is another question that is pretty much the same, but that has become out of date since the definition

Java EE App Server Hello World

陌路散爱 提交于 2020-01-01 16:55:14
问题 I am fairly comfortable with standalone Java app development, but will soon be working on a project using a Java EE application server. Does anyone know of a straightforward how-to tutorial to getting a hello-world type application working in an application server? I'm (perhaps naievly) assuming that the overall approach is similar between different frameworks, so I'm more interested in finding out the approach rather than getting bogged down in differences between the different frameworks.

Glassfish web.xml servlet mapping to @WebService gets ClassCastException

柔情痞子 提交于 2020-01-01 15:56:49
问题 Am trying to gain control over the URL endpoints of my web services when deployed to Glassfish (and preferably to TomEE too). I have a class: @Stateless @WebService( targetNamespace = "http://foo.net/doc/2012-08-01", name = "FooService", portName = "FooPort", serviceName = "FooService") public class FooSoapService extends SoapBase { ... } And a web.xml: <servlet> <description>SOAP Endpoint for Foo operations.</description> <servlet-name>Foo</servlet-name> <servlet-class>com.foo.FooSoapService

unable to open web service tester page with jdk8 and netbeans 8

梦想的初衷 提交于 2020-01-01 15:09:09
问题 I wrote a simple web service program but I can not test it on glassfish 4.0 web server . When I Test Web service I see this message : Make sure the service has been deployed successfully, and the server is running. I can see it in list of deployed web services on glassfish web server . and I add this file to \jdk1.8.0\jre\lib to fix the problem. jaxp.properties javax.xml.accessExternalSchema = All But it doesn't work Also I see this error in url of tester page : lineNumber: 52; columnNumber:

grizzly does not log Exceptions in requests

情到浓时终转凉″ 提交于 2020-01-01 15:08:31
问题 I've set up a simple jersey server like this: ResourceConfig rc = new ResourceConfig().packages("com.example.jersey_test/services"); HttpServer server = GrizzlyHttpServerFactory.createHttpServer(URI.create(API_URI), rc); And I have a bean that simply throws an exception: @Path("persons") public class PersonService { @GET @Produces(MediaType.APPLICATION_JSON) public String getPersons() { java.util.logging.Logger.getGlobal().log(Level.INFO, "test"); throw new RuntimeException("test"); } } The

unable to open web service tester page with jdk8 and netbeans 8

。_饼干妹妹 提交于 2020-01-01 15:07:33
问题 I wrote a simple web service program but I can not test it on glassfish 4.0 web server . When I Test Web service I see this message : Make sure the service has been deployed successfully, and the server is running. I can see it in list of deployed web services on glassfish web server . and I add this file to \jdk1.8.0\jre\lib to fix the problem. jaxp.properties javax.xml.accessExternalSchema = All But it doesn't work Also I see this error in url of tester page : lineNumber: 52; columnNumber:

GWT - Can't Finding entry point classes

喜你入骨 提交于 2020-01-01 11:51:37
问题 I have recently started developing another GWT module. So I created a package with all my new classes and one specific class that implements a new entrypoint. I modified in my gwt.xml to my new entrypoint. When I compile, I get the following error: GWT Compiling client-side code. WARNING: 'com.google.gwt.dev.GWTCompiler' is deprecated and will be removed in a future release. Use 'com.google.gwt.dev.Compiler' instead. (To disable this warning, pass -Dgwt.nowarn.legacy.tools as a JVM arg.)

GWT - Can't Finding entry point classes

大城市里の小女人 提交于 2020-01-01 11:51:26
问题 I have recently started developing another GWT module. So I created a package with all my new classes and one specific class that implements a new entrypoint. I modified in my gwt.xml to my new entrypoint. When I compile, I get the following error: GWT Compiling client-side code. WARNING: 'com.google.gwt.dev.GWTCompiler' is deprecated and will be removed in a future release. Use 'com.google.gwt.dev.Compiler' instead. (To disable this warning, pass -Dgwt.nowarn.legacy.tools as a JVM arg.)

How to join two different criterias under Hibernate?

倾然丶 夕夏残阳落幕 提交于 2020-01-01 10:12:23
问题 I have three tables in my database, a Student, a Classe, and an Assignement. The POJOs are as the following: Student{ Classe currentClasse; Set<Assignement> assignements; } Classe{ Set<Assignement> assignements; SchoolYear schoolYear; } Assignement{ Classe classe; Student student; Boolean pass; } Basically, a student has a current class, and a list of assignements (all the classes he's been assigned to). My problem is that under hibernate, I'd like to know all the students who do not have a

How can I use <h:outputScript /> with a remote file?

纵饮孤独 提交于 2020-01-01 09:57:13
问题 I have a server dedicated for static contents so I don't want to use the resources dir for storing javascript files but I don't want to stop using the <h:outputScript /> tag. How can I make that tag generate a link to my static server where the files are located instead of RES_NOT_FOUND . I don't even need JSF to check if the files are there... I tried: <h:outputScript name="#{requestBean.staticURL}/javascript.js"/> To generate: <script type="text/javascript" src="http://static.server.com