Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

sangeeta kapoor

Ranch Hand
+ Follow
since Jun 15, 2004
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 sangeeta kapoor

Can someone please let me know how can I convert ByteArrayInputStream to ByteArrayOutputStream

My scenario is something like this.

1. The getContent() method returns me the ByteArrayInputStream of the content.
2. Now I have to set this content on a new object using setContent(ByteArrayOutputStream) method. This setContent(ByteArrayOutputStream) method accepts ByteArrayOutputStream as parameter.

11 years ago
I did the following in tomcat
1. Add the following in my application's web.xml

2. Add the following in conf/tomcat-users.xml


Now I need to do the same thing in Weblogic. As far as editing web.xml is concerned that step remains the same.

Please let me know how I can achieve the second step (to add users and roles) in Weblogic. Is there a file similar to tomcat-users.xml in Weblogic.

Thank you


11 years ago
In tomcat, the Java EE principals are specified in /conf/tomcat-users.xml
Can someone please let me know how it is done in Weblogic.

I am told in weblogic it can be done using the "Management Tool". Please tell me where it is and how to add usernames through it.

Thank you
11 years ago
I have Apache Tomcat 6 installed on my PC. If I deploy more than 2 applications in Tomcat, it starts giving me "Heap size: Out of memory" exception.

I have 4 GB RAM and windows XP OS.

Can someone please let me know how to increase the Heap Size.
11 years ago
I am running a class from command prompt like this

java -classpath "C:\Tomcat 5.0\webapps\smart_banking\WEB-INF\lib\ctbondemandrequest_impl.jar;C:\Tomcat 5.0\webapps\smart_banking\WEB-INF\lib\rtf.jar;" com.initprocess.InitProcessMethod -docbase_name rtt_banking -user_name dmadmin -ticket h123

but the problem is that with this command the existing classpath gets lost and only the classpath in this command is considered. How can I make sure that existing classpath is not lost.
12 years ago
thanks for replying but that didn't help
I have an XML which contains named entity references like — etc.

I am using an XSLT to transform this XML to another XML. This XSLT also uses character mapping (I am using Saxon 8b for XSLT 2.0).

There is another XSLT called charmap.xsl which is imported in the original XSLT

charmap.xsl looks like this


The main XSLT looks like this



What I can't understand is that even after the XML is transformed I still get named entity references in the transformed XML.
I was expecting hex code values there (because of the charmap). Please tell me how to get the hex code values in the transformed XML rather than the named entity refernces whcih are there in the original XML.

Thank You
I have to write an XSLT to transform a SOAP response XML.
Since I have no idea about SOAP, I need some info to proceed with the XSLT.

The XML is in the form of



What I want to know it that
1. Is it possible that one <content> element has 3 <Attribute> elements, while another <Content> element has a differnet no. of attribute elements, say 4. In the XML which I have received all <content> elements have 3 <Attribute> elements. But I want to be sure (as per the rules of SOAP), if it can change in future.

2. Also, if one <content> element has 3 <Attribute> elements with "Name" attribute values as "object_id", "resource_name" and "title". Is it possible that another <content> element has 3 <<Attribute> elements which have completely different "Name" attribute values, say "abc", "xyz", "pqr".

Please help me with this.

Thank You
[ May 11, 2007: Message edited by: sangeeta kapoor ]
13 years ago

Originally posted by srikanth ramu:
This will replace all the special characters except dot (.)

String newName = name.replaceAll("[\\W]&&[^.]","_");



Thanks for replying. But I want all the characters apart from

A-Z
a-z
0-9
. (dot)
_ (underscore)
- (hyphen)
to be replaced with an _ (underscore)
13 years ago
String name= "12E463~1.jpg";
String newName = name.replaceAll("[a-zA-Z1-90_\\- \\.]*","_");

String name has some value which contains some special characters. I want all characters apart from
A-Z
a-z
0-9
. (dot)
_ (underscore)
- (hyphen)
to be replaced with an _ (underscore)

So I should get
12E463_1.jpg in newName

But using the above regex the opposite happens. All characters apart from the special character (~ in this case) gets replaced. Please tell me how to do the opposite of the above regex.

This does not work

String newName = name.replaceAll("[^a-zA-Z1-90_\\- \\.]*","_");
13 years ago
Please tell me how to handle character entities in XSLTs used for transforming XML-to-HTML. I need to make sure that the HTML will display well given the limited HTML character set.

Originally posted by Bert Bates:
Thanks for the reminder guys, I just pinged the publisher again!



Hi
Any update ...
14 years ago

Originally posted by Bert Bates:
I checked with the publisher today, and they don't have an answer yet. It's very complicated to get international publishers coordinated, but the US publisher is on the task, so when we get an update we'll post it here!

hth,

Bert



Hi Bert
is it possible for you/publisher to give a tentative date as to when the indian edition will be released.
14 years ago
I have got an offer from Accenture and Sapient (1.9 years of Java exp).
Accenture is offering 2.5L pa and I have to relocate to B'lore. Sapient is offering is 3.0Lpa and I have to relocate to Gurgaon.
Which one is better in ranchers view. I have heard a lot about the brand name of Accenture, not aware of Sapient.
Where are chances of future growth/working on good projects more. Which option should i choose.

Thanks
15 years ago

Originally posted by Pooooja Sharmaaa:
Hello friends,

I have three years of IT work experience, and am presently working for a small product based company in Bangalore. During last two weeks I took off from my work and started applying for jobs, and hence have landed up with three offers! Please advice me which one should I pick.

Accenture 3.6
LogicaCMG 5.5
ITC Infotech 4.6

Many thanks,

Pooja Sharma

Bangalore



I joined Accenture a month back. My experience with Accenture is
1. They pay considerably less than any other company
2. The work that I have been assigned is pretty useless. Once you are assigned a project they are not going to change it. Mostly there work consists of maintenance and support.
I am planning to leave Accenture after just 1 month here,so I won't advice you to come here.
I don't know about the other 2 companies.
[ July 22, 2005: Message edited by: sangeeta kapoor ]
15 years ago