Robert Jack

Ranch Hand
+ Follow
since Apr 13, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Robert Jack

Thanks Tim Cooke for your response.

Yes. We are using reflection API. But i am not clear how to solve this defect type.

7 years ago
Hi Team,

I scanned my project using IBM AppScan tool. The tool is generated report and it contains one 'Medium' defect type.
The defect type is: 'PrivilegeEscalation' and category is:  CWE-266: Incorrect Privilege Assignment

Defect detail:


My Java Code is:


I am not able to find the solution.
Please help me
Thanks in advance
7 years ago

return String.format("%0" + totalDigits + "d", rollNumber);



Sonar qube tool saying the critical error
"Format specifiers should be used instead of string concatenation"

But i am getting the perfect result.

Please help me this.
8 years ago
Hi.

  I am using string.format method which is used to add zero's.

  I set the roll number value is: 8123 and number of digits i used 8. This string.format method will return the value is 00008123.

  What is the alternate method for string.format

   String.format("%0" + 8 + "d", 8123l) --> 00008123



Thanks in advance.
8 years ago
Hi,

I have written JWebunit test class. The program unable to execute after got exception.
I used try catch block properly.Even-though the catch block also not executed.



I got the following content from eclipse console. I can able to resolve the problem. My biggest problem is why catch block not executed and after catch block code also not processed.


Help me,
Thanks in advance.
10 years ago
Hi,

I have done web application and deployed in tomcat. Its running successfully.

I wrote JWebunit test class for test my web application. Its working for me.

Then i tried to check: Simultaneously 100 request to access my application. But nothing happened in the JwebUnit test class.

Normal code: working fine. Means the request passed and proceed request by deployed application.


The abode code is working fine. So i tried to implement thread concept for this code. But nothing happened for me.
Nothing received by my application.


My actual web application, i got from here How to call javascript method from JWebunit

Help me.
Thanks in advance.
10 years ago
Hi,

i got error while i run my simple application. The application details:

hibernate.cfg.xml


entities.hbm.xml


Person.java


PersonDAL.java


Error


Please help me this.
Thanks in advance.
I am using eclipse helios

I tried the following command. Its not working:



Help me.
Thanks in advance.
Hi,

I have checkout the projects from subversion and put in this location C:\project\sources\java
My workspace location is: C:\project\workspace
My Eclipse location: C:\project\eclipse\

I can manually import the source into eclipse. But i am trying to write batch commands to import the existing projects into eclipse.

My batch file


Is it possible to import the source into eclipse using batch commands


Help me,
Thanks in advance
Hi Tim Holloway, Thanks for your effort and reply.

My object is not focused login process. I am concentrating how load the values while page loading.
When the page loading, username & password fields need to clear or show some default values.

Here i will write another one example:

I have created one page to register the students details. The same page is used to edit & view the student details.
Based on the operation, i need to populate the values into fields while page loading.

When we go to the registeration: All text fileds are empty and enable the fields.
When we go to the view the details: All text fields values are fetch from DB and components should be disabled.
When we go to the edit: All text fields values are fetch from DB and fields allow to edit.

Based on above condition, i have used both approaches, such as <h:form binding=#{}> and <f:event listener="#{}" type="preRenderView" />


Here i am confused which option is best. Actual My sample code have muliple lines. Thats why i didnt post the code here. So i post simple login page.

10 years ago
JSF
Hi,

I have planned to assign default values to some fields when the page loading time. There is two approach available.

My Question is Which one is best (Performance wise) ?

Approach 1: Binding


Approach 2: <f:event listener="#{}" type="preRenderView" />


The details code here based on login page:
Approach 1: Binding --> Detail code
login.xhtml


Login.java --> for Approach 1



Approach 2: f:event type="preRenderView"--> Detail code
login.xhtml


Login.java --> for Approach 2


I am creating simple page to register the students details. The same page is used to edit & view the student details.
Based on the operation, i need to populate the values into fields while page loading.

I am bit confused which approach i have to select. which one is best approach?


Thanks in advance.
10 years ago
JSF
Hi Armitage,

Thanks for your well effort.

I sought myself such a carless mistake.

I changed my web.xml, then it works fine

10 years ago
JSF
Hi I am getting blank page only.

I created sample JSF project with Facelet in Eclipse. The source code contains basic page with header, content & footer.

I refer the site Help-Eclipse

I deployed war into Tomcat. I am unable to find the problem.

Project Name: JSF-Facelet-Startup

Project coding structure




home.xhtml


basicTemplate.xhtml


header.xhtml


footer.xhtml



web.xml


Help me.
Thanks in advance.
10 years ago
JSF
Hi Friends,

I got task from my superior. I have to create standard application not like small kids code.

The objective of the application
1. Provide the option to browse the excelfiles which contains some activities and save into the databse.
2. Provide the option to view/generate the report - Some flexible manner, fetch the data from database. (Reports in table formats)
3. Future: The enhancement will come based on my design and application stuff.

He gave me a full freedom to choose framework and table design.
So i want to prove myself like i am good developer & capable to do small projects.

I am bit confused which framework i have to choose?

I have experience in the following area:
Front-End : JSF and Richfaces
Back-End : Core Java, Spring, JPA
Server : Tomcat.

I have not deep knowlwdge in the following area. eventhoug i can do.
Front end: Primefaces
Back-end: Spring, Hibernate.

Please give me a good suggesstion.

Thanks in advance.
10 years ago
Hi chris webster and Ulf Dittmer,

Thanks for your valuable information.
11 years ago