Re: [Wicket-user] about base path

2006-07-03 Thread Igor Vaynberg
afaik servlet containers do not allow direct access to WEB-INF, so if you want to store images there youd have to map apache or something else to do that, but be careful, you dont want people getting access to your config/classes files that also live in WEB-INF, i wouldnt recommend doing it that way
-IgorOn 7/2/06, Frank Bille Jensen [EMAIL PROTECTED] wrote:
Can't you just store your images in WEB-INF/images? You don't need tostore them in something similar to the URL mapping.Else take a look at the base HTML tag which goes into head:
http://www.htmlhelp.com/reference/html40/head/base.htmlRegardsFrank BilleAvaleoOn Sun, 2006-07-02 at 20:05 -0700, R.A wrote: Hi all. I have a base path question.
 I set my WebApplication class in web.xml as follows. lt;servletgt; lt;servlet-namegt;MyApplicationlt;/servlet-namegt; lt;servlet-classgt;wicket.protocol.http.WicketServletlt;/servlet-classgt;
 lt;init-paramgt; lt;param-namegt;applicationClassNamelt;/param-namegt; lt;param-valuegt;pc.MyApplicationlt;/param-valuegt;
 lt;/init-paramgt; lt;load-on-startupgt;2lt;/load-on-startupgt; lt;/servletgt; lt;servlet-mappinggt; lt;servlet-namegt;MyApplicationlt;/servlet-namegt;
 lt;url-patterngt;/pc/*lt;/url-patterngt; lt;/servlet-mappinggt; I store image files at WEB-INF/pc/images. If I set image tag in html file, img src="" work fine.
 But I'd like to set image tag, img src=""> Is it possible to set base path, /pc, in wicket java source? Regards, R.AUsing Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread R.A

Hi Frank and Igor.

Thanks for your replies.
I had mistaken idea...
I use base tag and move image directory from WEB-INF.
Thank you!

Regards,
R.A
-- 
View this message in context: 
http://www.nabble.com/about-base-path-tf1882484.html#a5147266
Sent from the Wicket - User forum at Nabble.com.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread Frank Bille Jensen
Sry.. I meant of course WEB-INF/pc/images - images. Why doesn't email
clients just send what I think and not what I write ;)

Frank


On Sun, 2006-07-02 at 23:23 -0700, Igor Vaynberg wrote:
 afaik servlet containers do not allow direct access to WEB-INF, so if
 you want to store images there youd have to map apache or something
 else to do that, but be careful, you dont want people getting access
 to your config/classes files that also live in WEB-INF, i wouldnt
 recommend doing it that way 
 
 -Igor
 
 
 On 7/2/06, Frank Bille Jensen [EMAIL PROTECTED] wrote:
 Can't you just store your images in WEB-INF/images? You don't
 need to
 store them in something similar to the URL mapping.
 
 Else take a look at the base HTML tag which goes into head:
 
 http://www.htmlhelp.com/reference/html40/head/base.html
 
 Regards
 Frank Bille
 Avaleo
 
 
 On Sun, 2006-07-02 at 20:05 -0700, R.A wrote:
  Hi all.
 
  I have a base path question.
  I set my WebApplication class in web.xml as follows.
 
  lt;servletgt;
lt;servlet-namegt;MyApplicationlt;/servlet-namegt;
 
 
 
 lt;servlet-classgt;wicket.protocol.http.WicketServletlt;/servlet-classgt; 
lt;init-paramgt;
 
 lt;param-namegt;applicationClassNamelt;/param-namegt;
 
 lt;param-valuegt;pc.MyApplicationlt;/param-valuegt;
lt;/init-paramgt;
lt;load-on-startupgt;2lt;/load-on-startupgt;
  lt;/servletgt;
 
  lt;servlet-mappinggt;
 
 lt;servlet-namegt;MyApplicationlt;/servlet-namegt; 
lt;url-patterngt;/pc/*lt;/url-patterngt;
  lt;/servlet-mappinggt;
 
  I store image files at WEB-INF/pc/images.
  If I set image tag in html file, img
 src=pc/images/abc.jpg, work fine. 
  But I'd like to set image tag, img src=images/abc.jpg.
  Is it possible to set base path, /pc, in wicket java
 source?
 
  Regards,
  R.A
 
 
 Using Tomcat but need to do more? Need to support web
 services, security? 
 Get stuff done quickly with pre-integrated technology to make
 your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on
 Apache Geronimo
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 Using Tomcat but need to do more? Need to support web services, security?
 Get stuff done quickly with pre-integrated technology to make your job easier
 Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread R.A

Hi.

Let me ask another question.
I'd like to change absolute path in base tag dynamically.
I get absolute path in page class as follows.

HttpServletRequest request = ((WebRequest)
getRequest()).getHttpServletRequest();
String path = request.getRequestURL().toString();

How do I set this path in base tag?

Regards,
R.A
-- 
View this message in context: 
http://www.nabble.com/about-base-path-tf1882484.html#a5147772
Sent from the Wicket - User forum at Nabble.com.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread Frank Bille Jensen
On Mon, 2006-07-03 at 00:46 -0700, R.A wrote:
 How do I set this path in base tag?

In html:

base wicket:id=baseTag /

In java:

WebComponent baseTag = new WebComponent(baseTag);
baseTag.add(new SimpleAttributeModifier(href, path));
add(baseTag);


Frank


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread R.A

Hi Frank.

I succeeded at setting base tag, thank you!
But images is unshown.
I write img src=image/abc.jpg in html file, but as looking at source file
on browser, img src=myapp/image/abc.jpg.
It seems like to be added myapp to img tag by Wicket.
myapp is context root.
I set http://localhost:9080/myapp/pc;(create dynamically) in base tag, so
I'd like not to be added nothing img tag.
What's wrong?

Regards,
R.A
-- 
View this message in context: 
http://www.nabble.com/about-base-path-tf1882484.html#a5148315
Sent from the Wicket - User forum at Nabble.com.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread Johan Compagner
yes we are prepending the context and servlet paths to your html files so that they map ok.See the PrependContextPathHandler So if everything works out you shouldn't need to set the basetag, because we are preparsing the source for you.
johanOn 7/3/06, R.A [EMAIL PROTECTED] wrote:
Hi Frank.I succeeded at setting base tag, thank you!But images is unshown.I write img src="" in html file, but as looking at source fileon browser, img src=""
It seems like to be added myapp to img tag by Wicket.myapp is context root.I set http://localhost:9080/myapp/pc(create dynamically) in base tag, so
I'd like not to be added nothing img tag.What's wrong?Regards,R.A--View this message in context: http://www.nabble.com/about-base-path-tf1882484.html#a5148315
Sent from the Wicket - User forum at Nabble.com.Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread R.A

Hi Johan.

I remove base tag and set getApplicationSettings().setContextPath(path) in
my webapplication class's init method, work fine.
Thank you!
But...I don't know how do I path dynamically, so I set direct path, String
path = http://localhost:9080/myapp/pc;, this time.
How do I get HttpServletRequest in webapplication class?
I tried HttpServletRequest request =
((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest(),
NullPointerException occured.

Regards,
R.A
-- 
View this message in context: 
http://www.nabble.com/about-base-path-tf1882484.html#a5149488
Sent from the Wicket - User forum at Nabble.com.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread Johan Compagner
that should work fineBut you can only do that when a request is comming in not in construction time of the webapp.johanOn 7/3/06, R.A 
[EMAIL PROTECTED] wrote:
Hi Johan.I remove base tag and set getApplicationSettings().setContextPath(path) inmy webapplication class's init method, work fine.Thank you!But...I don't know how do I path dynamically, so I set direct path, String
path = http://localhost:9080/myapp/pc, this time.How do I get HttpServletRequest in webapplication class?I tried HttpServletRequest request =((WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest(),
NullPointerException occured.Regards,R.A--View this message in context: http://www.nabble.com/about-base-path-tf1882484.html#a5149488
Sent from the Wicket - User forum at Nabble.com.Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-03 Thread R.A

Hi Johan.

I override newWebRequest in my WebApplication class as follows and works
fine.

protected WebRequest newWebRequest(HttpServletRequest request) {
String path = request.getRequestURL().toString();
getApplicationSettings().setContextPath(path);
return super.newWebRequest(request);
}

Thank you very much!

Regards,
R.A
-- 
View this message in context: 
http://www.nabble.com/about-base-path-tf1882484.html#a5161096
Sent from the Wicket - User forum at Nabble.com.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] about base path

2006-07-02 Thread Frank Bille Jensen
Can't you just store your images in WEB-INF/images? You don't need to
store them in something similar to the URL mapping.

Else take a look at the base HTML tag which goes into head:

http://www.htmlhelp.com/reference/html40/head/base.html

Regards
Frank Bille
Avaleo


On Sun, 2006-07-02 at 20:05 -0700, R.A wrote:
 Hi all.
 
 I have a base path question.
 I set my WebApplication class in web.xml as follows.
 
 lt;servletgt;
   lt;servlet-namegt;MyApplicationlt;/servlet-namegt;
 
 lt;servlet-classgt;wicket.protocol.http.WicketServletlt;/servlet-classgt;
   lt;init-paramgt;
 lt;param-namegt;applicationClassNamelt;/param-namegt;
 lt;param-valuegt;pc.MyApplicationlt;/param-valuegt;
   lt;/init-paramgt;
   lt;load-on-startupgt;2lt;/load-on-startupgt;
 lt;/servletgt;
 
 lt;servlet-mappinggt;
   lt;servlet-namegt;MyApplicationlt;/servlet-namegt;
   lt;url-patterngt;/pc/*lt;/url-patterngt;
 lt;/servlet-mappinggt;
 
 I store image files at WEB-INF/pc/images.
 If I set image tag in html file, img src=pc/images/abc.jpg, work fine.
 But I'd like to set image tag, img src=images/abc.jpg.
 Is it possible to set base path, /pc, in wicket java source?
 
 Regards,
 R.A


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user