Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > JAVA Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 27-02-08, 09:19 AM   #1 (permalink)
Senior Member
 
Join Date: Aug 2006
Age: 28
Posts: 275
Thanks: 0
Thanked 5 Times in 5 Posts
Thanks: 0
Thanked 5 Times in 5 Posts
Rep Power: 5 radhika743 is on a distinguished road
JSP and Servlets Question?

Q.) How to pass Parameters from JSP to SERVLETS?
radhika743 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29-02-08, 12:08 PM   #2 (permalink)
ukkumar_a
Unregistered
 
Posts: n/a
Thumbs up Re: JSP and Servlets Question?

It's the same way as jsp
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-03-08, 03:48 PM   #3 (permalink)
Banned
 
Join Date: Sep 2007
Age: 25
Posts: 88
Thanks: 0
Thanked 4 Times in 4 Posts
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 0 satya5321 is on a distinguished road
Re: JSP and Servlets Question?

use Javabeans


Get Java,J2EE,Struts,EJB Latest Ebooks Free
satya5321 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 24-03-08, 06:09 PM   #4 (permalink)
Member
 
Join Date: Mar 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 writetokaruna@yahoo.com is on a distinguished road
Re: JSP and Servlets Question?

Hi Radhika,
U can pass parameters from jsp to servlet or servlet to jsp using hidden fields concept.
For example,
Sample.jsp
---------


Sample.java(servlet file)
-----------------------

String msg=request.getParameter("msg");
out.println(msg);

This is the one way of passing value from jsp to servlet.

If it is wrong please correct me.


Regards,
R.P.Karunakaran.

Last edited by writetokaruna@yahoo.com; 24-03-08 at 06:16 PM. Reason: Jsp code is not displaying
writetokaruna@yahoo.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 24-03-08, 06:22 PM   #5 (permalink)
Member
 
Join Date: Mar 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 writetokaruna@yahoo.com is on a distinguished road
Re: JSP and Servlets Question?

Hi Radhika,
U can pass parameters from jsp to servlet or servlet to jsp using hidden fields concept.
For example,
Sample.jsp <%! String msg="Hi"; %>>

---------


Sample.java(servlet file)
-----------------------

String msg=request.getParameter("msg");
out.println(msg);

This is the one way of passing value from jsp to servlet.

If it is wrong please correct me.


Regards,
R.P.Karunakaran.
writetokaruna@yahoo.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 24-03-08, 06:31 PM   #6 (permalink)
Member
 
Join Date: Mar 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 writetokaruna@yahoo.com is on a distinguished road
Re: JSP and Servlets Question?

Hi,
The html code is not displaying.So i have attached it
Attached Files
File Type: txt example.txt (496 Bytes, 17 views)
writetokaruna@yahoo.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 02-04-08, 02:34 PM   #7 (permalink)
Junior Member
 
Join Date: Apr 2008
Age: 29
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 ksingh is on a distinguished road
Re: JSP and Servlets Question?

JSP to servlet communication is possible in different ways
1. we can use redirect
2. RequestDispatcher
3. ServletConfig.getServletConfig ...

By implemeting all these methods JSp can communicate with Servlet
ksingh is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +6.5. The time now is 02:58 AM.





Search Engine Optimization by vBSEO 3.1.0