Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling a jsp on another site from an app

 
Tomas Nilson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey!
I have a server on my local computer. It runs a java app which sometimes wants to upload data to my web hotel (to update the db). The way I was thinking about doing this is to have a jsp page which will take the data as parameters and then update the db using a java bean (the parameters will be encrypted).
I have two questions:
1. Does this sound like a good idea?
2. How do I communicate with the jsp page from my java app?
I would really appreciate an answer!
Cheers,
Tom
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about just using an HttpURLConnection object, to call the JSP page?
Mark
 
Tomas Nilson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I have got it to work now.
Do you guys think it was a good solution or are there any simpler ways around this?
//Tom
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
better use a servlet instead of a JSP.
You don't need fancy output so why use a presentation technology to do the task?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic