Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-17-2007, 05:23 AM
Member
 
Join Date: May 2007
Posts: 39
Alan is on a distinguished road
struts question
Hi everybody:
I donīt understand a lot of things about Struts, for example, I have a jsp:

Code:
<shtml:form method="post" action="/listRequirements.do?format=jsp">
I know that when I submit will go to the listRequirementsAction, after that I receive in listRequirementsForm the parameters.

I see in jsp this:
Code:
<a class="common_link" title="<bean:message key='listRequirements.update'/>" href="/item/loadRequirement.do;jsessionid=<%= session.getId()%>?target=work_on_requirement&id=<bean:write name="data" property="id"/>" ><bean:write name="data" property="id"/></a>
that is a link and I understand that call this link and it execute loadRequirementAction , the doubt is:
If I donīt submit is there another way to assign the parameters to the form???

thank you
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-17-2007, 04:13 PM
Member
 
Join Date: May 2007
Posts: 38
Marty is on a distinguished road
.... if you use queryString, you pass like this, so you can obtain the parameters, in other case you have to do a submit.
good luck
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-17-2007, 06:11 PM
Member
 
Join Date: Apr 2007
Location: Pennsylvania,USA
Posts: 46
sandor is on a distinguished road
Use a hidden field in the jsp form.
Code:
<html:hidden property="hiddenfield" value="whatever"/>
make sure that variable hiddenfield is in your ActionForm.
Then submit the form with a submit button. In the struts.config you have the
forward go to the /loadRequirement action.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question mark colon operator question orchid Advanced Java 4 11-12-2008 10:08 AM
New to Struts Swamipsn Web Frameworks 4 10-08-2008 01:01 AM
question about struts-config.xml christina Web Frameworks 2 02-15-2008 12:45 PM
Struts 1 vs Struts 2 (I) JavaForums Java Blogs 0 01-16-2008 07:51 PM
Struts or JSF? Swamipsn New To Java 0 08-01-2007 07:35 AM


All times are GMT +3. The time now is 05:28 PM.


VBulletin, Copyright Đ2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright Đ2006 - 2007, www.java-forums.org