Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Having trouble with servlet

 
fabio alonso
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, you ok !?

Now I have developed below the servlet, but I'm still finding it difficult to call it. Can you give me any tips?

servlet



Here where I have the button that should make the task of calling the servlet that writes to the database

 
Stefan Evans
Bartender
Posts: 1784
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exact problem are you having with this?
Does the servlet not get invoked?
Does the servlet get invoked but create an error?
Does the servlet get invoked, complete successfully, but doesn't do what you want it to?

What makes you think that clicking this button will call this servlet in the first place? You haven't shown us that part...

Presumably you would need some entries in the web.xml file to link up the url "download/envio" with the servlet.
You also have a ? in your url, which may or may not be an issue.

---
Just as a matter of preference, I like keeping the url tag out of the tag, and instead storing it to an attribute.
Like so:



A good way to check that the url is correct is to view source on the generated html, and see what the href value is.

---
This url provides parameters "arquivo" and "pathname"
Your servlet is looking for parameters "id", "id_cliente" and "id_arquivos"
Presumably these should match one another...

Those are a few of the potential issues that jump out at me.
 
fabio alonso
Ranch Hand
Posts: 48
posted 5 years ago
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So

Already configured my web.xml. When I click I can usually save the file I want on my computer.
This logic is correct, just, I want to write, my ID is in the recorder database to see which user has copied files to the machine, get it?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic