Win a copy of Securing DevOps this week in the Security forum!

in.anurag Singh

Greenhorn
+ Follow
since May 14, 2010
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 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 hello.java 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 "hello.infoclasslist.name".
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
JSF
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
JSF
i don't think that the link is what i am looking for..
i am searching for something which is like..



and



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

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
JSF
if "o" is of type Object then,
how (o instanceOf Moof ) is true,
because
(Parent insanceOf child) is illegal.
I am just confusing, please help..and explain..
7 years ago
Hi,
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..?
7 years ago
means,
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..
7 years ago
It was from the Kathie Sierra SCJP 5 Study Guide.
7 years ago
Hi,
I came across a question, and was unable to understand the solution for the question.
Here it is..

Given:


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?
7 years ago
But,

when my beer folder was in folder webapps/root/, then i was typing in the browser:
http://localhost:8080/beer/form.html

and my form.html page was also appearing..
7 years ago
Hi,
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:
http://localhost:8080/beer/form.html

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

http://localhost:8080/beer/form.html

and the tomcat is successful in finding the form file..so, how is this possible..
7 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.
7 years ago
Hi,
This is my first Servlet Program and i am not able to sort out the problem..here 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 "beerselect.java". 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.*;
import java.io.*;

public class beerselect extends HttpServlet
{
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException
{
response.setContentType("text/html");
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
http://localhost:8080/form.html
then my form APPEARS.
when i select an option and click on button, I get an error:

HTTP Status 404 - /beer/selectbeer.do
type: Status report

message: /beer/selectbeer.do

description: The requested resource (/beer/selectbeer.do) 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..
7 years ago
Hi,
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:

com.microsoft.sqlserver.jdbc.SQLServerException: Invalid integratedSecurity property value:true
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:206)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:104)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:53)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:72)
at org.eclipse.datatools.enablement.msft.internal.sqlserver.connection.JDBCSQLServerConnectionFactory.createConnection(JDBCSQLServerConnectionFactory.java:27)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:355)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55).

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



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

I will now try this by layout managers..

7 years ago