Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Passing file to GoogleViewer  RSS feed

 
Dauren Zhumabayev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, dear forum members. To display the contents of the various files stored in a blob field in Oracle, I want to use GoogleViewer, which is simple enough connected as follows
And the problem is I can not deal with how to correctly give him back the file location. The project in eclipse, the app war, container tomcat.
Thanks.
 
Devaka Cooray
Marshal
Posts: 5323
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to give it a URL to the file that can be publicly accessible over web. Further, the URL has to be specified in encoded form. If your URL is a static one, you can get it encoded here. If it is not static, you can encode it using <c:url> and <c:param>.
 
Dauren Zhumabayev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devaka Cooray wrote:You need to give it a URL to the file that can be publicly accessible over web. Further, the URL has to be specified in encoded form. If your URL is a static one, you can get it encoded here. If it is not static, you can encode it using <c:url> and <c:param>.

Actually, problem was in another, but I've solved it. And now, you're wright. I need to encode it, but I'm not using JSTL, just scriplets, cause I am new in Java. Here is that how I've tried:


But it's not working, even page source code is the same with given source from here



What did I do wrong?
 
Devaka Cooray
Marshal
Posts: 5323
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dauren Zhumabayev wrote:...but I'm not using JSTL, just scriplets, cause I am new in Java.

If you are new to Windows, should you start from Windows 3.1 or something newer? Being new to Java doesn't mean you should stay away from best practices. Starting to learn from obsoleted bad practices and switching to the best practices later never happens. Using JSTL is not something you have to bend over backwards. You can find a quick and easy guide here. Just set it up, and see what <c:url> tag does especially with <c:param> here.
 
Dauren Zhumabayev
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devaka Cooray wrote:
Dauren Zhumabayev wrote:...but I'm not using JSTL, just scriplets, cause I am new in Java.

If you are new to Windows, should you start from Windows 3.1 or something newer? Being new to Java doesn't mean you should stay away from best practices. Starting to learn from obsoleted bad practices and switching to the best practices later never happens. Using JSTL is not something you have to bend over backwards. You can find a quick and easy guide here. Just set it up, and see what <c:url> tag does especially with <c:param> here.


Ok, thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!