Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!

Jelo Nehuptra

Ranch Hand
+ Follow
since Oct 08, 2011
Jelo likes ...
jQuery Netbeans IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
7
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jelo Nehuptra

Sorry for posting late, but it's better late than never.

I took the exam last November 17, 2011, I thought I was like going to get a score like 95% for it seemed that the exam was quite easy but at the end it was otherwise. XD

Thanks to Kathy Sierra and Bert Bates for their wonderful review materials.
7 years ago
check out the pearsonvue.com website
I want to render something like this:

File 'asdf.txt' has an invalid file format.
but my code

renders it as:
File '${param.fileName}' has an invalid file format.

Does anyone know how can I get the container to evaluate the ${param.fileName} using EL but not the core if tags?
8 years ago
JSP
got it

8 years ago
if I didn't specify a location in the @MultipartConfig annotation, how can I access the uploaded file through code?

How can I retrieve the file where Glassfish has put it?

The idea is, the user uploads a .csv file, then the server reads that .csv file.
The problem arises when I didn't use the location method of the @MultipartConfig like:



now, I don't know how to retrieve/search/read the .csv file. I don't know where glassfish has put it and I can't find any API methods to do it. Please help.
8 years ago
If I inject



in a Servlet and perform some



or even an update



am I assured that when 2 clients are running the same code, that the code within the UserTransaction is thread safe?
or I have to



???
ok, so how can i call a singleton session bean on a jsp?

i want to use singleton session beans instead of EL functions. they have the same results right? if i'm correct, singleton session beans were introduced due to the lack of like a 'static' method on any other session beans.

now i have a class that returns the current school year for use with all my jsp, it's working if i use functions but i want to use a singleton session bean to have a instance variable that will be shared for all of my components.
what happened to EL functions in EE6? Why doesn't the Java EE 6 tutorial have EL functions while the EE5 has?

I'm using a Singleton Session Bean to hold data for SchoolYear, how can I invoke a method of the SSB to show the current School Year in a JSP? or the current Date without scriptlets?

Yasir Karim wrote:Murach's Java Servlets and JSP does not seem to be written for the certification purpose.


agree

Yasir Karim wrote:
Not sure if this is the right book for Web Component Developer Java 6?



It is for the WCD5 not the WCD6

According to this link:
https://coderanch.com/how-to/java/ScwcdLinks

"Books
There are currently (19-10-2011) no books targeting the EE6 exam, however one rancher found a book in this thread. If it is any good the link will be put here.
"

James Sutherland wrote:
Do you have a cyclic relationship? One of the foreign keys may need to be nullable to resolve a cycle, setting logging to finest will give some insight on what is going on.



I do have a cyclic/recursive relationship in the Person entity,
because of:
Person examinee;
Person father;
Person mother;
Person guardian;

If i will have the Examinee table to have the nullable foreign key, the 1 to 1 identifying relationship will be gone, thus, a examinee could have many examResults which shouldn't be.

I'll set the logging to finest, thanks for the advice.

James Sutherland wrote:
Where does examResults come from? Is it part of the persistence context? Is it new or existing, perhaps you need to merge it, or persist it separately.



I think it is coming from the same persistence context. When i persist the two entity classes together with their corresponding facades, it works, but when i try the cascade it doesn't.
How do i know if it is new or existing? the persistence context or the injected facade class?

this is the code for the injected '@EJB ExamineeFacade examResults;'


And the '@EJB PersonFacade person;'

this is the code for the examinee class

i think this is much better:

http://www.amazon.com/Head-First-Servlets-JSP-Certified/dp/0596516681/

because it focuses more on the exam rather than adding add on topics which aren't included in the OCPJWCD exam like
JavaMail, JDBC and it isn't IDE dependent which is absolutely out of the exam!
moreover, the authors were involved in developing the SCWCD 5 exam so they know what to put in.

the Murach is more on development rather than the exam.

James Sutherland wrote:
But perhaps include your schema.



This is a part of my schema. The cascade persist works on the recursive relationship but not on the other relationship.
The code was generated by Netbeans7.1, i used the 'create entity classes from database'