This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 5968
917
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: 5968
917
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!