This web.xml and this JSP are part of the same application, right ? Everything looks fine, you should be able to get the init param in both cases. Did you set anything special in your JSP, like the page directive ?
Originally posted by Christophe Verre: This web.xml and this JSP are part of the same application, right ? Everything looks fine, you should be able to get the init param in both cases. Did you set anything special in your JSP, like the page directive ?
Yes,they are all the same app.My index.jsp has only just one page directive here:
Do you means the pageEncoding is the key?I will try it again!
Did you launch the server from NetBeans ? I'm wondering if you have a configuration problem here.
Yes,I lauch the server GlashFish from NetBeans.I doubt the server has some problems.I have not configure any files...I using the last versin NetBeans6.0 [ December 27, 2007: Message edited by: Zhao zhenhua ]
I've downloaded NetBeans 6.0 for the fun of it That was very simple to make Glassfish run ! Amazing. Ok, Using the "New Project" menu, I've tried to make a simple "Web Application" looking like yours. In my project, under "Web Pages/WEB-INF", I double-clicked web.xml. There's a nice editor to edit web.xml tags. I chose "Context Parameters", and added one parameter just like yours. In the auto-generated index.jsp, I added your two lines of JSP. I check that web.xml was the same as yours. I launched it, and it worked. I really can't understand why it wouldn't work for you. Or maybe you deployed the application once, modified web.xml, and relaunched without redeploying ?