Win a copy of Microservices in Action this week in the Web Services forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

Passing file to GoogleViewer  RSS feed

 
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.
 
Marshal
Posts: 6079
967
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: 6079
967
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!