You have two misunderstandings:
1. JSP file will be complied not only when you restart JBoss, but every time it is accessed.
2. The class file under work/ directory is temporary servlet, which, theoratically, is ellegible for cleaning after the session is invalidated.
That's why JSP is little slow.
To solve the timing issue, the way is to use servlet. Because it is compiled component, JBoss only needs to create an object the first time it is accessed, for every restarting. After that, servlet accessing is fast.
The trick is that:
create a servlet, by copying your temporary servlet from the work directory, and then deploy this servlet.
1. JSP file will be complied not only when you restart JBoss, but every time it is accessed.
2. The class file under work/ directory is temporary servlet, which, theoratically, is ellegible for cleaning after the session is invalidated.
That's why JSP is little slow.
To solve the timing issue, the way is to use servlet. Because it is compiled component, JBoss only needs to create an object the first time it is accessed, for every restarting. After that, servlet accessing is fast.
The trick is that:
create a servlet, by copying your temporary servlet from the work directory, and then deploy this servlet.