File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Calling a jsp on another site from an app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling a jsp on another site from an app" Watch "Calling a jsp on another site from an app" New topic
Author

Calling a jsp on another site from an app

Tomas Nilson
Ranch Hand

Joined: Jan 14, 2002
Posts: 33
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

What about just using an HttpURLConnection object, to call the JSP page?
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Tomas Nilson
Ranch Hand

Joined: Jan 14, 2002
Posts: 33
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

Joined: Oct 12, 2000
Posts: 5093
better use a servlet instead of a JSP.
You don't need fancy output so why use a presentation technology to do the task?


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a jsp on another site from an app