Ed Chawlik

Greenhorn
+ Follow
since Aug 10, 2005
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 Ed Chawlik

I would not use DOM. There are several examples using SAX, that might be a better approach. Just search for "Java XML SAX examples"

Do you want one record or all of them? IF you want all of them, then definately SAX.
Does anyone have an sample java code that uses Xquery to grab a list of elements from an XML file? I have downloaded the saxon jar files, but if someone knows of another implementation, I am up for the suggestion?

I have an Xquery expression, and have tested it using XML spy, but cannot find any simple Java code examples that extract a collection from an XML file.

Regards,
-ed
Thank you guys, I will give that a try.
16 years ago
Is there a jar file that goes along with this?
16 years ago
I am fairly new to struts and am trying to interate though an Oracle result set; the SCOTT/TIGER emp table. I saw this on another forum, but cannot get it to work. If someone knows of a better way or how to get this to work, I am all ears:

Regards, ed

Java Action code (works fine)

stmt = conn.createStatement();
rset = stmt.executeQuery("SELECT EMPNO, ENAME FROM scott.emp");
rsdc = new RowSetDynaClass(rset);
request.setAttribute("customers", rsdc);
...

JASP code:

<logic:iterate id="customer" name="customers" property="rows" scope="request">
<br>This is filler text
<bean:write name="customer" property="EMPNO"/>  
<bean:write name="customer" property="ENAME"/>
</logic:iterate >

Error:


javax.servlet.ServletException: No getter method for property EMPNO of bean customer
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.masterlist_jsp._jspService(masterlist_jsp.java:215)
...
16 years ago
yep, that will do the trick. Thanks again.
16 years ago
alan,
Thanks again for the reply, I will look into that extention.
16 years ago
I appreciate at leaset getting the reply...

This was the reply:

�alan do, Oct 23, 2005
this is a common issue NOT unique to struts. look at ebay, amazon, dell, buy.com or any other non-struts site and you will find the exact same behaviors....�

It is still a problem for struts, is it not? How would one deal with this in struts. I am beginning to think this is an expired page issue.

Also, it seems that the session is somehow based on the process ID of the browser. Netscape has one process ID for sever browser windows.
16 years ago
OK, that is interesting. I now see that Netscape only has one process running, and each browser window looks like a thread of that single process or something like that. MS Explorer has a separate process for each browser window.

So, Tomcat sessions must be based on the process ID? Is that even passed in as an HTTP request parameter?

Is there a way to configure Netscape so that it uses separate processes, or can I run a separate Netscape process to test this?
16 years ago
This has got to be a Tomcat setting. I now understand this is a session cookie, stored in memory by the browser. The Tomcat server or struts configuration which determines the setting of the cookie must not be giving the session enough unique information to create a separate session cookie. However, I am still wondering how MS IE is doing it. Is there a way to view session cookies in IE?
16 years ago
I have come to realize that struts really cannot properly deal with session support since browsers seem to adversely, or at least inconsistently, affect servelet sessions.

As posted earlier, you get the same session ID opening my struts application in two instances of Netscape 7.2, but with MS Explorer you get two different sessions. The problem is that when you get the same session in two browser windows in Netscape, one clobbers the variables in the other.

struts does not seem to be able to deal with this. Does anybody know otherwise?
16 years ago
Thanks Alec for cllarifying this. Any suggestions on how to code around this.

When a second duplicate session in another browser window is brought up, it can clobber the variables of the original session. This has to be a commonly addressed issue, but I cannot find much information on this.

I know there was a problem with an old version of Netscape 4.7, but this is version 7!

How do struts programmer address this?

Thanks.
16 years ago
I have an application running on tomcat 5 which issues sessions. When using Netscape 7, and opening the same application, the same session ID is used in both browser windows; unlike IE which actually uses a separate session ID for both browser windows.

I am not sure where the problem lies here: Tomcat, struts, or Netscape? The desired functionality is to have separate session ID for each browser window.

I thought I might be able to turn off cookies in Tomcat, but not sure how that will affect my sessions.

Any advice would be appreciated.
16 years ago
I have a struts application running on tomcat 5 which issues sessions. When using Netscape 7, and opening the same application in another broswer window, the same session ID is used in both browser windows; unlike IE which actually issues a separate session ID for both browser windows.

I am not sure where the problem lies here: Tomcat, struts, or Netscape? The desired functionality is to have separate session ID for each browser window.

Any advice would be appreciated.
16 years ago
Thanks for the reply, I will try full pathnames.
16 years ago