• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

Cant see jsp file on the server but application still runs the file[Urgent]

Hi,

   Im working on an Jsp application. it is stored on a remote server and i access it through the web front end.
  I have got a file called as "dashboard_old.jsp". When i run the file from the web front end it runs successfully but i cant seem to locate the file on the server. Everyother file is there but i cant see this file. I have tried searching for it but it doesnt exist on the server but somehowits running from nowwhere. I have tried to changed the file settings as well by going to view->show hidden files but no good.

Plz help me with this asap
0
ammartahir1978
Asked:
ammartahir1978
  • 11
  • 8
  • 4
  • +1
7 Solutions
 
TimYatesCommented:
Can you try these 3 options?

1)  Check you are looking at the right webapplication ;-)
2)  Press CTRL-F5 on the browser and clear the cache, you may be looking at a cached version of the file...
3)  Restart tomcat

Tim
0
 
ammartahir1978Author Commented:
Well i have two folder on the server. I connect to the server through the intranet.
Both folders are same. One of the folders is the one that is running live and everone is using the webapplication through that.

Im modifying the code on the other folder . Now i have checked both folders but they dont have the file.
But when you run the web front end , it seems to run it from there . What i need to do is that i need to open that file to modify some of the code in it but how can i do so when i cant see it in the folder.

Tried doing ctrl+f5 as well but no use.

0
 
TimYatesCommented:
Try doing a find to see if you can find "dashboard_old.jsp" anywhere on your filesystem?

With linux, you should be able to do:

    find . -name dashboard_old.jsp

With windows, use the search tool in Explorer
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
JavatmCommented:
It might be just a class file deployed on the server from your war? or if its unpacked check the class folder better yet if the file really exist do a file search
on the server using the search tool of windows or any equivalent for linux if its not there then its not there a refresh of server might be needed to remove
whatever cache it produces.
0
 
ammartahir1978Author Commented:
Well im new into java server pages so can you let me know where to check the class file.
Also i did the search from windows but it couldnt find it.
How do you remove the cache.Actually i dont control the server so everything has to be done from other end if serve rneed to be restarted or cache needs to be removed
0
 
ammartahir1978Author Commented:
tried searching again but only i can find the pages i went to for dashboard_old.jsp  which are stored in the Temporary Internet file and also a "shortcut" for the file in my recent documents. but when i try to open it it asks me to browse the file as windows cannot locate it.
0
 
JavatmCommented:
> Well im new into java server pages so can you let me know where to check the class file.
As I suggested do a file search over the application or the server (might be tomcat) folder if you dont know where it is located.
But anyhow it's like this :

Tomcat/
Tomcat/webapps/ = Is where all the application resides assuming you use tomcat.
Tomcat/webapps/YourApplication
Tomcat/webapps/YourApplication/WEB-INF/classes/ = This is where are all the classes should reside.

> Also i did the search from windows but it couldnt find it.
Then maybe its not really there.

> How do you remove the cache.Actually i dont control the server so everything has to be done from other end if
> serve rneed to be restarted or cache needs to be removed

A stop and start of tomcat can do that ;)

0
 
bloodredsunCommented:
You also need to look for the compiled page and the class file of the jsp. It can be found at

<your tomcat home>\work\Catalina\localhost\<your app name>\org\apache\jsp\

The two files will be called dashboard_old_jsp.java and dashboard_old_jsp.class
0
 
ammartahir1978Author Commented:
well i manage to find the class file . Its there. What should be done now
0
 
bloodredsunCommented:
I depends what you want to do!

If you want to delete it, then delete it. If you want to modify it you can just edit the java file as if it were a servlet and then delete the class file so that tomcat rebuilds it.

If you want to modify the original jsp then you will need to recreate it using the content of the try block in the  _jspService() method of dashboard_old_jsp.java as it appears that you have deleted the original.
0
 
JavatmCommented:
> well i manage to find the class file . Its there. What should be done now

You see its a class file you can delete it or you may want to decompile it for your own use.
0
 
ammartahir1978Author Commented:
Im not sure what server is my application residing on i mean tomcat or some other.

S:\app9

All the files and folder are stored in this folder on the server.


S:\app9\web-inf\jsp

This is the Application path where all the classes ar stored

I can see 2 file in this jsp folder.

1    Anyways jrun__dashboard_old2ejsp12.java
2    jrun__dashboard_old2ejsp12.lnt


But back in the S:\app9 folder there isnt any dashboard_old.jsp   file. So how should i bring it back#
0
 
TimYatesCommented:
Don't think you can "bring it back"

But you can look at the .java file and try to recreate it from that...
0
 
ammartahir1978Author Commented:
Sorry for the file name
These r the 2 files
1   jrun__dashboard_old2ejsp12.java
2    jrun__dashboard_old2ejsp12.lnt

0
 
ammartahir1978Author Commented:
Well i have got no clue how i should create it back. I have done Java Programming as well but i dont have any experience in servlets. If just you guys can give me some tips for it or may be a bit of help
0
 
TimYatesCommented:
how big is the java file?
0
 
JavatmCommented:
> S:\app9

Its a sun application server 9 I think ;)

If you still have the class file you can de-compile it or you can re-create it by scratch :
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html
0
 
ammartahir1978Author Commented:
94 kb
and 2680 lines
0
 
JavatmCommented:
If Im not mistaken its a servlet made from a jsp page it might be hard to understand though but you can try to work on it. it has same effects ;)
0
 
ammartahir1978Author Commented:
Well the file is  genrated by Jrun

These are the headers in the file

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import allaire.jrun.jsp.JRunJSPStaticHelpers;

So i presume its a jav servlet. But all my original files are .jsp format.
The probelm is will i be able to create a .jsp file from it like the one i deleted.
0
 
JavatmCommented:
Honesly saying I dont think so once its a servlet and you deleted the jsp file its not possible.
0
 
ammartahir1978Author Commented:
Well even if i deleted the file how can the web front end of the Apllication is still running it.
So that means the server needs to be refreshed isnt it.
0
 
JavatmCommented:
> Well even if i deleted the file how can the web front end of the Apllication is still running it.
because a life cycle of a jsp is converted into servlet.

> So that means the server needs to be refreshed isnt it.
Yap.
0
 
ammartahir1978Author Commented:
cheers guys thanx alot i finally manage to find an alternative way.
0
 
JavatmCommented:
Thanks for accepting ;) glad I was able to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 11
  • 8
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now