aspose file tools*
The moose likes JSP and the fly likes How to store parameter values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

How to store parameter values

chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

I have passed the values from one JSP page to another.
I am accessing those values using request.getParameter() method.If I want to store those values because I want to do some action based in these values.
I also have the link to this JSP page using "Back" link.So that after clicking on the Back link user will be watching the same JSP page with requested contents.

Thanks in advance.


http://www.androcid.com/
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

chetan dhumane wrote:If I want to store those values because I want to do some action based in these values.
I also have the link to this JSP page using "Back" link.So that after clicking on the Back link user will be watching the same JSP page with requested contents.

Didn't get the question, exactly. Where do you want to get an action on this request value, in Servlet OR in JSP page itself ?


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

Actually I am unable to display an image.


aList is the array List.
When I print the path it displays the path of the image accurately.
But it does not displays the image.
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Try this :


Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Try this :

<img src = "<%=aList.get(0).getFileapartment().getAbsolutePath()%>"></img>
chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

No not working

Image is not getting displayed.
Path is getting displayed correctly ,If I use out.println and print the path.

Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874



What's the img path ?
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Copy paste the print out image file name in browser, if browser shows the image, that's means there is problem in code, else your path is wrong.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
That getAbsolutePath() call is a smell.

Do you realize that the images have to be pure URL's rather than local file system locations? The client does not retrieve images as part of the JSP request. The client retrieves a HTML page and the webbrowser will parse it. Whenever it encounters an <img> element, it will send a new request for each image based on the 'src' attribute. But if that is a local file system path, then it will search in the client's harddisk for the image. This isn't going to work if the images are located at the server machine.
chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

What is the solution to do so.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
As answered in your other topics: use a servlet.

In the future, please do not crosspost the same problem over all places and please stop resurrecting old topics. I've wasted my time and effort to post the multiple answers to one same problem which is apparently from the one and same person. I am not happy with this.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

chetan dhumane wrote:What is the solution to do so.

That's why We Suggest:
http://faq.javaranch.com/java/UseOneThreadPerQuestion
As Bauke suggested in other thread, Try Servlets.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Bauke Scholtz wrote: I am not happy with this.

Nor me, I asked him to search, Google. Also suggest to create image relative to the web app, still No use, He always come up with same doubt "its running on local machine, not on other machine".

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to store parameter values