This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin 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
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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: 6194
1021
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: 6194
1021
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
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!