in.anurag Singh

+ Follow
since May 14, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by in.anurag Singh

I am having an problem with the data table in the icefaces.
I have an list of objects , and i want to populate the data table with the properties of the objects. but i can't ....

Here is my code..
showtable.jspx page:

Now , the controller:

Here is the bean named InfoClass:

My faces-config:

my dtable.jspx

All i want to do is this..
when i will hit the "add" button on dtable.jspx page..
it will call addDataAction method in which will inturn add the infoclass object in the infoclasslist arraylist.
and move on to the showtable.jspx.
on the showtable.jspx, i have binded the datatable to the infoclasslist, and columns to the "".
but when i run my pages, i reach upto the dtable.jspx, when i hit the add button, then i am getting the error

please help me with this problem..
7 years ago
The link was helpful but it is not explaining the way of retrieving session attributes on JSF web page..
how can i retrieve the session on the jsf page
7 years ago
i don't think that the link is what i am looking for..
i am searching for something which is like..


how can we do the same in jsf , when we have to retrieve some value,collections on the jsf page..
7 years ago

I am a newbie to JSF, and i am strucked up with a small problem.
I am wondering how can i set a value in a session from a bean or any other action method, and then retrieve it on any other JSF page.
In Struts , we have a simple option of setting session objects, but i am not able to find the same way in JSF.
Please give me the solution to this problem with the statements used to set the session from the bean or any other java class, and then retrieving the same value on any JSF page..

any help will be greatly appreciated..
7 years ago
if "o" is of type Object then,
how (o instanceOf Moof ) is true,
(Parent insanceOf child) is illegal.
I am just confusing, please help..and explain..
8 years ago
There is an example in the book of SCJP study guide, which is not entering into my mind..

In this example the equals() method is overridden as above, but i am not able to understand how (o instanceof Moof ) is true.
I want to know if the "o" is of Moof Type or the Object Type..?
8 years ago
A and D are correct because they declare and return sub-types of the Super Class Plant type.
C is correct because it is correctly overriding the method getType();
B is incorrect because it is returning "String" which is not a sub-type of Super Class Plant Type.

I want to know, If I am correct..
8 years ago
It was from the Kathie Sierra SCJP 5 Study Guide.
8 years ago
I came across a question, and was unable to understand the solution for the question.
Here it is..


Which statement(s), inserted at line 7, will compile? (Choose all that apply.)
A. Flower getType() { return this; }
B. String getType() { return "this"; }
C. Plant getType() { return this; }
D. Tulip getType() { return new Tulip(); }

The answer is A,C, and D.
and B is incorrect.

However i want to know WHY B is incorrect?
8 years ago

when my beer folder was in folder webapps/root/, then i was typing in the browser:

and my form.html page was also appearing..
8 years ago
the issue is resolved.
Simply i put my beer folder in webapps, and it worked.
but one thing , i am not able to understand..that earlier when my beer folder was in folder webapps/root/, then i was typing in the browser:

and this time when i put my beer folder in webapps, then also i am typing the same thing


and the tomcat is successful in finding the form, how is this possible..
8 years ago
I couldn't understand the meaning of ROOT CONTEXT. will anyone please elaborate this. and what will be the difference if i deploy it to the ROOT directory.
8 years ago
This is my first Servlet Program and i am not able to sort out the it is:
I am using Tomcat 5.5 for this..

This is my html page at
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\beer

This is my DD File as web.xml at
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\beer\WEB-INF

This is the code of my servlet class "". The beerselect.class file is kept at
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\beer\WEB-INF\classes\com\example\web

package com.example.web;

import javax.servlet.*;
import javax.servlet.http.*;

public class beerselect extends HttpServlet
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException
PrintWriter out=response.getWriter();
out.println("beer selection<br>");
String c=request.getParameter("color");
out.println("<br>got beer color "+c);

This all is the hierarchy where i have put up my files.
Now i have started apache tomcat 5.5 and wrote in the browser
then my form APPEARS.
when i select an option and click on button, I get an error:

HTTP Status 404 - /beer/
type: Status report

message: /beer/

description: The requested resource (/beer/ is not available.

Now, I engaged all my mind in resolving the error, but can't sort out that.
So, I request you to have a look and sort out my problem..
8 years ago
I am trying to connect the Eclipse with Sql Server 2005. What I have done so far is as below:

1) I have installed sql server 2005.
2) I have downloaded drivers for sql server 2005.
3) opened Eclipse->Window->open perspective->Database Development
4) Right click on database connections in Data Source Explorer and selected New->SQL Server.
5) The window that is opened is "new connection profile".
6) Then, user name and password are blank, port number is 1433, database name is "pubs". I have checked the "use integrated authentication, and then the connection url is " jdbc:sqlserver://localhost:1433;databaseName=pubs;integratedSecurity=true; " i.e. by default
7) From the new driver definition, I selected Microsoft SQL Server 2005 JDBC Driver.
8) Add the Driver file to the Jar List, The driver file name is sqljdbc.jar.
9) In the properties the password and userId is empty, and connection url is "jdbc:sqlserver://localhost:1433;databaseName=pubs" . this all is by default.
10) After Clicking o.k., when I click the "test connection" on "New Connection Profile", I get an error "ping failed" and the details are: Invalid integratedSecurity property value:true
at Source)
at Source)
at Source)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(
at org.eclipse.datatools.enablement.msft.internal.sqlserver.connection.JDBCSQLServerConnectionFactory.createConnection(
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(

Please help me in connection Sql Server 2005 with the eclipse. Due to this, I am unable to execute database programs in my eclipse....

This makes my code run and a rectangle is now appearing..
Thanks a lot..

I will now try this by layout managers..

8 years ago