• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File upload

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I try to extend the forum. I create a page where there is a form to upload a file. In the action (referred to this page) I must insert the code to upload the file.
Here there are my problems.

I try to insert this code:



But the request I have in JForum (this.request) is a RequestContext and not an HttpServletRequest class.
How can upload a file in JForum? Do I have to use some particular classes?

Thanks, bye bye.

[originally posted on jforum.net by abdujaparov]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For testing and portability jForum uses it's own interface (RequestContext). This allows for some jforum code to be tested outside of the web server environment.

However, in the web environment, the class that implements this interface in the web environment is just a HTTPServletRequest wrapper. This mean you can cast the RequestContext object as a HTTPServletRequest class and get all the methods.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, abdujaparov

Where you put this code? :idea:
[originally posted on jforum.net by Carlos_ds_jar]
 
reply
    Bookmark Topic Watch Topic
  • New Topic