java-ee

How to add Web Tools Platform(WTP) in Eclipse Kepler

泄露秘密 提交于 2019-12-21 04:01:34
问题 I installed Eclipse Kepler in my system. so far I developed J2SE Applications. Now I want to develop J2EE Application.So I need to add WTP in my eclipse. I tried to add WTP in already existing eclipse.For this I open Install Dialog in the following way.and mention Name and Location values Help-->Install New Software-->Add after that, I click on Ok-->Select All-->Next-->Next--> I got error like this. Why I am getting error?How can I fix this? Thanks. 回答1: Use the Kepler site. The URL you're

Storing web content in a JAR file

杀马特。学长 韩版系。学妹 提交于 2019-12-21 03:52:51
问题 Is it possible to store web content (such as JSPs, HTML, images, CSS etc) in a JAR file? I've been looking at various options at modularising our web applications and this is one possibility. We are currently using JSF and Facelets for our view technology - I'm thinking it may be possible to write some form of custom view resolver which would examine the classpath rather than a filesystem directory, but I'm not sure this would work. Any ideas would be appreciated! :) Update: I should probably

Log4j show package name

牧云@^-^@ 提交于 2019-12-21 03:48:25
问题 Right now for my ConversionPattern I have: log4j.appender.A1.layout.ConversionPattern=%d{yyyy MMM dd HH:mm:ss,SSS} %5p [%t] (%F:%L) - %m%n What I'd like to do is also include the full package name with the class (%F:%L) but I can't find any config to do so in the docs. I do understand that this will be slower, but it's only for debugging and not when the system will be in production. 回答1: Maybe I just misunderstand you, but %C will output your class with package. From your referenced docs: %C

How to add the Process id to a LOG4J log file?

喜夏-厌秋 提交于 2019-12-21 03:37:23
问题 I currently have the below pattern layout in log4j. I want to add the Process id to the log file. How can I do it? log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n Pasted sample log message 2011-01-07 11:48:21,940 [main] INFO Testing1 2011-01-07 11:48:21,942 [main] INFO Test.common.ApplicationProperties - Used log4j log4j.properties "log4j.properties" [Read only] 26 lines, 884 characters log4j.rootCategory=DEBUG, stdout,

What is Weld, JSR-299?

醉酒当歌 提交于 2019-12-21 03:24:08
问题 I've found lots of tutorials showing Weld code samples, but not an introductory overview. Could you please suggest an introductory article, or answer the following: What does Weld do/give you? How does it relate to Java EE 6? How would one use it in a Java EE 6 project? If one uses it in a Java EE 6 project, what is it supplanting, if anything? 回答1: What does Weld do/give you? Weld is the reference implementation of the abstract JSR-299 API, which is better known as CDI, Contexts and

Build Soap web service client using wsdl documents in Eclipse

泪湿孤枕 提交于 2019-12-21 02:52:05
问题 I need to create web service client in Java using Eclipse the consumes the onvif wsdl. I spent several hours without finding a how to do that, this the first time I am using soap, my experience was in REST. I tried many tutorials like this to create web service client, but when I am trying to choose the wsdl file from my local disk, eclipse shows the an error Could not retrieve the WSDL file ... , the link structure I used for the file was file:/C:/ONVIF/media.wsdl . I need to use any Java

Build Soap web service client using wsdl documents in Eclipse

自闭症网瘾萝莉.ら 提交于 2019-12-21 02:52:00
问题 I need to create web service client in Java using Eclipse the consumes the onvif wsdl. I spent several hours without finding a how to do that, this the first time I am using soap, my experience was in REST. I tried many tutorials like this to create web service client, but when I am trying to choose the wsdl file from my local disk, eclipse shows the an error Could not retrieve the WSDL file ... , the link structure I used for the file was file:/C:/ONVIF/media.wsdl . I need to use any Java

Java EE, EJBs File handling

假如想象 提交于 2019-12-21 02:50:16
问题 I'm developing a web application in which users are allowed to upload pictures, the system will then generate thumbs for them. My problem relies on the fact that EJBs can be distributed on several servers and thus are not allowed to handle files directly. I could store the images in the databases but I was hoping to store them as files in one of the servers. How can I do this? Is there any way to centralize the storage of files? Or any approach to deal with files in Java EE with EJBs?

Creating my first JDBC Realm(Glassfish V3)

安稳与你 提交于 2019-12-21 02:44:19
问题 I want to create a JDBC Realm for my web app. Since my users are very different from each other i need to have just one table, with the usernames and passwords for the realm, i decided to create a new table in my database called ROLE(oneToOne relationship with the other users table). This is how my users domain model looks like: I am following this tutorial http://blog.gamatam.com/2009/11/jdbc-realm-setup-with-glassfish-v3.html but i am stuck, i dont know how to continue. I will post the

Clustered EJBs not being balanced in JBoss AS 7

牧云@^-^@ 提交于 2019-12-21 02:39:07
问题 I've successfully setup a cluster of 2 JBoss AS 7 instances, and deployed the following SLSB: @Stateless @Remote(TestEJBRemote.class) @Clustered public class TestEJB implements TestEJBRemote { private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(...); @Override public void test() { String nodeName = System.getProperty("jboss.node.name"); logger.info(nodeName); } } From the log files I can see that the bean is correctly deployed on the cluster.