aspose file tools*
The moose likes JSP and the fly likes Can we change the name of class file which we get after running a jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Can we change the name of class file which we get after running a jsp page" Watch "Can we change the name of class file which we get after running a jsp page" New topic
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: 60053
    
  65

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

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

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: 60053
    
  65

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: 60053
    
  65

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

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we change the name of class file which we get after running a jsp page
 
Similar Threads
questions
Issue running TLD
Access Servlet InitParameters in JSP
getAttribute() ...?
Cannot Invoke Servlets