Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!

Srikanth Nittala

Greenhorn
+ Follow
since Sep 24, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Srikanth Nittala

We use a similar set up in our project but face the following wierd issue.
We are using container managed security with form based authentication.(a simple xhtml form with j_username,j_password and j_security_check), JSF with OC4J.

We have to prevent the possible viewing of private and sensitive information by unauthorized users so we do not want the browser to cache any information. We have created a JSF listener to append a no-cache header to pages. This is working to prevent the viewing of prior pages by using the browser back button and the information should also not be available for potential abuse from the browser’s cache folder but has created a side effect.

When a user logs out of the application and then clicks the browser back button, eventually they have the option to resend or repost a request which has the j_username and j_password parameters included.

The user is re-authenticated and is able to then continue on in the application as if they had logged in again and entered their username and password.

Our application logout does invalidate the session and when the user is automatically re-authenticated, a new session with a new j_sessionid has been created.
12 years ago
JSF
My voucher is expiring this month and i had to do it. This is the way I force myself to do certifications!
I have been working on an EJB3/JPA project since 2 years and that was(as i had hoped) really helpful. The materials i used:
- EJB3 in Action - Terrific book. This is what i use in my day-to-day reference in project as well. So i even knew which topic was in which page.
- Enthuware - This gives you a very good orientation of the exam and forces you learn exam specific topics. For example, I have never used a Stateful session bean in my life. But hey now i know atleast in theory! IMO enthuware is almost a 'SCJP study guide by Kathy Sierra' for SCBCD. The questions are tougher than the real exam though.

Good luck to you folks. I am thinking about Spring certification next.

-Srikanth
12 years ago
Thanks. I got the idea now.
14 years ago
JSF
Did you mean to use something like:



Since i am using JSF 1.1 there is no label attribute to the inputText component.

-Srikanth>
14 years ago
JSF
Hello,

I want to read the label name of a component, say inputText.
The reason is that i have a requirement to display error messages like 'labelName must be a 10 digit number". I am using JSF 1.1.




I want to read this label name in my Validator method:




Thanks,
Srikanth
14 years ago
JSF
Hello,
I have radio buttons (labeled Yes / No) on my page that control the display of a panelFormLayout( that contains a list of <tr.inputText> and SelectOneChoice fields).
Here is the scenario where i am facing the problem:
- User visits the page with the radio button value is 'No'(read from DB) and the page wont display the PanelFormLayout with the fields.
- User selects 'Yes' radio button, this triggers a page 'submit' that calls a method inside the backing bean to set the 'rendered' attribute of the panelformLayout to 'true'. The panelFormLayout now gets displayed and the fields are visible.
- User enters new values into the form fields inside the PanelFormLayout and clicks 'save' button that calls 'Save' method inside the backing bean.

Problem: The values user entered in the fields inside the PanelFormLayout are not picked up. The backing bean still sees only the default(initial) values.

This does not occur when the radio button value is 'Yes'. This means when user visits the page, the PanelFormLayout and its fields are rendered right away. IF user changes the values inside PanelFormLayout, and clicks on save, the 'save' method inside the backing bean sees those updated values.

It appears that only when the fields are displayed by default JSF picks up the updated field values, but if we display the fields conditionally or at a later point, JSF not pick up the updated field values.

Is my observation/assumption correct? If so what should be my course of action? Please suggest a solution for my problem.

Please excuse if my description is verbose. I only wanted to be clear about my problem.


Thanks for your time and help,
Srikanth.
14 years ago
JSF
Thank you for the information. I am able to see the changed values now.

-Srikanth
14 years ago
JSF
Hi,

I am a JSF/Facelets novice. I got a question regarding the id fields.

I have a PanelGrid that gets displayed using the facelets <ui:repeat> tag based on an arraylist of 'User' objects that contain User's Secret Questions and Answers( for User's progile). In the panel grid, I paint dropdown(for questions) and text boxes(answers) for each User object using <ui:repeat>. Now since these Question dropdowns and answer Textboxes are painted dynamically based on the number of values in the arraylist, how do i give seperate Ids to each of the fields? I have a backing bean that holds attributes(ids) to these field Ids.
How do we read them to save values into the DB?

Please help.

Thanks,
Srikanth
14 years ago
JSF
Thanks for the inputs. I like your suggestion of injecting Entity Manger into the EJB session bean and passing it into the service class. That way i would get to use the container managed EM. A slight modification of this design is that I read in the book 'EJB3 in Action' that have a DAO as Session beans and inject entity beans into them. So then we have EJB3(Facade) + Service(Business logic) + DAO(Stateless Session bean with entity manager injected). This has also the separation of layers plus does not take away the EM injection facility.
Hi,
Mine is a classic JEE application with this flow ( JSF + EJB + Oracle) on OC4J.

In the EJB3 books and Sun's JEE5 tutorial i ve read so far, they always have an EJB ( Session bean) thats filled with business logic and calls to DB via Entity Manager(injecting it) .
But is it a good practice to have business logic and DB calls in EJB that way? Now if you add service class(using Spring) or an DAO ( that does DB calls for each entity) you lose the power of injections and container-managed Entity managers. And I dont see the use of Spring services here as i think it is an overhead code for a simple flows like CRUD.
So in short i guess my question is " Is it ok to have all the business logic in session facade EJB itself? Isnt the facade EJB supposed to be neat and clean just doing security and transactions? What are the best practices for JEE architecture?

Opinions please.

Thanks.
Is there a format menu component in JSF? I mean somehting to format text like in Java Ranch message message forum? Pls let me know.
14 years ago
JSF
It appears that Maven is unable to bring the required files/jars from its remote repository which is obviously on the internet. I am almost positive that you have a firewall thats blocking this file transfer. So go to the ${User.home}/.m2 directory and create a settings.xml file with the following entry in it: You will have to fill in the appropriate values for your proxy settings.

<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.mycompany.com</host>
<port>8080</port>
<username>your-username</username>
<password>your-password</password>
</proxy>
</proxies>
</settings>
14 years ago
This book is a terrific read on POJOs.

POJOs in Action
Developing Enterprise Applications with Lightweight Frameworks
Chris Richardson
15 years ago
Folks, i am planning to take up a certification on Web services. But i am confused on what exam to take. Either SCDJWS( from Sun) or IBM Test 807(Web Services Development for IBM WebSphere Application Server V6.1). Even though i am working with web services in RAD 7 environment now, i want to take up something that industry values and has some long term benefits. I am also concerned that SCDJWS has not been updated since 2004.
Kindly guide me.

Thanks,
Srikanth