Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

jsp servlet question

Thread view: 
hoho123 - 07 Jul 2006 16:28 GMT
I know this question seems easy for all of you, but I am stuck.
I am new to JSP and the servlet, so please help me a bit.

in the JSP page, I have:

<input type=text name=date>  So, in the servlet, what can I do to set a
value to the JSP page?

so I can get <input type=text name=date value="xxxxxx">
I read something like request.setAttribute("date", "xxxxx"); but it
doesn't work for me

Thanks in advance
Andrea Desole - 07 Jul 2006 17:14 GMT
> I know this question seems easy for all of you, but I am stuck.
> I am new to JSP and the servlet, so please help me a bit.
[quoted text clipped - 7 lines]
> I read something like request.setAttribute("date", "xxxxx"); but it
> doesn't work for me

setting an attribute is not enough. You have to use a tag library to sho
w it (you can write directly Java code in the JSP, but it's not nice).
JSTL is probably the candidate number one. Please look at JSTL and the
"out" tag:

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL.html#wp74644


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.