yogi reddy

Greenhorn
+ Follow
since Aug 10, 2009
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 yogi reddy

Hi I was analyzing this issue and it looks like this can not be done. Please find the snippet which I found some from some forum.

http://mail-archives.apache.org/mod_mbox/tomcat-users/200310.mbox/%3C9C5166762F311146951505C6790A9CF83464C0@US-VS1.corp.mpi.com%3E

"if you tried the above, and had a tomcat server running, and had
the naming jar in your classpath (so your app does need to know about
tomcat, however implicitly, via classpath and class name above), it
STILL wouldn't work. That's because tomcat doesn't support external
JNDI calls."

Is this true? I do NOT try something which is not possible.

Thanks,
Yogesh
14 years ago
All - I am trying to integrate Spring 2.5 with Hibernate 3.0 and encountered an issue and sitting like a duck. Tried for more than 4 hours and exhausted now.

The standalone program with public static void main (which is not inside an applicaiton server) will read following spring-config.xml
and access the dao and execute a simple a select.

spring-config.xml
**************



ForumDAOImpl.java
*****************


I encountered the following error
****************************

2531 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
2750 [main] ERROR org.hibernate.LazyInitializationException - could not initialize proxy - no Session
org.hibernate.LazyInitializationException: could not initialize proxy - no Session

Then I changed the spring-config.xml to create a data source using jndi (jdbc/myoracle) configured in Tomcat App server and
JndiObjectFactoryBean as follows... I also have a seprate hibernate.cfg.xml which contains database information.

Also I had tomcat server running when I was running the program.



Another Different Error this time
**************************

Error creating bean with name 'dataSource' defined in class path resource [spring-config.xml]:
Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: Name java:comp is not bound in this Context


Any thoughts or suggestions on how to fix this? Thanks in advance for your time.

Cheers,
Yogesh
14 years ago
Ivan - Thanks a lot for your encouraging tip, I really mean it. I will sure start learning Web Services and reap the benefits from SOA. I will be start with SOA using Java Web Services (Mark Hansen). I will be touch in case if I have any questions.

Cheers,
Yogesh
Dennis - Thanks for your information. I will start with this material.

Cheers,
Yogesh
14 years ago
Dave - I tried to implement the sping dao with struts and it worked. Thanks a ton.

Cheers,
Yogesh

14 years ago
Dave - Thanks a lot for your response. I really do not have any supporting reason to explain you why I started with Struts 1.3.8 but I am sure that I also want to learn Struts 2. Can you suggest any nice book for that (Though this is not the relevant forum to post this)?

I will try to add the Spring DAO to my existing struts application and see if it works.

Thanks,
Yogesh
14 years ago
Hi,

I am new to Struts and Spring, I have developed a small registration application in Struts and it is working fine :D . I have also started learning Spring 2.5 and completed till Spring JDBC concept. I have succeeded in creating a standalone Spring JDBC main program which performs insert update and delete operations.

Now I want to remove all the boilerplate JBDC code from my Struts based registration application and integrate it with Spring JDBC.

Can someone please suggest me the right direction on how to implement this in Spring like how do I load the wiring information (beans.xml) into the application, how do i get the instance of the DAO Impl in the service object, what are the additional configurations I have to add in web.xml and struts-config.xml?

My beans.xml
***********
<beans>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
<property name="username" value="ora1"/>
<property name="password" value="oracle"/>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="manageUserDAO" class="com.regis.dao.ManageUserDAOImpl">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
</bean>
</beans>
14 years ago
Congrats!!! Is it a multiple choice exam?

Thanks,
Yogesh
14 years ago
Hello Everyone,

I have not worked in Java web services so far also I might not have an opportunity in near future. But I want to learn web services and prepare for SCDJWS exam. Can someone suggest is this a wise idea without having a real time experience?

Thanks,
Yogesh
Bear,

Thanks a lot for your immediate response.

Actually I am trying to help out my friend here, his exact requirement is to refer DOMAIN1_out.htm in /wls_domains/wlrmar04/Domain_Monitor/DOMAIN1/ in the unix system.

I have already suggested him to have this file also part of the war.

Just curious if the above requirement can be implemented without deploying in war file.

As always Thanks,
Yogesh
14 years ago
JSP
Hello All,

I think I have a got requirement. I have 3 html pages out of which 2 (dash.htm and domain_list.html are under the same app root in tomcat webapps) are deployed in a war file and the 3rd html (out.html) will not be a part of war file. But I have to include the 3 page which is somewhere located in the system. I have listed below the html files. The domain_list.html is getting included but out.html is coming up as blank.

