[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-03-29
25
Medium Priority
?
219 Views
Last Modified: 2010-04-01
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
Comment
Question by:ammartahir1978
  • 11
  • 8
  • 4
  • +1
25 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 16322351
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
 

Author Comment

by:ammartahir1978
ID: 16322435
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
 
LVL 35

Expert Comment

by:TimYates
ID: 16322476
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 15

Assisted Solution

by:Javatm
Javatm earned 1400 total points
ID: 16322493
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
 

Author Comment

by:ammartahir1978
ID: 16322549
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
 

Author Comment

by:ammartahir1978
ID: 16322591
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
 
LVL 15

Assisted Solution

by:Javatm
Javatm earned 1400 total points
ID: 16322592
> 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
 
LVL 29

Expert Comment

by:bloodredsun
ID: 16322650
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
 

Author Comment

by:ammartahir1978
ID: 16322713
well i manage to find the class file . Its there. What should be done now
0
 
LVL 29

Assisted Solution

by:bloodredsun
bloodredsun earned 200 total points
ID: 16322772
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
 
LVL 15

Expert Comment

by:Javatm
ID: 16322813
> 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
 

Author Comment

by:ammartahir1978
ID: 16322816
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
 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 400 total points
ID: 16322831
Don't think you can "bring it back"

But you can look at the .java file and try to recreate it from that...
0
 

Author Comment

by:ammartahir1978
ID: 16322835
Sorry for the file name
These r the 2 files
1   jrun__dashboard_old2ejsp12.java
2    jrun__dashboard_old2ejsp12.lnt

0
 

Author Comment

by:ammartahir1978
ID: 16322872
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
 
LVL 35

Expert Comment

by:TimYates
ID: 16322877
how big is the java file?
0
 
LVL 15

Assisted Solution

by:Javatm
Javatm earned 1400 total points
ID: 16322903
> 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
 

Author Comment

by:ammartahir1978
ID: 16322910
94 kb
and 2680 lines
0
 
LVL 15

Assisted Solution

by:Javatm
Javatm earned 1400 total points
ID: 16322940
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
 

Author Comment

by:ammartahir1978
ID: 16322980
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
 
LVL 15

Expert Comment

by:Javatm
ID: 16323009
Honesly saying I dont think so once its a servlet and you deleted the jsp file its not possible.
0
 

Author Comment

by:ammartahir1978
ID: 16323019
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
 
LVL 15

Accepted Solution

by:
Javatm earned 1400 total points
ID: 16323050
> 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
 

Author Comment

by:ammartahir1978
ID: 16323520
cheers guys thanx alot i finally manage to find an alternative way.
0
 
LVL 15

Expert Comment

by:Javatm
ID: 16323603
Thanks for accepting ;) glad I was able to help.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
If anyone asked you to network diagram of the internet, it was drawn in the form of a fluffy cloud which further became known as cloud computing. Popularly cloud computing is defined as workloads that run over the internet in a commercial provider’s…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question