jakarta-ee

JAX-WS Web service on Tomcat without sun-jaxws.xml

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-12 06:48:09
问题 I am trying to minimize required configuration while deploying JAX-WS-based Web service on Tomcat. With the introduction of Servlet 3.0 (supported by Tomcat 7+), web.xml can be thrown out, but there is still sun-jaxws.xml . This blog post is interesting: Of course, with the use of jax-ws annotations, even configuration sun-jaxws.xml can be made optional making it completely descriptor free, but that requires specifying a default url-pattern like in JSR-109 or custom pattern like in Jersey

Apache Camel enrich message with file content on request

我只是一个虾纸丫 提交于 2020-01-12 05:36:08
问题 I'm implementing RESTful service (using CXFRS component) which should return files for some requests. Each file is fetched by its id and extension, i.e. restfulservice.com/path/file/1/pdf . Each file once added never changes. Files should not be moved or deleted after fetching and generally they should be accessible concurrently. Here is part of my Camel context: from("direct:fetchFile") .process(fetchFileProcessor) // set file.id & file.extension .bean(fileService, "fetchFile(${header.file

how to run a java applet in web browser

*爱你&永不变心* 提交于 2020-01-12 05:25:07
问题 I have a java SE project or you can say applet , but i want to run this applet in web browser how is it possible? I need to copy jar file something like this i came to know but what is the possible solution? 回答1: This tutorial pretty much covers everything from writing your applet to embedding it on your web page. If you already have your applet done, as it seems, scroll down to "Invoking an applet". Here's the code from the tutorial for a quick solution: <html> <title>The Hello, World Applet

Eclipse Java EE plugin

爷,独闯天下 提交于 2020-01-12 04:49:06
问题 I want an Eclipse Java EE plugin which I can install directly from Eclipse. I searched about it on Google and found some ones but couldn't figure out how to download them directly from Eclipse. One plugin I found was WTP but couldn't find the location of the WTP repository that I can enter in the Eclipse's Software Update tool. I am using Eclipse 3.4.2 (Ganymede) 回答1: I warmly suggest to install Eclipse IDE for Java EE developers which already includes the Web Tools Platform (WTP) and much

How can one read a text file in a Struts 2 app [duplicate]

倾然丶 夕夏残阳落幕 提交于 2020-01-12 03:41:09
问题 This question already has answers here : Where to place and how to read configuration resource files in servlet based application? (6 answers) Closed 3 years ago . Developing a Struts 2 app I run in a following problem. I need to read a text file that is deployed in web server with my app. How can I access it knowing its relative path. In other words how can I find absolute path if I know relative path inside the deployed directory. When I had similar problem with servlets I used to use this

How can I get the nested components of a <p:column> in a facelet using EL

匆匆过客 提交于 2020-01-11 13:53:32
问题 Let's say I have this: <p:column headerText="R" style=" text-align: center;" width="10" rendered="true"> <p:commandLink id="MRepShowButton" update=":form1:display" onclick="EditorDialog.show();" title="Editer le compte rendu"> <f:setPropertyActionListener value="#{exam}" target="#{dyna.selectedExamen}" /> <p:graphicImage id="img1" value="/images/study_Report_icons/Text/0.png" rendered="#{exam.examen.rapport.rapportWrittenState == null}"/> <p:graphicImage id="img2" value="/images/study_Report

How to send a Java Object in binary format and receive in C server?

三世轮回 提交于 2020-01-11 13:32:22
问题 I am having a Java object and now I want to convert it into binary form (binary protocol) and send across the network and a C client will receive it and print the contents. Like I have a Student class Student.java import java.io.Serializable; public class Student implements Serializable { public String name; public int id; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id;

Hook on process where container asks for roles of LDAP user

岁酱吖の 提交于 2020-01-11 13:24:13
问题 In my application I use form-based authentication with a LDAP-Realm. For Authorization I use a database. As I understand this works as follows App --> (user, pass) --> LDAP <-- OK, user exists -- --> ask for security roles for 'user' --> JACC / Database <-- Administrator -- Can I hook into the process where my application calls ask for security roles for 'user' ? Background: LDAP says: Okay, 'user' is authentified Database : give me all roles where username = user And now I want to customize

Server-side network printing in java / grails

谁都会走 提交于 2020-01-11 12:33:29
问题 I am java / grails developer working on redesigning a software system. One of the requirements is to have a sever-side application send data to various network printers to print text data. I searched the web for info on java network printing, and came up short I looked into Java Print Service API, java.awt.print, javax.print and did not find anything on connecting to network printers. Is what I am trying to do possible or favorable. The lack of findings leads me to believe that sever-side

What is a skeleton in a network?

走远了吗. 提交于 2020-01-11 11:37:47
问题 In a J2EE application, clients (applications, JSPs, servlets, JavaBeans) access entity beans via their remote interfaces. Thus, every client invocation potentially routes through network stubs and skeletons, even if the client and the enterprise bean are in the same JVM, OS, or machine. What's a network skeleton? Some kind of proxy? I understand a stub to be a single use connection, is that correct? 回答1: In RMI lingo, the skeleton is the generated object that sits on the server, accepts calls