Hallo,
I am sending my mail again, because I am thinking that the struts mailing list
have not get this mail. (I got it not back)
I hope, that this is o.k..
here is my example: struts-config:
<global-forwards>
..
<forward name="login" path="/2/login.jsp"/>
..
</global-forwards>
an now I want to use in every page something like this:
<body>
..
<html:link forward="login">login </html:link>
..
</body>
I don't want to switch from ssl to non-ssl. I am using the whole time ssl. But
the link wouldn't be create.
Example for testing page:
<html>
<head> </head>
<body >
<!--Test for which parameter would send-->
<%=pageContext.getRequest().getScheme() %><br>
<%=pageContext.getRequest().getServerName() %><br>
<%=pageContext.getRequest().getServerPort() %><br>
<%=((HttpServletRequest)pageContext.getRequest()).getContextPath()
%><br>
<%java.net.URL url = new java.net.URL(request.getScheme(),
request.getServerName(), request.getServerPort(),
request.getContextPath());%> <br>
<%=url.toString()%> <br>
<html:link forward="login">index</html:link>
</body>
</html>
When I request this page with: {HYPERLINK "http://myserver/mycontext/index.jsp"}
http://myserver/mycontext/index.jsp
I get back: http myserver 80 /mycontext {HYPERLINK
"http://myserver/mycontext"}http://myserver/mycontext login (as
link)
When I request this page with: {HYPERLINK
"https://myserver/mycontext/index.jsp"}https://myserver/mycontext/index.jsp I get
back:
Exception: java.net.MalformedURLException: unknown protocol: https at
java.net.URL.(URL.java:307) at java.net.URL.(URL.java:224)
I hope this will explame my problem in more details.
Harald
On 19 Mar 2001, at 9:24, Craig R. McClanahan wrote:
> > > On Mon, 19 Mar 2001 [EMAIL PROTECTED] wrote:
> > > Hallo,
> > > > I have some problems with the struts html-tag link with the
> > properties forward or page. I want to use this tag with ssl. It doesn't
> > create the link, because the method in
> > org.apache.struts.util.RequestUtils throws in the method
> > absoluteURL a MalformedURLException because unknown
> > protocol.
> > Do I need some additional package for ssl? Or is there a other
> > solution?
> > > > Could you give an example of how you are trying to do this?
> > Note that trying to use the "page" attribute only works within the current
> web application (the path you give it is context-relative beginning with a
> "/"). To go to a different web application, or to switch from SSL to
> non-SSL or back, you will need to make sure you generate a redirection,
> either by using the "href" attribute, or by referencing a <forward> >
element that has redirect="true" on it.
> > > Thanks for help
> > > > Harald
> > > > Craig > >