Maggie Taylor

Greenhorn
+ Follow
since Feb 14, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Maggie Taylor

thanks once again. I got it working now.
thanks for helping...but it's still not working i'm using Mozilla 1.5 as well.
Hi,

I'm using this code..




I have a few people names in alphabetical order list from A to Z. When I click on an alphabet I expect it to go firstname starting with that alphabet.

I have defined <a name ="A">A</a> <a name="B">B</a> , etc. (all the alphabets) appropriately for the names starting with that alphabet on the html page.

This is working perfectly fine in Internet Explorer, but not in Firefox. What might be the problem ?

thanks
[ April 06, 2006: Message edited by: Maggie Taylor ]

Originally posted by William Brogden:
What exactly are you trying to accomplish by setting the property to null?



Thanks for replying Bill. I am testing the application for all different values - which include all these:
1)assigning a string as value
conn.addRequestProperty("file","abcd.xml");
2)assinging an empty String as value
conn.addRequestProperty("file","");
3)assinging a null as value
conn.addRequestProperty("file",null);

and the program is breaking down for the 3rd condition - showing null for next header value as well.

Maggie
18 years ago
I have a servlet that recives http header information from a client program.

Now I have observed that when I assign a string value (including empty string ) in conn.addRequestProperty(), then the program works good. But, when I assign a null as any header value, then even the next header value displays a null even if I have assigned a value to it.


Here's a snippet from the client program:


A snippet from the servlet:


Can anybody help me in figuring out why this is happening ? I'm working on JDeveloper / Tomcat server.

Thanks.
Maggie
18 years ago

Originally posted by Paul Clapham:


In your case, after this line of code Element element = doc.getElementById("studid"); is executed, the "element" variable is null. That's because you made the common mistake of assuming that the getElementById() method looks for elements that have an attribute whose name is "id". It doesn't. It looks for elements that have an attribute that is defined, by a DTD or a schema, to be an "ID" attribute.



Thanx Paul, I learnt something new. I added the attribute "id" to the DTD, and then used the code. And it works fine.

-M
Here's an xml file
<COURSE>
<exam date="13-feb-2006" type="v">
.....
</exam>
<STUDENT id="studid">

</STUDENT>
...�..
</COURSE>

I would like to add attribute firstname to STUDENT element(using DOM) so that it shows information like this
<COURSE>
<exam date="13-feb-2006" type="v">
.....
</exam>
<STUDENT id="id" firstname="maggie" >

</STUDENT>
...�..
</COURSE>

I tried running this code

But I get this error, when I run the program

java.lang.NullPointerException
at DOMAdd.main(DOMAdd.java:49)

Is there something wrong with the coding?

-M
[ February 21, 2006: Message edited by: Maggie Taylor ]
Hi !

I am trying to call a JSP page from a servlet.

I first collect the data in the form of Lists in the servlet. Then I need to pass information like a list of names, address, course, etc. (NameList, AddressList, CourseList) to the JSP page which then displays it in the form of a table.

I'm aware of passing a single value using session from a servlet to JSP. How do I go about passing ArrayLists from a servlet to JSP?

Is it possible to declare class variables in the servlet -
static List NameList;
static List AddressList;
Add data collected into these lists, and then access these lists from the JSP page. Is this a good way to go about?

-M
[ February 20, 2006: Message edited by: Maggie Taylor ]
18 years ago
I'm still a novice, and I'm trying to figure out how to go about with Synchronization / FileLock. I would be able to appreciate advanced topics like log4j a little later.

thanks for the suggestion..
18 years ago
hi !

I have this try-catch block in a servlet. Whenever a client makes a call to this servlet, the log file gets updated with a new entry.

Now there can be more than one client making a call at the same time. I want to make sure that, when the log file is getting updated (during first call to the servlet ), there's no new instance that tries to make another entry into the log file (made by a second call to the servlet). Do I need to use synchronized or FileLock ?

Thanks.

18 years ago