Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Passing parameters to a struts action in URL

nuwan chandrasoma

2007-01-19

Replies:

Hi,

Have you tried changeing the parameter name, for eg:- try by renaming the
personid parameter name to something like personId, and also introduce a
totally new parameter to this link and read it from your action class and
see.

Thanks,

Nuwan.


----- Original Message -----
From: "Joe Yuen" <joe.yuen@(protected)>
To: "Struts Users Mailing List" <user@(protected)
Mailing List" <user@(protected)>
Sent: Thursday, January 18, 2007 9:28 PM
Subject: RE: Passing parameters to a struts action in URL



In my action class:

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {


String personid = request.getParameter("personid");
log.debug("execute(): personid = " + personid);

                   .
                   .
                   .
     }


If it's in my code, I don't understand why would it work for one browser and
not the other??



-----Original Message-----
From: Ross, Scott [mailto:scott.ross@(protected)]
Sent: Thu 1/18/2007 1:26 PM
To: Struts Users Mailing List
Subject: RE: Passing parameters to a struts action in URL

I don't think this is a URL issue. What is your code to retreive the
variables from the URL?



-----Original Message-----
From: Joe Yuen [mailto:joe.yuen@(protected)]
Sent: Thursday, January 18, 2007 4:12 PM
To: Struts Users Mailing List
Subject: Passing parameters to a struts action in URL

Does anyone have an idea as to why this URL

http://localhost:8080/Chisq/Insurance.do?action=edit&personid=1001

works in Firefox but not in IE6? In my action class, I can see a
personid in Firefox but in IE personid is null.

I am using struts 1.2.8.

Thanks,
Joe Yuen



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.