Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 30th, 2001, 02:51 AM
underwarez underwarez is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: toronto, ontario, canada
Posts: 10 underwarez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
linking to a servlet from a html link

I am new at writing java servlets.

How can I link to a java servlet using html links?
Will the following work?

<a href="<host>:<port>/<class_name>?sessionid=23"> MY LINK </a>

Thanks in advance

Reply With Quote
  #2  
Old November 30th, 2001, 08:39 AM
xeus xeus is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 0 xeus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
use this
form action = "<host>:<port>/servlet/name_of_servlet"

Reply With Quote
  #3  
Old November 30th, 2001, 10:28 AM
afabsy afabsy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 36 afabsy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Lightbulb

Hi,

it's not always host>:<port>/servlet/name_of_servlet

U can change mapping of Ur servlets, so U don't need to specify "servlet" folder

Ciao

Reply With Quote
  #4  
Old November 30th, 2001, 03:14 PM
underwarez underwarez is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: toronto, ontario, canada
Posts: 10 underwarez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I want to run a servlet when a html link in clicked.

By html link I mean:

<a href="...something"> Link leading to my servlet </a>


I know how to run a servlet from a form element.

Reply With Quote
  #5  
Old December 7th, 2001, 03:17 PM
wolfespawn wolfespawn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 68 wolfespawn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Send a message via AIM to wolfespawn
depending on where your document root is....

i just call <A HREF='/servlets/servletname'>

if its in a package, then the /servlets/com.cma.servletname...

it all depends on where you start from when you call /servlets

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > linking to a servlet from a html link

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap