Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!

Manish Shinde

Ranch Hand
+ Follow
since Mar 30, 2011
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 Manish Shinde

I am getting my hands on struts 2. While doing this i faced some unique behavior

In my code ,I m using Preparable interface to get data from the database and then showing the data on the same page.

Here is my JSP(modalPrepareForm.jsp) PAGE.


Struts.xml



Model Class (PrepareEmployee)


Action Class (PrepareFormAction)



And Here is console ouput




When call arrives at update method two String fields became disappear(u can see from console output that ‘Alex’ and ‘Nerul’ is not appearing in last line) so consequently they are not appearing on JSP also.Rest of the fields(empid,age,salary, departmentID, managerID) are displayed properly .
Even if I change datatype of any of other field let’s say age to Integer or String then with that two fields age become invisible in JSP.

What is going wrong in this case?

THANKS IN ADVANCE !!
7 years ago
HI All,

i m facing some problem while calling simple oracle stored procedure from hibernate.

Following is the procedure & code.

1)


2)test.hbm.xml (here i m calling procedure)

or i have tried another way


3) Test.java


here my procedure is getting called but it is giving pl/sql error : wrong number or types of arguments in call to 'GETSUM'
i tested this procedure on oracle editor it is working fine but while running from the hibernate it is giving error .

what am i missing?

Thanks In Advance.

Regards,
Manish
HI,
I have encountered one example of display tag on some website.I implemented the same but still it is not working properly.

1)I have following class ActorData having tvShow,userName,emailId as variables



2)FormBean Class-UserForm



3)Action Class-UserAction




4)First Page-actor.jsp


5)Targeted Page-actorDetails.jsp


6)Struts-config.xml



Here request is successfully redirected from acotr.jsp to actorDetails.jsp.
On actorDetails.jsp it is printing all acotor data but for display tag is showing nothing to display

What could be wrong in above case?

Here is link that I referred.

Thanks in advance,
Manish



8 years ago
thanks for your reply.

But i still didn't understand ConfigurationManager.Here Struts.xml is responsible for all the
mapping related to Action class and results.So my concern is that how this information is conveyed
to ActionInvocation or ActionProxy.



Regards,
Manish
8 years ago
i m sorry for the responding late
here is link that i have gone through
link


Thanks ,
Manish
8 years ago
I am wondering what does com.opensymphony.xwork2.config.ConfigurationManager do in struts 2. ?
I read some documents where in they said
The ActionProxy consults the frameworkConfiguration Files manager (initialized from the struts.xml file).
what does above statement mean?

8 years ago
I have some serious doubts in CallableStatement.execute().

As per the documentation execute() method of CallableStatement will return true if very first result coming back from procdure
is java.lang.resultset.So if the execute() caused an update first, and then fired a query, then execute() will return false.

But in my procedure i m having two result set i.e two select queries and when i do CallableStatement.execute() from the program
i am getting false in return all the time

question :
1)Why CallableStatement.execute() method reurning false.
2)Also CallableStatement.getResultSet() method returns null.
Following is the porcedure and java code.

i m using oracle 8i and procedure is working fine on editor.
Also the java program is working fine.
but i want process the results from procedure by using resultset.


PROCDEURE :

create or replace procedure procedure_1(v_name OUT MEMPLOYEE.ENAME%type,v_dname OUT MDEPT.DNAME%type)
is
begin
select ENAME into v_name
from MEMPLOYEE
where EMPID=1000;
select DNAME into v_dname
from MDEPT
where deptno=500;
dbms_output.put_line(v_name ||' '|| v_dname);
end;
/

CODE :


Thanks in advance
Manish
Is possible run following
Context envCtx=(Context) initialContext.lookup("java:comp/env/"); in the standalone java program(without using any application server and web-server) ?

Thanks in advance.
manish
8 years ago
HI ALL,

I am getting an exception while binding the object to JNDI.I missing some minute thing over here.
I am using Netbeans 6.5 and Tomcat 6.0.

Following is code.



I am getting Following Exception :
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at BindObject.main(BindObject.java:13)


Thanks in advance
Manish
8 years ago
I have some some doubts in JDBC type 4 driver.

while making database connection in oracle i have used classes12.jar which is of TYPE 4.

Question
1) Who does provide this classes12.jar ?Is it database vendor like in this case oracle database vendor?

2)If classes12.jar is provided by database vendor then if tomorrow i change database then i will have to use .jar provided
by that database vendor.
so Is it correct that if i use MY-SQL then i will have to use let say mysql-connector-java-3.1.6-bin.jar which is i suppose
provided by My-SQL vendor?

Thanks in advance !!
Manish
what i understood by reading in different post/books about JDBC Type 3 driver (Net pure Java) is that In a Type 3 driver, a three-tier approach is used to accessing databases. The JDBC clients use standard network sockets to communicate with an middleware application server. The socket information is then translated by the middleware application server into the call format required by the DBMS, and forwarded to the database server.

but this answer didn't satisfy me.
Can anybody explain working of the JDBC Type 3 driver (Net pure Java) little bit in detail ?


Regards,
Manish
Thank you for your reply.

but can you little more elaborate your first point ?


Thank You,
Manish
I have doubt in JDBC-ODBC bridge.

In the working of JDBC-ODBC bridge,calls on JDBC-ODBC bridge gets converted into ODBC driver .
Then ODBC driver inturn converts the call to native client code which inturn speaks to actual database server using network protocol.

So in the above case,
1)What is native client code?
2)what type of network protocol are used ?


Regards,
Manish
I m new to this portlets development.
I have some doubts in ProcessAction method.

In the following code my doView() method is called but not ProcessAction method

when ProcessAction method gets called ?






Thanks in advance.
Regards,
Manish
8 years ago