Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java thread: RE: about http://p2p.wrox.com/edocs.asp


Message #1 by "charles arehart" <carehart@s...> on Thu, 3 Jan 2002 00:53:35 -0500
Well, whatever problem was there a week ago is indeed solved now, but it
wasn't a problem of a web proxy or firewall on my end. Perhaps others
pointed out the same problem (since the banner was appearing on messages in
many different Wrox p2p mailing lists) and it has since been resolved
without direct reply to my query. Thanks for noticing, though.

/charlie

-----Original Message-----
From: Nikolai Devereaux [mailto:yomama@u...]
Sent: Friday, December 28, 2001 2:58 PM
To: Professional Java
Subject: [pro_java] RE: about http://p2p.wrox.com/edocs.asp



Actually, it doesn't...  I went to that site a few days ago, and I went
again just now, and I don't get prompted for a username or password.

Maybe you're asked to authenticate yourself on a web proxy or firewall on
your end of the network, but the problem doesn't seem to lie on wrox's end.

Take care,

Nik

-----Original Message-----
From: charles arehart [mailto:carehart@s...]
Sent: Thursday, December 27, 2001 2:53 PM
To: Professional Java
Subject: [pro_java] about http://p2p.wrox.com/edocs.asp


Hey Wrox folks, regarding this ad banner showing up at the top of notes,
such as that below (and I assume right above this note, too), the address:

http://p2p.wrox.com/edocs.asp

leads to a web server authentication prompt for username and password. If
one doesn't know one, it just goes to a typical "You are not authorized to
view this page" screen.

If you're trying to motivate us to look at this service (which may indeed be
a cool thing), could you either direct us to a page "about" the feature or
at least cause the failure to provide a username/password to go to a page
the explains what it's about.

As it, it's probably creating more ill will than good (as if putting an ad
banner at the top of an email message isn't likely seen by some as bad
enough).

/charlie

PS I realize this is popping up on other Wrox P2P lists as well, and isn't
restricted to the Pro Java list, but it's where I first noticed it.

-----Original Message-----
From: sachin_sawashe@n... [mailto:sachin_sawashe@n...]
Sent: Wednesday, December 26, 2001 11:56 AM
To: Professional Java
Subject: [pro_java] Re: JavaMail and setting the ContentType for
text/html


---
Need a present for your favorite programmer?
E-Documents from Amazon.com at http://p2p.wrox.com/edocs.asp
---
Hi,

i tried out your suggestion


but it disnt work ,
please can u guide me what went wrong in this piece of code.


String mybody= "hello"+"<a href='test.html'> Image</a>" +"Bye ";
message.setContent( mybody,"text/html");

Kind Regards,
Sachin








> > content
> > I have tried many different avenues of setting the ContentType in my
> > headers to "text/html".  I would like to be able to send a text/html
> > document as my mail message so that my end-users can view the mail as
> html
> > if the mail client they are using can display text/html.  I have
> > constructed a ContentType object and used the set/get Parameters as
> shown
> > below.  I have also setHeaders implicity via: setHeader("Content-
> > Type", "text/html")  nothing seems to work.  I set the MIME-Version to
> > 1.0.  I know that it can be done with perl.  But obviously I want to do
> it
> > with Java!
> >
> >
> >   contentType = new ContentType();
> >   contentType.setParameter("MIME-Version", "1.0");
> >   contentType.setParameter("Content-Type", "text/html; charset=us-
> ascii");
> >
> >   try{
> >     theMessage.setHeader("MIME-Version",
contentType.getParameter("MIME-
> > Version"));
> >     theMessage.setHeader("Content-Type", contentType.getParameter
> ("Content-
> > Type"));
> >   }
> >   catch(IllegalWriteException ie) {...}
> >   catch(MessagingException me) {...}
> >
> >
> I have the answer to my own question.  You can set headers all day long,
> but that will do you nothing if you are using the setText() method of
> MimeMessage.  You have to use setContent() passing it both the content
and
> content-type.  If you use setText() you will overwrite any headers that
> you declare with "text/plain".  In case anyone runs into this problem,
> here is your answer.






  Return to Index