This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP hyperlink problem  RSS feed

 
mahavir sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hai all,
Can anyone help me??
I am developing one edit report in this report "Application no"is one of my field . if i click on that then that "Application form" should open? problem is that how to hyper link edit report to "application form"...both are different jsp page..

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This doesn't sound like a JSP problem at -- simply one of using the <a> tag correctly.
 
mahavir sharma
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:This doesn't sound like a JSP problem at -- simply one of using the <a> tag correctly.

basicaly this is a problem of jsp only ..basic thing is that suppose you have developed one page. you retrieved data from database and you have four field in table . now you want to click one filed like "ID" then it will go old jsp page where you have filled the form and if you want . this is my problem how will i do? please solve this
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are going to need to explain yourself better.

mahavir sharma wrote:now you want to click one filed like "ID"

What is a "filed"? If you meant "field" what it is you mean by that? An input field? If so, then why do you want to launch a new page when a field is clicked? How will the user input data?

then it will go old jsp page

"old jsp page"? What is that?

where you have filled the form and if you want

What form? And you didn't complete your sentence.

Please take the time to clearly explain your situation and your issue.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds to me like you want to edit your data when clicking on an ID in the table. So your anchor tag might look something like...



Depending on your server side setup. You should NOT be going directly to a JSP. This is considered a bad practice.

Then you have a servlet or controller (something other than a JSP) that grabs the id our of the HttpServletRequest and knows that because of the action you want to perform an edit. Then simply lookup your data by the ID and put that data back in the HttpServletRequest and forward (key word here) to your JSP. In this JSP, simply use EL to populate the form correctly.

pseudo code
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!