Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

How to store parameter values

 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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 ?
 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 249
  • Mark post as helpful
  • send pies
  • Report post to moderator
Try this :


 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Report post to moderator
Try this :

<img src = "<%=aList.get(0).getFileapartment().getAbsolutePath()%>"></img>
 
chetan dhumane
Ranch Hand
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator


What's the img path ?
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 641
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
What is the solution to do so.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
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".

 
    Bookmark Topic Watch Topic
  • New Topic