Jump to content


Check out our Community Blogs

reachpradeep

Member Since 03 Mar 2007
Offline Last Active Apr 02 2007 09:21 AM
-----

Topics I've Started

Passing Javabean from Servlet to JSP

07 March 2007 - 10:07 AM

I'm missing something fundamentally simple I'm sure, but I want a servlet controller to create and populate a Javabean, then forward to JSP page for display via RequestDispatcher.forward (req, resp)

Then in the JSP, I
<jsp:useBean id="name" class="com.etc...." scope="request">

The result is my Javabean is created and populated in the servlet as I want, but then is re-created when it gets to the JSP. I'm looking for some method call or something to attach the javabean to the request object so it gets passed into the JSP without being recreated.

Seems pretty basic to me, but can't find references or searches to
help me out.

Thanks,

How to share data between action components in a struts application

07 March 2007 - 10:00 AM

Hi Guys,

I am stuck. I have set up my application using
the struts framework. I have an
Account class and a helper class Account Manager. I am storing my data in an
array of Account in Account Manager. So, in the create Action component I create
a new account in the account array. In the login Action component I am trying
to access the account using userid. The lookup method is in the Account Manager
class along with the array of Account. In order to use the lookup method from
the login Action I have to instantiate the Account Manager in the login Action
component. But when I instantiate in the login Action, does that not
instantiate the array of account that I have created the new account in? I
don't know how to set up the data and its associated methods so that all Action
components can access it.

I am not sure if I have explained my problem clearly to you. How can all of my
Action components access the array of Account that I am updating with new
accounts? Hope you guys can help. Thanks

Object IO Stream Data Loss Possible? Any solution, pls?

05 March 2007 - 12:02 PM

I've created a client and server program. The server sends a queue object containing some objects through the connection. And the client receives it and processes it.

On the first sending of queue object, the client receives the queue object with the elements in it ok. However, in the succeeding sends and receives by the server and client, respectively, the client receives the queue, but with empty size or no elements at all. I've already checked the server by printing the size of the queue object about to be sent and I'm sure the queue is not empty.

So I've proceeded to debug the client. When printing the size of the queue after immediately receiving it, as mentioned above, the first receive has the elements, but the succeeding has 0 elements.

I've also checked by just sending String objects, and the weird thing is that everything works fine with the Strings all through out the run time.

I'm stumped for days with this problem. Can anybody suggest a way to debug this? Or has anybody encountered the same problem? Or should I just start overhauling things and pass Strings or some sort of packet instead?

Passing Javabean from Servlet to JSP

05 March 2007 - 11:47 AM

I'm missing something fundamentally simple I'm sure, but I want a servlet controller to create and populate a Javabean, then forward to JSP page for display via RequestDispatcher.forward (req, resp)

Then in the JSP, I
<jsp:useBean id="name" class="com.etc...." scope="request">

The result is my Javabean is created and populated in the servlet as I want, but then is re-created when it gets to the JSP. I'm looking for some method call or something to attach the javabean to the request object so it gets passed into the JSP without being recreated.

Seems pretty basic to me, but can't find references or searches to
help me out.

Thanks,

Tree viewer and database

05 March 2007 - 10:50 AM

Hello.
I need to populate tree viewer from the database. Are there any programming patterns for this? I don't really want to "re-invent the wheel". I am pretty sure thread will be involved to populate sub trees. That way whole thing won't "freeze" when user clicks on expand button.

Thanks.

Reply With Quote

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download