Author
Can we change the name of class file which we get after running a jsp page
satish chander
Greenhorn
Joined: Dec 21, 2009
Posts: 12
When we run a jsp page it ultimately results in a servlet with a name _jsp. For example if i had made a jsp page called welcome.jsp it will become _welcome.class . So my question is , is there any way to change the name of the resultant class file(servlet).
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.
A title such as "JSP" is not helpful. What would happen if all posts had such a title?
Please go back and change your post to add a more meaningful subject by clicking the button on your post.
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
If there were, It's certainly be container-specific. Why do you care what the file is named?
Hany Shafik
Ranch Hand
Joined: Jun 21, 2008
Posts: 80
According to the JSP specification section JSP.11.2
The name of the JSP page implementation class is implementation dependent.
Also
The JSP Page implementation object belongs to an implementation-dependent named package.
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Feb 15, 2010 04:39:01
0
I'm still trying to figure out why you'd want to do this.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
David Newton wrote: I'm still trying to figure out why you'd want to do this.
Bored?
satish chander
Greenhorn
Joined: Dec 21, 2009
Posts: 12
I want to do this because someone has asked me this question in interview .....
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56168
Worst. Interview. Question. Ever.
satish chander
Greenhorn
Joined: Dec 21, 2009
Posts: 12
what can i do............
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Feb 15, 2010 10:15:35
0
Ask them for what server they want it done. Ask them if they want it mapped to the original JSP, or if it will be mapped via manual configuration. Ask them why they want it done.
You could look up stuff about JSP precompilation.
subject: Can we change the name of class file which we get after running a jsp page