aspose file tools*
The moose likes JSP and the fly likes Trying to use HTML values in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Trying to use HTML values in JSP" Watch "Trying to use HTML values in JSP" New topic
Author

Trying to use HTML values in JSP

Jon Pepe
Greenhorn

Joined: Dec 07, 2011
Posts: 5
Hi, I have a problem using a HTML value in my jsp page.

It doesn't work. I tried to do this before:

But I can't use parseInt like this. Can somebody help me?

I have a list ("nodoak") object where I have my "nodo" objects, with some atributes. I want use that HTML value to show a nodo or another. And then I want to change the value of the HTML node and reload the page.
Louis Bros
Ranch Hand

Joined: Jun 03, 2011
Posts: 54

Hi,

Could you send the the value of your html element to your servlet via a get request and build your list there? Then display the list in the next view without conditional statements?


OCA7
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60055
    
  65

You can't do that. JSP knowns nothing about HTML or JavaScript which are interpreted on the browser after the generated page is formatted and sent to the client, So how could JavaScript be used on the server in the JSP code before it even exists?

Please read this article to understand how JSP operates and why that can never happen.

Then you can come back and describe what you are trying to accomplish (rather than how) and we can address how to best get it done.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trying to use HTML values in JSP
 
Similar Threads
check boxes retrieving problem
Problem with nested c:forEach
JSP column name hyperlink help
how do i use checkbox as an active/inactive button for a form?
Implementation of google charts in JSP