Any thoughts or suggestion on this is really appreciated.

dash.htm
********

<html>
<frameset cols="150,*">
<frame src="domain_list.html">
<frame src="C:\result\out.html">
</frameset>
</html>

out.html
*******

I am not adding the entire text in here

<html>
<body>
This is a Out HTML
<body>
/</html>

Thanks,
Yogesh
14 years ago
JSP
Can someone check this and let me know?

Thanks,
Yogesh Reddy
14 years ago
Hello All,

I am learning sturts 1.3.8 by doing a registaration application.
So far I have completed the "add a new user & list the users" workflow successfully.

I am having a little challenge in editing an user workflow. . I would need someone's help in this. (I will keep trying myself as well)

snapshot of manageusers.jsp
---------------------------
<nested:iterate name="userDetailsForm" property="userDetails">
<tr>
<td>
<html:link action="/editNow" paramName="userDetailsForm" paramProperty="userId" paramId="userId">
<nested:write property="userId" />
</html:link>
</td>
<td>
<nested:write property="firstName" />
</td>
<td>
<nested:write property="lastName" />
</td>
<td>
<nested:write property="email" />
</td>

</tr>
</nested:iterate>


This is the output rendered from manageusers.jsp all the UID WILL HAVE HYPERLINK
--------------------------------------------------------------------------------

UID430 Yogesh Reddy a@b.com
UID440 James Wallach 1@2.com
UID450 Test Tester we@we.com


struts-config.xml
-----------------

<action path="/editNow"
scope="request"
type="com.registration.action.EditUserAction">
<forward name="success"
path="/pages/edituser.jsp" />
</action>

EditUserAction.java
-------------------

public class EditUserAction extends Action {

public ActionForward execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request,HttpServletResponse response) {
try{
System.out.println("I am in EditUserAction user id : "+request.getParameter("userId"));
} catch(Exception e) {
System.out.println("I am in EditUserAction Exception : "+e.getMessage());
}
return mapping.findForward(Constants.SUCCESS);
}
}

What I need from you guys ?
***************************

Currently when I click the UID's I am getting the request parameter as null in EditUserAction.
I am sure that I am NOT appending the UID to the hyperlink in manageusers.jsp
because I do not know how to do that (tried couple of approaches but in vain ).

Any thoughts or suggestions on how to do this? Thanks in advance for your time.

Cheers,
Yogesh Reddy
14 years ago
Hi I am learning sturts 1.3.8 by doing a registaration application.
So far I have completed the "add a new user & list the users" workflow successfully.

I am having a little challenge in editing an user workflow. . I would need someone's help in this. (I will keep trying myself as well)

snapshot of manageusers.jsp
---------------------------
<nested:iterate name="userDetailsForm" property="userDetails">
<tr>
<td>
<html:link action="/editNow" paramName="userDetailsForm" paramProperty="userId" paramId="userId">
<nested:write property="userId" />
</html:link>
</td>
<td>
<nested:write property="firstName" />
</td>
<td>
<nested:write property="lastName" />
</td>
<td>
<nested:write property="email" />
</td>

</tr>
</nested:iterate>


This is the output rendered from manageusers.jsp all the UID WILL HAVE HYPERLINK
--------------------------------------------------------------------------------

UID430 Yogesh Reddy a@b.com
UID440 James Wallach 1@2.com
UID450 Test Tester we@we.com


struts-config.xml
-----------------

<action path="/editNow"
scope="request"
type="com.registration.action.EditUserAction">
<forward name="success"
path="/pages/edituser.jsp" />
</action>

EditUserAction.java
-------------------

public class EditUserAction extends Action {

public ActionForward execute(ActionMapping mapping,ActionForm form,
HttpServletRequest request,HttpServletResponse response) {
try{
System.out.println("I am in EditUserAction user id : "+request.getParameter("userId"));
} catch(Exception e) {
System.out.println("I am in EditUserAction Exception : "+e.getMessage());
}
return mapping.findForward(Constants.SUCCESS);
}
}

What I need from you guys ?
***************************

Currently when I click the UID's I am getting the request parameter as null in EditUserAction.
I am sure that I am NOT appending the UID to the hyperlink in manageusers.jsp
because I do not know how to do that (tried couple of approaches but in vain ).

Any thoughts or suggestions on how to do this? Thanks in advance for your time.

Cheers,
Yogesh Reddy
14 years ago