Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

Creating Edit Profile Page in JSP  RSS feed

 
Muni Jampana
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
HI..
I need to create a page where a student list will be displayed. There will be a "edit" hyperlink beside each student record. When I Click on that I should be able to navigate to a servlet. Get the student ID so that I can dynamically populate student details in a text boxes for editing.

I am using the following code .. but in the 'str' value is 'null'.

JSP code in a scriptlet:

out.print("<a href='EditStudent.do'> edit</a>");
out.print("<jsp:forward page='EditStudent.do' >");
out.print("<jsp:param name='sid' value='<%=obel.Snumber%>' />");
out.print("</jsp:forward>");

In the EditStudent Servlet.
String str = (String)request.getParameter();


Please help me.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Originally posted by Muni Jampana:
String str = (String)request.getParameter();


This will not even compile. What is the real code?

Please read this.
 
Muni Jampana
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sorry !!!
its
String str = (String)request.getParameter("sid");

Can you tell me how to make the page?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Where is "sid" defined? I see it nowhere in your code.
 
Muni Jampana
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
Its there in <jsp:param name='sid' value='value1'>

GOT IT??
I hope soo
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65824
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Originally posted by Muni Jampana:
Its there in <jsp:param name='sid' value='value1'>


That is meaningless as pointed out in your other post. JSP actions within strings are not evaluated.

GOT IT??
I hope soo


Being rude to people who are trying to help you is not a good recipe for success.

I am closing this topic as the problems are rooted in the same issue as in your first post.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!