Tagged Questions
0
votes
0answers
14 views
How to configure context path for subfolders of the external directory in tomcat
I have a web application which is works with jboss-6.0.0.20100216-M2 version and I maintain a external folder directory call StaticContent for keep images and documents.
Inside that there are ...
0
votes
2answers
31 views
JAVA Hibernate and JDBC // db access from another app mixed together?
I have an application with hibernate, I use entityManager.
I would like to know that if I hit database from another application what do I need to configure to hibernate to don't cache anything and ...
0
votes
0answers
14 views
DatabaseMetaData is not working properly
I have Created A DataBase named CSTATE in MySQL 5.5
and create a table in it named BAVTX000
Now In Java Class i have create connection. Code below
try {
connection = ...
0
votes
0answers
8 views
glassfish 4, javaee 7 digest authentication using curl in php
I am trying to make authentication work using Digest for my JavaEE 7 deployed on Glassfish 4.
// Application working fine using Basic authentication
//web.xml
<login-config>
...
0
votes
1answer
73 views
Java, how to using expression language in pure java
I have a JavaEE web application, as it will be deployed to some kind of application servers such as weblogic websphere tomcat etc. so the EL api will be avaiable for me, but I don't need to care about ...
0
votes
2answers
17 views
Generating unique keys using RandomStringUtils of apache commons
Please find the below code which I've used to generate random strings using RandomStringUtils of apache commons.
String key = RandomStringUtils.random(5, String.valueOf(System.currentTimeMillis()));
...
0
votes
1answer
9 views
Error setting foreign key in jpa entity: You cannot flush unmanaged objects… that have persistent associations to unmanaged objects
I am trying to setup some foreign key links to a static lookup table using JPA 2.0. the entity that contains the link and the static lookup table is defined like this in class A and Status ...
0
votes
1answer
26 views
Registration form using spring framework
I am trying to create registration page using spring,Hibernate and Mysql.
I can successfully register user information (Save user data using Controller, Services,Dao and Domain classes).
I want to ...
0
votes
2answers
37 views
Send data using POST to java server from Android client and get JSON response
I am completely new to Android programming. I have come across the following problem -
I want to validate the credentials of the user who uses the application. For this I want to use POST method to ...
0
votes
0answers
40 views
working with entities in JPA
I have a problem with my aplication.
Here is the code:
Student.java
package mainPack;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import ...
0
votes
2answers
28 views
Spring WorkManagerTaskExecutor cannot initialize in websphere
i want use Websphere work manager for executing async jobs in jee context but i have problem with creating spring WorkManager.
bean definition:
<bean id="taskExecutor" ...
0
votes
0answers
36 views
Data not getting pulled from database Java Web
So the problem i am having is, getting the customers details to show. The weird thing is that the size of tblcustomer is showing just fine. You would think that if i could get the size of tblcustomer ...
6
votes
1answer
54 views
Get cumulative value from a List of Map<String, Integer>
I have a List of Map<String, Integer> . Each Map instance contain the productName as key, product price as value.
List<Map<String, Integer>> products = GET_ALL_PRODUCTS();
For ...
1
vote
3answers
43 views
get summation of Map 's value object's field
I get a Map object:
Map<String, Shop>> shopData = GET_SHOP_DATA();
The Shop class consists of two fields:
public class Shop{
private String name;
int salesPerDay
...
}
What is ...
0
votes
1answer
37 views
Websockets - wrapper framework or as is?
We are researching the new websockets in regard to our new generation project. (java web application)
My question is - are there any frameworks that helps you working with websockets (client side)? or ...
1
vote
0answers
25 views
EJB singleton startup bean won't execute
I have a Singleton bean as follows:
@Singleton
@Startup
public class StartUpBean {
private static final Logger logger = LoggerFactory.getLogger(StartUpBean.class.getName());
public ...
0
votes
3answers
33 views
JSP - Can't retrive data from an attribute. (request.setAttribute)
Redirecting to login.php action if role!='user'. Redirection works good, but the content of msg attribute is not displayed.
Code for index page:
<%@taglib prefix="c" ...
0
votes
2answers
25 views
JPA OneToOne relatioship for a non primary key column
I'm having a problem when I query an entity who has a OneToOne relationship with another one. This is the scenario:
Database tables:
create table people (
id decimal(10,0) NOT NULL,
email ...
1
vote
1answer
22 views
How to limit what CDI considers to be managed beans?
I am coming at this question from many years of using spring and just starting to look at JEE7 and CDI.
In the Spring world you have to stick @Component on a bean to turn into spring bean that ...
0
votes
1answer
24 views
What is the difference between Spring Prototype scope and the CDI Dependent Scope?
Is the Spring prototype scope the same as the CDI dependant scope.
Googling lead me to blog posts that claimed they are the same and others that claimed that they are similar but not quite the same ...
0
votes
1answer
17 views
“Completed initial distribution of” bug when running - NetBeans 7.4
I started with Java development. I created an EJB application running on a glassfish server. I’m using Netbeans 7.4 and GlassFish 4. When I run or deploy the project, Netbeans hangs at the stage
...
0
votes
1answer
46 views
struts 2 and business objects
In a struts 2 class where http get params are auto fetched by field variables. http://pastie.org/8487719 While there were repeated such class fields like userId,groupId, etc in many classes, I ...
-1
votes
0answers
18 views
Upload a photo to a DB using servlets
I am trying to make a Servlet that upload and insert an image to the Data base .
this image is of blob type in the database .
The code gives me this error :
...
0
votes
0answers
32 views
Where to make a connection?
Would it be right if I create a connection to the session stateful bin, here's an example:
@Stateful
public class ConnectorImpl implements Connector {
private Session session;
@PostConstruct
...
3
votes
3answers
64 views
Remove .jsp from page names
I have some jsp page in my web application and the following code (for each jsp page) inside my web.xml:
<servlet>
<servlet-name>login</servlet-name>
...
3
votes
2answers
39 views
Implementing client-server, GUI StringBuilder issue
Trying to make a client server program, specifically a hangman game.
I have 4 files: KnockKnockServer, KnockKnockProtocol,Hangman and KnockKnockClient.
KnockKnockServer runs, KnockKnockClient ...
0
votes
0answers
25 views
Atmosphere Framework one to one chat
I have some requirement for Live chat for my company Website.
My main requirement is,
There are 5 agents in my office which responds to customer queries.
At a time many Customer can ask questions, ...
0
votes
1answer
19 views
“Ping Connection Pool failed for MySQL. Communications link failure due to underlying exception” Glassfish 4
I followed this tutorial here:
Creating and configuring a MySQL DataSource in GlassFish Application Server
In step 10, The info I've provided as follow (assuming my database name is Jsf_demo):
...
0
votes
0answers
21 views
Track the user activity in Java EE
I am implementing a thesis management system and I would like to track user's activity. For example, I want to know who scan which thesis and who download which thesis.
I was thinking of using a java ...
1
vote
1answer
20 views
Can a producer in another jar be used for bean injection?
I have a utility jar that has a logger producer, and I am working on another project using Arquillian for testing. In the project, I have a class with @Inject Logger logger. When I run tests with ...
0
votes
1answer
45 views
Integrate Hibernate into Spring 3 project
I created simply Spring application. I inspirated by http://outbottle.com/annotated-dependency-injection-inversion-of-control-di-ioc-in-spring-3-web-mvc-using-netbeans/. But this project save data ...
0
votes
1answer
32 views
How to join the CMIS, using the EJB?
The problem, you need to write a type manager using CMIS. We have the following architecture:
http://i.stack.imgur.com/cAFv4.gif
For the connection enough to get the session.
private Session ...
0
votes
1answer
22 views
Convert a menu in a java code to a dialog box
I need to make this menu, using a dialog box (GUI) , and appear in one dialog box. How can I make it ?
System.out.println("--------------------------------------------------Menu ...
0
votes
0answers
13 views
Spring Conversion Service, binding form to a nested object
I am having difficulties binding the spring form value to a backing object.
The following are the related parts of the code.
This is from page.jsp
<form:form method="post" commandName="building" ...
-3
votes
0answers
25 views
Java Code into Gui [on hold]
I need to make this menu, using a dialog box (GUI) , and appear in one dialog box. How can I make it ?
{
System.out.println("--------------------------------------------------Menu ...
0
votes
1answer
36 views
Using Int In java GUI
What can I do to appear a dialog box asking the user to enter the number of students... (the highlighted part)![enter image description here][1]
JOptionPane.showMessageDialog(null, "Welcome");
...
-1
votes
1answer
27 views
how to send picture from javaee
I have got a form with 2 fiels (email and picture) in order to upload and send a picture by email.
In my code I verify that email and picture are good.
My code looks like this:
index.jsp
<form ...
1
vote
2answers
49 views
Java EE installer crashing on Mac OS X Mavericks
Trying to install Java EE 7/Glassfish 4 on OS 10.9 Mavericks and it crashes every time. I have tried installing the Apple JDK and the Oracle JDK and neither work. Has anyone ran into this? I remember ...
1
vote
2answers
51 views
How to @Inject object with generic type
I am working on project in our company and I have a problem with injecting object. Let's consider I have this entity provider :
@Stateless
@TransactionManagement
public class ...
1
vote
7answers
69 views
Multiple threads access the same file
I have two functions which are dealing with the same file:
public MyShelf(){
…
//Change the content of note.txt file
public synchronized void updateFile(){
File file = ...
0
votes
2answers
39 views
Calling EJB from a WAR inside the same EAR
I am using Glassfish 4. And I have an EAR which has a WAR and a JAR (with the EJBs).
I want to call the EJBs from my WAR but am not really sure if I need to use Local or Remote interfaces.
Inside my ...
0
votes
1answer
64 views
jboss ejb-client exmaple: Exception in thread “main” javax.naming.NoInitialContextException:
I am trying to run the following example for a quite sometime in eclipse.
https://github.com/jboss-developer/jboss-eap-quickstarts/tree/master/ejb-remote
I have created an ejb project and imported ...
2
votes
3answers
57 views
Cant return to appropriate JSP from Spring Controller with @PathVariable
I have a simple spring controller like below:
@Controller
public class SimpleController {
@RequestMapping(value = "/public/{someid}/home.html", method = RequestMethod.GET)
public String ...
0
votes
1answer
26 views
Reference EJBs outside the Application server
I would like to know if any of you have ever call an EJB remotely. This is my scenario:
I have a single remote interface package in its own jar file. Then there is a EJB module (another jar file) ...
-4
votes
0answers
15 views
i want to send xml data to another java application [on hold]
please any one help me
i want to send xml data to another java application
for example
mobile information
i want enter mobile name model number manufacturer so on dynamically. These data will send ...
-1
votes
2answers
54 views
How to make a Java 32bit web app run on fully 64 bit machine?
I have a a web application run by a stand alone tomcat server on a 32bit machine, now I decided to move it to a fully 64bit environment machine, everything will be 64bit tomcat, java .. etc.
I did ...
0
votes
0answers
8 views
Weblogic 9.2 to JBoss AS 7 migration
We are migrating from Weblogic 9.2 to JBoss AS 7 and I'm having multiple problems.
One is that JBoss doesn't seem to support JSTL 1.1 standard which is part of J2EE 4.
I get error from tld about ...
2
votes
3answers
30 views
Struts 2 Iterator tag not working in jsp?
I am trying to display some values from a table. I am passing the values to an object of "user" class which contains the getters and setters after which am passing the object in a list. However am not ...
0
votes
0answers
25 views
Create EJB project capability not available in eclipse JUNO Version: 4.2.2
In my Eclipse Juno Version: 4.2.2, I try to create new EJB project but it is not available in new project creation window.
File > New > Other ....
Is there a plugin I need to use for this? but ...
1
vote
0answers
25 views
My Freemarker cannot pass object to templates
I'm learning the Freemarker framwork and I have this question.
Can i pass a custom object to template files? I saw these post that they do what I have said, but it not working for me.
Passing a List ...