• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP compile

 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

Does anybody know how to force a JSP page to compile (or re-complile)?

Found 1 semantic error compiling "D:/JRun4/servers/StudentWeb/default-ear/default-war/WEB-INF/jsp/jrun__7eug20052d1__loginCheck2ejsp19.java

62. RejDB test = new RejDB();
<--->
*** Error: Type RejDB was not found.

Im getting the above error, I have moved the JSP file from a previous server to a new one (same type of server, just a different login etc.)

The java.class files is that is trying to be instantiated is there.

However i know that JSP's are compiled into servlets, I cant seem to find the JSP.class file on my server, so i guess it hasnt compiled the JSP into a servlet??

Thanks in advance
Zein
[ April 24, 2005: Message edited by: Zein Nunna ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off, it's only urgent for you. Putting URGENT in your subject causes a lot of people to ignore you post completely.

Jrun was able to convert your JSP into servlet code.
The file is right here:
D:/JRun4/servers/StudentWeb/default-ear/default-war/WEB-INF/jsp/jrun__7eug20052d1__loginCheck2ejsp19.java

It was not able to compile it because it couldn't find a dependency.
62. RejDB test = new RejDB();


Either you didn't import ReJDB, you didn't put the needed library where JRun can pick it up, or JRun can't find it because it's not packaged.
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

Is there a file that will hold all the dependencies or something?

RejDB..., is in the classes folder.

Also do I need to have an import statement in the JSP for ReJDB or something? Because I dont have that, but I thought the server went to the classes folder and found the right class? It worked fine on the previous server.

If I have to package it up? How do i go about doing that? Can the JSP's etc. be modified once they have been moved if they have been packaged and put on a different server??

Thnaks
Zein
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Starting with Java 1.4 you can't import a packageless class from a packaged class.

If you have access the source code, just add a package statement to the top of each java file and re-compile. Then, the classes directory structure needs to match the package. If you want to see an example, download and run SimpleServlet from http://simple.souther.us.
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmmn,


See what I have done is that the class im refferring to, is inside a package and does have a package statement, I basically copied the whole package from webserver1/web-inf/classes into the server2/web-inf/classes, so it has the package names and the directory structure etc.?

Thats why I cant see what the problem is? Im not using web.xml (uni dept policy - just dont ask), but that shouldnt really matter because I refer to the servlets etc. directly.

Is there anything else I could possibly check? Or try?

If there is a dependency file missing could I possibly create that?

Thanks in advance
Zein
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!