• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to upload images using jstl instead of jsp  RSS feed

 
isslam akkilah
Greenhorn
Posts: 11
Java Netbeans IDE PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
i am trying to avoid using jsp to upload images cause i know that jsp is not good practice so i looked every where for tutorial how to upload profile image using jstl but i did not find
that but i got some idea from this link youtube link any how my question is can i design site using jstl tag only with out jsp also can any one show me how to upload image using jstl tag please ??? important my site is depending on you please give me hints at least or links to follow :)
 
Stefan Evans
Bartender
Posts: 1836
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSTL works well for the basic programming you need when displaying a JSP page.  It can help build a great View for the "V" part of MVC.
However it is not a general programming language, and won't help you with uploading images.

JSTL vs JSP - actually, you can't use JSTL except inside a JSP.  And you should.
What is discouraged, isn't so much JSP, but the use of java code "scriptlets" within a JSP.  Java code belongs in a Java class.

So where/how do you implement uploading profile images?
If you are talking the server side of uploading images, you will want to use java code in a servlet.
There are several libraries around that can support file uploads.  e.g. Apache Commons File Upload

You might want to take a look at http://balusc.omnifaces.org/2009/12/uploading-files-in-servlet-30.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!