I tried to open a Servlet with Hyperlink.openLocation("/pdfstream?filename=Test.pdf") but it doesn't work. The Servlet definition looks like this:
<servlet>
<servlet-name>PdfStream</servlet-name>
<display-name>Pdf-Streaming Servlet</display-name>
<servlet-class>servlets.PdfStreamingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PdfStream</servlet-name>
<url-pattern>/pdfstream/*</url-pattern>
</servlet-mapping>
What do I have to do to call a Servlet within my Thinwire application? I just want to stream the file from the Server to the browser/client.
Thanks for help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
location is open location is calculated as if it was typed in client browser, so it shall be "http://yourhost:8080/yourapplication/pdfstream?filename=Test.pdf"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I thought it cannot be called relative to the webapps root dir. I put the path in a configfile, so it can get changed dynamically.
Thanks for the fast answer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Really, you even need not it in the config - it can be calculated dynamically - host may be obtained from the parameters of main method of the main class of your TW application and then combined with Application.current().getBaseFolder()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
I tried to open a Servlet with Hyperlink.openLocation("/pdfstream?filename=Test.pdf") but it doesn't work. The Servlet definition looks like this:
<servlet>
<servlet-name>PdfStream</servlet-name>
<display-name>Pdf-Streaming Servlet</display-name>
<servlet-class>servlets.PdfStreamingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PdfStream</servlet-name>
<url-pattern>/pdfstream/*</url-pattern>
</servlet-mapping>
What do I have to do to call a Servlet within my Thinwire application? I just want to stream the file from the Server to the browser/client.
Thanks for help
location is open location is calculated as if it was typed in client browser, so it shall be "http://yourhost:8080/yourapplication/pdfstream?filename=Test.pdf"
Ok, I thought it cannot be called relative to the webapps root dir. I put the path in a configfile, so it can get changed dynamically.
Thanks for the fast answer.
Really, you even need not it in the config - it can be calculated dynamically - host may be obtained from the parameters of main method of the main class of your TW application and then combined with Application.current().getBaseFolder()
Thank you, I will check it.