Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Enabling dynamic hyperlinks

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello.. ive got this email application that uses servlets and jsps.
I would like to make it so that when anyone types in a URL address when he's composing a mail, it automatically becomes a live hyperlink in the page, without me having to write <a href.....blah blah>
Also, if anyone sends me a mail...and its got a hyperlink in it...the hyperlink should also become alive.
I hope i dont sound confusing and u all get my idea..its kinda how yahoo does it.
Thanks
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hello.. ive got this email application that uses servlets and jsps.
I would like to make it so that when anyone types in a URL address when he's composing a mail, it automatically becomes a live hyperlink in the page, without me having to write <a href.....blah blah>


You'd have to do that with JavaScript. You would have to parse the text as it is changed by the user and update it accordingly. You might like to ask this quetion in the HTML forum - someone will probably know how to do it.


Also, if anyone sends me a mail...and its got a hyperlink in it...the hyperlink should also become alive


That is up to which ever mail client you use. Most do this automagically these days.
 
Adewale Adebusoye
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well im actually writing my own email client..so id like to know how to enable any links in anymail sent to me
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In which case you have posted this in the wrong forum. I'm assuming you are using Swing?
 
Adewale Adebusoye
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No its just pure HTML with jsp/servlets. I was under the assumption that it wasnt possible using swing in a web application.
If im in the wrong forum..where should i repost?
 
Adewale Adebusoye
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No its just pure HTML with jsp/servlets. I was under the assumption that it wasnt possible using swing in a web application.
If im in the wrong forum..where should i repost?
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


No its just pure HTML with jsp/servlets.


OK. In that case the first part of your question is a JavaScript question. Ask in the HTML forum and should be able to give you an answer. Redisplaying mails you can do in your Servlet. You'll need to capture what text is (possibly) a link and add the <a /> element. The obvious API you could use for this is java.util.regex.


I was under the assumption that it wasnt possible using swing in a web application.


True - you can't use any of the AWT/Swing APIs in a Servlet. You could however use them in an Applet.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Adewale Adebusoye:
No its just pure HTML with jsp/servlets. I was under the assumption that it wasnt possible using swing in a web application.
If im in the wrong forum..where should i repost?



You can use Swing in a web application if you are building applets (small java programs that get downloaded and run in the user's browser).

Otherwise, your assumption is correct.
 
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic