留言板

Jsp variable to url?

thumbnail
lutz Bremen,修改在12 年前。

Jsp variable to url?

Expert 帖子: 291 加入日期: 11-10-20 最近的帖子
Hey guys,
does somebody know how i could give the value of an variable to a url?

for example my variable ist:

<%
String userid = givenName;

out.println(userid);
%>

// I get the right echo from this so that works fine but no i need to get the "userid" into a url like this:

http://www.xxx.xx/xx/xx_"userid"


so when i change the userid that the url cahnges????
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Jsp variable to url?

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
http://www.xxx.xx/xx/xx_<%= userid %>
thumbnail
Mazhar Alam,修改在12 年前。

RE: Jsp variable to url?

Regular Member 帖子: 191 加入日期: 11-11-25 最近的帖子
Hi Hitoshi,

Could you explain more on this part.

Thanks in advance
thumbnail
Jitendra Rajput,修改在12 年前。

RE: Jsp variable to url?

Liferay Master 帖子: 875 加入日期: 11-1-7 最近的帖子
http://www.xxx.com?userId=<%=userId%>
thumbnail
Mazhar Alam,修改在12 年前。

RE: Jsp variable to url?

Regular Member 帖子: 191 加入日期: 11-11-25 最近的帖子
Hi Jitendra,

how you are calling this in ur jsp - http://www.xxx.com?userId=<%=userId%>
I mean which tag or property ur using to replace the url with a new one.?

Thanks
thumbnail
Hitoshi Ozawa,修改在12 年前。

RE: Jsp variable to url?

Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
Better if you study jsp first before posting further question here. There are many good books are Internet sites.