• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calling a servlet

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
I had created a servlet, named "Download" , package: "servlets".
What is the expresion for calling the servlet from a jsp page, let's say index.jsp?
And if I do something like this :

it will be initializate in the general servlet or my Download servlet, or both ?
Thnx in advance
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the future please ask one question per topic.

Popescu Ion wrote:I had created a servlet, named "Download" , package: "servlets".
What is the expresion for calling the servlet from a jsp page, let's say index.jsp?


You don't "call" servlets, so I'm not sure what you are trying to do. Generally, there will be a link or form on the page that invokes the servlet via its URL.

And if I do something like this :

it will be initializate in the general servlet or my Download servlet, or both ?


That will have nothing whatsoever to do with your servlet. All it will do is to assign a string to an instance variable.

By the way, putting Java code in a JSP is an extremely poor practice that has been discredited for almost 10 years now. Why are you doing it?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic